summaryrefslogtreecommitdiff
path: root/trafgen_conf.h
blob: dddee8cc8a26737f039d4572465536ec8f50dd47 (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
50
51
52
53
54
55
56
57
58
59
60
61
#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,
	CSUM_UDP6,
	CSUM_TCP6,
};

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;
};

static inline bool packet_dyn_has_elems(struct packet_dyn *p)
{
	return (p->clen || p->rlen || p->slen);
}

static inline bool packet_dyn_has_only_csums(struct packet_dyn *p)
{
	return (p->clen == 0 && p->rlen == 0 && p->slen);
}

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

#endif /* TRAFGEN_CONF */
wo separate ones, as both branches really contain both fixes and cleanups. * next/cleanup: ARM: debug: remove extraneous DEBUG_HI3716_UART option ARM: davinci: use IRQCHIP_DECLARE for cp_intc ARM: davinci: remove unused DA8XX_NUM_UARTS ARM: davinci: simplify call to of populate ARM: DaVinci USB: removed deprecated properties from MUSB config ARM: rockchip: Fix use of plain integer as NULL pointer ARM: realview: hide unused 'pmu_device' object soc: versatile: dynamically detect RealView HBI numbers * next/fixes-non-critical: ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats ARM: dts: exynos: Fix regulator name to avoid forbidden character on exynos4210-trats ARM: dts: exynos: Add MFC memory banks for Peach boards ARM: OMAP2+: n900 needs MMC slot names for legacy user space ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51 ARM: EXYNOS: Properly skip unitialized parent clock in power domain on ARM: OMAP2+: Simplify auxdata by using the generic match of/platform: Allow secondary compatible match in of_dev_lookup
Diffstat (limited to '.gitignore')