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 packets.
> 
> Yes sure, we shouldn't depend on it, I think some small helper functions
> inside the netsniff-ng tree could do the job, too.

Hm, I missed this email ... anyway I almost developed generic mechanism
for proto fields generation which uses the low level trafgen's xxx_byte
functions from trafgen_parser.c which I had to export, I have also
implemented ethernet & arp protocol generation based on the common field
generation code, but I can't decide which command line syntax would be good,
so I think that something like this might be ok (we should not follow mz
style right?):

    $ trafgen --dev lo -n 1 eth sa=11:22:33:44:55:66 da=11:22:33:44:55:66, arp 
op=req tip=192.168.1.1

this syntax will allow to easy parse parameters per protocol name just by
split whole cmdline by ",".

Sure I tried to use mz's style but seems it more complicated:

    $ trafgen/trafgen --dev lo eth da = AA:BB:CC:DD:EE:FF,sa=11:22:33:44:55:66 
arp tip=192.168.1.1 -n 1

by more complicated I mean that it will  not allow to use strtok parsing
but for each character, but sure it possible. mz seems parses params
from the whole command line, but I'd like to separate params per
protocol.

Regards,
Vadim Kochan

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to