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
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
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
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
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
---
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
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