-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsender.h
More file actions
27 lines (21 loc) · 722 Bytes
/
sender.h
File metadata and controls
27 lines (21 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SENDER_H
#define SENDER_H
#include "config.h"
#include "net.h"
#include "ranges.h"
#include "blackrock.h"
#include "honeypot.h"
/* distribute IP work slices across sender threads */
void ip_per_thread(ip_range_t *ip_ranges, int num_ip_ranges,
port_range_t *port_ranges, int num_port_ranges,
thread_context_t *contexts, int num_threads,
uint64_t total_packets);
/* rate limiter (batch-aware) */
void rate_limit_batch(thread_context_t *ctx, int batch_size);
/* sender thread entry (PF_PACKET + TPACKET_V2) */
void *sender_thread(void *arg);
#ifdef USE_PFRING_ZC
#include <pfring.h>
void *pfring_zc_sender_thread(void *arg);
#endif
#endif /* SENDER_H */