summaryrefslogtreecommitdiff
path: root/trafgen_conf.h
blob: f92e14c2b4adfef9b24c712de74fc7698c24b93c (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef TRAFGEN_CONF
#define TRAFGEN_CONF

#include <stdint.h>
#include <stdio.h>
#include <sys/types.h>

#define TYPE_INC	0
#define TYPE_DEC	1

enum csum {
	CSUM_IP,
	CSUM_UDP,
	CSUM_TCP,
};

struct counter {
	int type;
	uint8_t min, max, inc, val;
	off_t off;
};

struct randomizer {
	off_t off;
};

struct csum16 {
	off_t off, from, to;
	enum csum which;
};

struct packet {
	uint8_t *payload;
	size_t len;
};

struct packet_dyn {
	struct counter *cnt;
	size_t clen;
	struct randomizer *rnd;
	size_t rlen;
	struct csum16 *csum;
	size_t slen;
};

extern int compile_packets(char *file, int verbose, int cpu, bool invoke_cpp);
extern void cleanup_packets(void);

#endif /* TRAFGEN_CONF */
> 2017-02-05ip6_gre: fix ip6gre_err() invalid readsEric Dumazet1-19/+21 2017-02-04netlabel: out of bound access in cipso_v4_validate()Eric Dumazet2-0/+8 2017-02-04ipv4: keep skb->dst around in presence of IP optionsEric Dumazet1-1/+8 2017-02-03net: use a work queue to defer net_disable_timestamp() workEric Dumazet1-18/+13 2017-02-03ethtool: do not vzalloc(0) on registers dumpStanislaw Gruszka1-3/+6 2017-02-03ipv6: sr: remove cleanup flag and fix HMAC computationDavid Lebrun3-38/+10 2017-02-02net: phy: Fix lack of reference count on PHY driverMao Wenan