Make public such funcs: set_byte, set_fill, set_multi_byte, realloc_packet
to be used by proto gen code. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_conf.h | 5 +++++ trafgen_parser.y | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/trafgen_conf.h b/trafgen_conf.h index f92e14c..b286810 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -45,5 +45,10 @@ struct packet_dyn { extern int compile_packets(char *file, int verbose, int cpu, bool invoke_cpp); extern void cleanup_packets(void); +extern void realloc_packet(void); + +extern void set_multi_byte(uint8_t *s, size_t len); +extern void set_fill(uint8_t val, size_t len); +extern void set_byte(uint8_t val); #endif /* TRAFGEN_CONF */ diff --git a/trafgen_parser.y b/trafgen_parser.y index ee3d476..4719f55 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -121,7 +121,7 @@ static inline void __setup_new_csum16(struct csum16 *s, off_t from, off_t to, s->which = which; } -static void realloc_packet(void) +void realloc_packet(void) { if (test_ignore()) return; @@ -139,7 +139,7 @@ static void realloc_packet(void) __init_new_csum_slot(&packet_dyn[packetd_last]); } -static void set_byte(uint8_t val) +void set_byte(uint8_t val) { struct packet *pkt = &packets[packet_last]; @@ -151,7 +151,7 @@ static void set_byte(uint8_t val) pkt->payload[payload_last] = val; } -static void set_multi_byte(uint8_t *s, size_t len) +void set_multi_byte(uint8_t *s, size_t len) { size_t i; @@ -159,7 +159,7 @@ static void set_multi_byte(uint8_t *s, size_t len) set_byte(s[i]); } -static void set_fill(uint8_t val, size_t len) +void set_fill(uint8_t val, size_t len) { size_t i; struct packet *pkt = &packets[packet_last]; -- 2.4.2 -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to netsniff-ng+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.