On Mon, Nov 09, 2015 at 12:47:01PM +0100, Daniel Borkmann wrote: > On 11/09/2015 12:26 PM, vkochan wrote: > ... > >If you conceptually agree with this idea, I probably may re-work series > >and add separate '-p, --pkt' option for the specify packet language from > >command line, or additionally send this as separate patch. > > Can you elaborate on "specify packet language"? Well I 'd like to do it. I can start probably from ethernet, arp & ip headers so it will probably show how to implement layer interaction.
I am not sure that I am good in parsers, but I can try. > > With this patch set, we support specifying a packet from a file or via > cmdline. > Both end up being pushed through the *same* lexer/parser, I think that is > good. > > What we could end up doing on top of this is to further simplify the > configuration > on top of this. Say a user just wants to push a TCP SYN packet (or DNS > request, or > ...), for example, with random source addresses to a fixed destination > address. > > Then I think, it would be good to have a means of "templates" for such things > that would expand/rewrite internally into the lower level trafgen > representation > we have right now. How I see it, is to extend the current "packet language" to allow specify the mausezahn-like syntax (I just pointed mausezahn-like as an example). Probably per each packet header there will be some specific keyword's/fields/options, hence each packet will have probably own syntax rules. Some time ago I 've pushed about 10 patches which allows to trafgen use some similar syntax like in mausezahn but via manual string parsing, but you suggested another way (which I am trying to achieve) - to extend packet config language with ability to specify the same syntax from cfg file and from command line. Regards, -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
