[netsniff-ng] Re: New trafgen syntax and some ICMP examples

2017-01-07 Thread Jesper Dangaard Brouer
On Thu, 5 Jan 2017 18:45:59 +0200
Vadim Kochan  wrote:

> On Thu, Jan 05, 2017 at 04:00:36PM +0100, Jesper Dangaard Brouer wrote:
> > Hi Vadim,
> > 
> > I just noticed the new trafgen syntax, I really like it.
> > 
> > I was playing with testing the kernels ICMP handling code and
> > validating some change to the icmp rate-limiting, and wrote an trafgen
> > conf for generating a "big" enough ping flood (as hping was not fast
> > enough, and ping ratelimit itself).
> > 
> > Old syntax here[1] and new[2].
> >  [1] 
> > https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp01_ping_flood.trafgen
> >  [2] 
> > https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp02_ping_flood.trafgen
> > 
> > With the old syntax I could not express the seq number increment
> > correctly (only 1 byte updated), with the new syntax I can.  The old
> > dinc() is sort of "broken" IHMO.
> > 
> > Commits[3] showing the transformation:
> >  [3] https://github.com/netoptimizer/network-testing/commits/2b26ad7e66
> > 
> > Thanks!
> > -- 
> > Best regards,
> >   Jesper Dangaard Brouer
> >   MSc.CS, Principal Kernel Engineer at Red Hat
> >   LinkedIn: http://www.linkedin.com/in/brouer  
> 
> Hi Jesper,
> 
> Yes, while introducing these proto dynamic functions I realized that
> logic for the old/low-level "dinc" does not work well, and I tried add
> separate implementation for new "dinc", I will try to unify them to use
> only one logic.

That sounds like a good idea to me :-)
In the code the two variants of dinc() are quite different.

Another thing, I would like to assign "csum" the value/result of e.g.
csumip(14, 33) by the syntax don't allow this.  Example see[1].  I
tried to add it to the syntax myself, but it has been too long since I
used bison/yacc (approx 20 years ;-)).

[1] https://github.com/netoptimizer/network-testing/commit/e9d41df6493000348

Thanks for working trafgen :-)
-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

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


[netsniff-ng] Re: New trafgen syntax and some ICMP examples

2017-01-05 Thread Vadim Kochan
On Thu, Jan 05, 2017 at 04:00:36PM +0100, Jesper Dangaard Brouer wrote:
> Hi Vadim,
> 
> I just noticed the new trafgen syntax, I really like it.
> 
> I was playing with testing the kernels ICMP handling code and
> validating some change to the icmp rate-limiting, and wrote an trafgen
> conf for generating a "big" enough ping flood (as hping was not fast
> enough, and ping ratelimit itself).
> 
> Old syntax here[1] and new[2].
>  [1] 
> https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp01_ping_flood.trafgen
>  [2] 
> https://github.com/netoptimizer/network-testing/blob/master/trafgen/icmp02_ping_flood.trafgen
> 
> With the old syntax I could not express the seq number increment
> correctly (only 1 byte updated), with the new syntax I can.  The old
> dinc() is sort of "broken" IHMO.
> 
> Commits[3] showing the transformation:
>  [3] https://github.com/netoptimizer/network-testing/commits/2b26ad7e66
> 
> Thanks!
> -- 
> Best regards,
>   Jesper Dangaard Brouer
>   MSc.CS, Principal Kernel Engineer at Red Hat
>   LinkedIn: http://www.linkedin.com/in/brouer

Hi Jesper,

Yes, while introducing these proto dynamic functions I realized that
logic for the old/low-level "dinc" does not work well, and I tried add
separate implementation for new "dinc", I will try to unify them to use
only one logic.

Thanks!

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