next up previous contents
Next: Buckets Up: Under the hood Previous: Under the hood   Contents

Field roots

To access information that is not contained in packet data, e.g. meta-information generated by the kernel, other roots than raw can be used with the field_root construct:

field my_meta_data = field_root(10);
field foo = my_meta_data[10].ns;

Field roots are numbered, and each number corresponds to a separate address space, in which fields can be defined by offset. Field root numbers below ten are reserved for internal or future use by tcng and cannot be accessed with the field_root construct.

Currently, the following field root numbers are assigned:
Number Description
0 Packet content
1 Packet meta-data

Implementation note: field roots above one are currently only supported at the ``external'' interface. Field root numbers correspond to offset group numbers. Note that tcc auto-assigns offset group numbers starting with 100, so user-defined field roots should be in the range 10 to 99.



Martin A. Brown 2003-11-06