build: add DESTDIR support
[netsniff-ng.git] / trafgen_conf.h
blobf92e14c2b4adfef9b24c712de74fc7698c24b93c
1 #ifndef TRAFGEN_CONF
2 #define TRAFGEN_CONF
4 #include <stdint.h>
5 #include <stdio.h>
6 #include <sys/types.h>
8 #define TYPE_INC 0
9 #define TYPE_DEC 1
11 enum csum {
12 CSUM_IP,
13 CSUM_UDP,
14 CSUM_TCP,
17 struct counter {
18 int type;
19 uint8_t min, max, inc, val;
20 off_t off;
23 struct randomizer {
24 off_t off;
27 struct csum16 {
28 off_t off, from, to;
29 enum csum which;
32 struct packet {
33 uint8_t *payload;
34 size_t len;
37 struct packet_dyn {
38 struct counter *cnt;
39 size_t clen;
40 struct randomizer *rnd;
41 size_t rlen;
42 struct csum16 *csum;
43 size_t slen;
46 extern int compile_packets(char *file, int verbose, int cpu, bool invoke_cpp);
47 extern void cleanup_packets(void);
49 #endif /* TRAFGEN_CONF */