[netsniff-ng] [PATCH 3/3] trafgen: Dump proto headers in *.cfg format

2017-07-29 Thread Vadim Kochan
Added trafgen_dump.c module which dumps headers from packet in .cfg format. Packet is dumped if -o .cfg was specified, it might be useful to specify *.pcap file as input and convert it into .cfg file to edit proto fields in human readable format. To make it possible several main changes were added

[netsniff-ng] [PATCH 0/3] trafgen: Add dump of proto headers into *.cfg format

2017-07-29 Thread Vadim Kochan
Added trafgen_dump.c module which dumps headers from packet in .cfg format. Packet is dumped if -o .cfg was specified, it might be useful to specify *.pcap file as input and convert it into .cfg file to edit proto fields in human readable format. To make it possible several main changes were added

[netsniff-ng] [PATCH 1/3] trafgen: Get packet from proto_hdr if possible

2017-07-29 Thread Vadim Kochan
Replace using current_packet() by new proto_hdr_packet(hdr) function to obtain packet directly from header. This is more generic and flexible way, because it guarantees that packet really belongs to the header, which in case in current_packet() is not right because it means getting of last allocate

[netsniff-ng] [PATCH 2/3] trafgen: dev_io: Change read/write to specify struct packet *

2017-07-29 Thread Vadim Kochan
Refactor dev_io_ops read & write to specify struct packet *, it may simplify a bit a caller logic. And it allow to keep required members within one struct packet object. Signed-off-by: Vadim Kochan --- trafgen.c| 25 - trafgen_conf.h | 2 +- trafgen_dev.c|

[netsniff-ng] [PATCH v2 3/3] trafgen: Dump proto headers in *.cfg format

2017-07-29 Thread Vadim Kochan
Added trafgen_dump.c module which dumps headers from packet in .cfg format. Packet is dumped if -o .cfg was specified, it might be useful to specify *.pcap file as input and convert it into .cfg file to edit proto fields in human readable format. To make it possible several main changes were added

[netsniff-ng] [PATCH v2 0/3] trafgen: Add dump of proto headers into *.cfg format

2017-07-29 Thread Vadim Kochan
Added trafgen_dump.c module which dumps headers from packet in .cfg format. Packet is dumped if -o .cfg was specified, it might be useful to specify *.pcap file as input and convert it into .cfg file to edit proto fields in human readable format. To make it possible several main changes were added

[netsniff-ng] [PATCH v2 2/3] trafgen: dev_io: Change read/write to specify struct packet *

2017-07-29 Thread Vadim Kochan
Refactor dev_io_ops read & write to specify struct packet *, it may simplify a bit a caller logic. And it allow to keep required members within one struct packet object. Signed-off-by: Vadim Kochan --- trafgen.c| 25 - trafgen_conf.h | 2 +- trafgen_dev.c|

[netsniff-ng] [PATCH v2 1/3] trafgen: Get packet from proto_hdr if possible

2017-07-29 Thread Vadim Kochan
Replace using current_packet() by new proto_hdr_packet(hdr) function to obtain packet directly from header. This is more generic and flexible way, because it guarantees that packet really belongs to the header, which in case in current_packet() is not right because it means getting of last allocate