The hook_pkt_event structure contains fields that relate to a packet in a network protocol handler. This structure is passed through to a callback for NH_PRE_ROUTING, NH_POST_ROUTING, NH_FORWARDING, NH_LOOPBACK_IN and NH_LOOPBACK_OUT events.
A callback may only modify the hpe_hdr, hpe_mp and hpe_mb fields.
The following table documents which fields can be safely used as a result of each event.
The protocol family for this packet. This value matches the corresponding value returned from a call to net_protocol_lookup(9F).
hpe_ifp
The inbound interface for a packet.
hpe_ofp
The outbound interface for a packet.
hpe_hdr
Pointer to the start of the network protocol header within an mblk_t structure.
hpe_mp
Pointer to the mblk_t pointer that points to the first mblk_t structure in this packet.
hpe_mb
Pointer to the mblk_t structure that contains hpe_hdr.
hpe_flags
This field is used to carry additional properties of packets. The current collection of defined bits available is:
HPE_BROADCAST
This bit is set if the packet was recognized as a broadcast packet from the link layer. The bit cannot be set if HPE_MULTICAST is set, currently only possible with physical in packet events.
HPE_MULTICAST
This set if the packet was recognized as a multicast packet from the link layer. This bit cannot be set if HPE_BROADCAST is set, currently only possible with physical in packet events.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes: