HOOK_PKT_EVENT(9S) | Data Structures for Drivers | HOOK_PKT_EVENT(9S) |
hook_pkt_event - packet event structure passed through to hooks
#include <sys/neti.h> #include <sys/hook.h> #include <sys/hook_event.h>
illumos DDI specific (illumos 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 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.
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
net_data_t hne_family; phy_if_t hpe_ifp; phy_if_t hpe_ofp; void *hpe_hdr; mblk_t *hpe_mp; mblk_t *hpe_mb; uint32_t hpe_flags;
The following fields are set for each event:
hne_family
hpe_ifp
hpe_ofp
hpe_hdr
hpe_mp
hpe_mb
hpe_flags
HPE_BROADCAST
HPE_MULTICAST
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
May 1, 2008 | OmniOS |