Expand description
Layer binding system for automatic field setting when stacking layers.
For example, when stacking Ether() / ARP(), the Ethernet type field
should automatically be set to 0x0806 (ARP).
Structs§
- Binding
Registry - Registry for custom bindings (runtime-defined).
- Layer
Binding - Describes a binding between two layers.
Statics§
- LAYER_
BINDINGS - Static table of layer bindings.
Functions§
- apply_
binding - Apply binding to set the appropriate field when stacking layers.
- expected_
upper_ layers - Get the expected upper layer kinds for a given lower layer.
- find_
binding - Find the binding for a given layer pair.
- find_
bindings_ from - Find all bindings where the given layer is the lower layer.
- find_
bindings_ to - Find all bindings where the given layer is the upper layer.
- infer_
upper_ layer - Determine the upper layer kind based on field value.