repo.or.cz
/
netsniff-ng.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
trafgen: Change signature of compile_packets() to match provided types
[netsniff-ng.git]
/
trafgen_conf.h
blob
aee385e13260d26dda763260b90e77095001949a
1
#ifndef TRAFGEN_CONF
2
#define TRAFGEN_CONF
3
4
#include <stdint.h>
5
#include <stdio.h>
6
#include <sys/types.h>
7
8
#define TYPE_INC 0
9
#define TYPE_DEC 1
10
11
enum
csum
{
12
CSUM_IP
,
13
CSUM_UDP
,
14
CSUM_TCP
,
15
CSUM_UDP6
,
16
CSUM_TCP6
,
17
};
18
19
struct
counter
{
20
int
type
;
21
uint8_t
min
,
max
,
inc
,
val
;
22
off_t off
;
23
};
24
25
struct
randomizer
{
26
off_t off
;
27
};
28
29
struct
csum16
{
30
off_t off
,
from
,
to
;
31
enum
csum which
;
32
};
33
34
struct
packet
{
35
uint8_t
*
payload
;
36
size_t
len
;
37
};
38
39
struct
packet_dyn
{
40
struct
counter
*
cnt
;
41
size_t
clen
;
42
struct
randomizer
*
rnd
;
43
size_t
rlen
;
44
struct
csum16
*
csum
;
45
size_t
slen
;
46
};
47
48
extern
void
compile_packets
(
char
*
file
,
bool
verbose
,
unsigned int
cpu
,
bool
invoke_cpp
);
49
extern
void
cleanup_packets
(
void
);
50
51
#endif
/* TRAFGEN_CONF */