From d275f16591ca44d91ee4e56d65553529a429a62d Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Fri, 29 Jan 2016 00:06:26 +0200 Subject: trafgen: l4: Add UDP header generation logic Add trafgen_l4.c module with generation UDP header fields. UDP protocol generation logic automaticaly sets the protocol field of the lower level protocol to IPPROTO_UDP by default (if it is IPv4). Also checksum & length are calculated and set if it is not given by the user. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- trafgen_l4.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 trafgen_l4.h (limited to 'trafgen_l4.h') diff --git a/trafgen_l4.h b/trafgen_l4.h new file mode 100644 index 0000000..4651009 --- /dev/null +++ b/trafgen_l4.h @@ -0,0 +1,13 @@ +#ifndef TRAFGEN_L4_H +#define TRAFGEN_L4_H + +enum udp_field { + UDP_SPORT, + UDP_DPORT, + UDP_LEN, + UDP_CSUM, +}; + +extern void protos_l4_init(void); + +#endif /* TRAFGEN_L4_H */ -- cgit v1.2.3-54-g00ecf