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
flowtop: Simplify assignment of flow_entry->is_visible
[netsniff-ng.git]
/
trafgen_conf.h
blob
f92e14c2b4adfef9b24c712de74fc7698c24b93c
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
};
16
17
struct
counter
{
18
int
type
;
19
uint8_t
min
,
max
,
inc
,
val
;
20
off_t off
;
21
};
22
23
struct
randomizer
{
24
off_t off
;
25
};
26
27
struct
csum16
{
28
off_t off
,
from
,
to
;
29
enum
csum which
;
30
};
31
32
struct
packet
{
33
uint8_t
*
payload
;
34
size_t
len
;
35
};
36
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
;
44
};
45
46
extern
int
compile_packets
(
char
*
file
,
int
verbose
,
int
cpu
,
bool
invoke_cpp
);
47
extern
void
cleanup_packets
(
void
);
48
49
#endif
/* TRAFGEN_CONF */