On Thu, Jan 21, 2016 at 1:19 AM, Vadim Kochan <vadi...@gmail.com> wrote: > Add new trafgen_proto.c module with basic proto > header fields generation logic. > > Each proto must implement proto_gen struct and register it > to the global proto list. > > Proto header consist from set of fields, and each field must be > described via proto_field struct by specifying unique id, len, > offset (relative to the header). Small fields ( < 8 bits) can be > described via left shift & mask. > > On header_init required fields must be added to the packet and > initialized with default values. >
I started to think that I will change logic of adding same proto headers, because in this version same proto header might be added only once, but I think lets user decide the order or headers, so it will allow to easy construct icmp unreach packets like: { eth(...), ip(da=3.3.3.3), icmp(unreach), ip(...) } or build tuneling headers. But sure there will be still automatically adding of lower layer proto when user specify only higher protos. So I will rework it in v2 but you can still look on the main concept of the whole feature. -- 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.