Re: [netsniff-ng] mausezahn: TX fast path ... or may be rewrite everything ?

2015-06-26 Thread Vadim Kochan
On Mon, Jun 22, 2015 at 03:55:01PM +0200, Daniel Borkmann wrote: On 06/21/2015 07:02 PM, Vadim Kochan wrote: ... Not sure if it is necessary to use libnet by trafgen as it is used by mz to generate packets ? It will add the new dependency, but seems it can simplify generation of the proto

[netsniff-ng] [RFC 2/6] str: Add converting cmdline args vector to str

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Move piece of code from netsniff-ng.c to str.c as func which converts cmdline args vector to string. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng.c | 18 ++ str.c | 23 +++ str.h | 1 + 3

[netsniff-ng] [RFC 4/6] trafgen: Add helper to get current packet

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Add current_packet() helper for getting current used packet and make it public to other modules. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen_conf.h | 2 ++ trafgen_parser.y | 5 + 2 files changed, 7 insertions(+) diff --git

[netsniff-ng] [RFC 3/6] trafgen: Export packet manipulation funcs for proto gen

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com 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

[netsniff-ng] [RFC 5/6] str: Add funcs for converting hex string to bytes

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Add str2bytes func for converting hexadecimal string to bytes: abcd a AA:BB - { 0xab 0xcd 0x0a 0xaa 0xbb } It is needed to be used when specifying protocol payload for trafgen proto command line. Signed-off-by: Vadim Kochan vadi...@gmail.com ---

[netsniff-ng] [RFC 1/6] trafgen: Move ctx struct to separated header

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Move ctx struct to trafgen.h to be used from other modules. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen.c | 16 +--- trafgen.h | 21 + 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644

[netsniff-ng] [RFC 0/6] trafgen: Proto generation from command like

2015-06-26 Thread Vadim Kochan
Hi, This is the 1-st try version of how I see the protocol generation API for the trafgen util as mz replacement (at least for better performance). I am sending this just because to get your feedback about conceptual idea, and as soon as I got some basic working version I decided to share the