Extend field expression with the following syntax:

    <field>[<index>] | <field>[<index>:<length>]

which allows to specify value or function at specified offset relative to the
field's offset within a header.

The trick to implement this was to use copies of proto_field instances
in the packet_dyn->fields array which allows to specify different functions
for the same field and with different offsets.

Vadim Kochan (7):
  trafgen: parser: Rename field_expr -> field_value_expr rule
  trafgen: proto: Change __proto_field_set_bytes(...) to take field
  trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx
  trafgen: proto: Add proto field only setters/getters
  trafgen: parser: Parse IPv6 address by strict match pattern
  trafgen: parser: Allow to set value/func at field offset
  man: trafgen: Add short description about field offset using

 trafgen.8        |  25 +++++++
 trafgen_l2.c     |  44 +++++------
 trafgen_l3.c     |  24 +++---
 trafgen_l4.c     |  28 +++----
 trafgen_lexer.l  |  51 ++++++++++++-
 trafgen_parser.y | 164 +++++++++++++++++++++++++++++------------
 trafgen_proto.c  | 217 +++++++++++++++++++++++++++++++++++--------------------
 trafgen_proto.h  |  64 +++++++++-------
 8 files changed, 412 insertions(+), 205 deletions(-)

-- 
2.10.2

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