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