8 #include "trafgen_proto.h"
10 #define PROTO_MAX_LAYERS 16
25 uint8_t min
, max
, inc
, val
;
41 struct proto_hdr
*headers
[PROTO_MAX_LAYERS
];
48 struct randomizer
*rnd
;
52 struct proto_field
**fields
;
56 static inline bool packet_dyn_has_elems(struct packet_dyn
*p
)
58 return (p
->clen
|| p
->rlen
|| p
->slen
);
61 static inline bool packet_dyn_has_only_csums(struct packet_dyn
*p
)
63 return (p
->clen
== 0 && p
->rlen
== 0 && p
->slen
);
66 static inline bool packet_dyn_has_fields(struct packet_dyn
*p
)
71 extern void compile_packets_str(char *str
, bool verbose
, unsigned int cpu
);
72 extern void compile_packets(char *file
, bool verbose
, unsigned int cpu
,
73 bool invoke_cpp
, char *const cpp_argv
[]);
74 extern void cleanup_packets(void);
76 extern void set_fill(uint8_t val
, size_t len
);
78 extern struct packet
*current_packet(void);
79 extern uint32_t current_packet_id(void);
80 extern struct packet
*packet_get(uint32_t id
);
82 #endif /* TRAFGEN_CONF */