curvetun: Add __noreturn attribute to exiting functions
[netsniff-ng.git] / trafgen_conf.h
blob7281b59bdfc62dd91ee43243ad2a1b1633828bb2
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Subject to the GPL, version 2.
5 */
7 #ifndef TRAFGEN_CONF
8 #define TRAFGEN_CONF
10 #include <stdint.h>
11 #include <stdio.h>
12 #include <sys/types.h>
14 #define TYPE_INC 0
15 #define TYPE_DEC 1
17 enum csum {
18 CSUM_IP,
19 CSUM_UDP,
20 CSUM_TCP,
23 struct counter {
24 int type;
25 uint8_t min, max, inc, val;
26 off_t off;
29 struct randomizer {
30 off_t off;
33 struct csum16 {
34 off_t off, from, to;
35 enum csum which;
38 struct packet {
39 uint8_t *payload;
40 size_t len;
43 struct packet_dyn {
44 struct counter *cnt;
45 size_t clen;
46 struct randomizer *rnd;
47 size_t rlen;
48 struct csum16 *csum;
49 size_t slen;
52 extern int compile_packets(char *file, int verbose, int cpu, bool invoke_cpp);
53 extern void cleanup_packets(void);
55 #endif /* TRAFGEN_CONF */