HOOK_PKT_EVENT(9S)HOOK_PKT_EVENT(9S)NAMEhook_pkt_event - packet event structure passed through to hooks
Solaris DDI specific (Solaris DDI).
The hook_pkt_event structure contains fields that relate to a packet in
a network protocol handler. This structure is passed through to a call‐
back 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.
Event hpe_ifp hpe_ofp hpe_hdr hpe_mp hpe_mb
NH_PRE_ROUTING yes yes yes yes
NH_POST_ROUTING yes yes yes yes
NH_FORWARDING yes yes yes yes yes
NH_LOOPBACK_IN yes yes yes yes
NH_LOOPBACK_OUT yes yes yes yes
The following fields are set for each event:
The protocol family for this packet. This value matches
the corresponding value returned from a call to net_pro‐
The inbound interface for a packet.
The outbound interface for a packet.
Pointer to the start of the network protocol header
within an mblk_t structure.
Pointer to the mblk_t pointer that points to the first
mblk_t structure in this packet.
Pointer to the mblk_t structure that contains hpe_hdr.
This field is used to carry additional properties of pack‐
ets. The current collection of defined bits available is:
This bit is set if the packet was recog‐
nized as a broadcast packet from the link
layer. The bit cannot be set if HPE_MUL‐
TICAST is set, currently only possible
with physical in packet events.
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.
See attributes(5) for descriptions of the following attributes:
│ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
│Interface Stability │ Committed │
SEE ALSOnet_protocol_lookup(9F), netinfo(9F)
May 1, 2008 HOOK_PKT_EVENT(9S)