Data Structures for Drivers hookpktevent(9S)
NAME
hookpktevent - packet event structure passed through to
hooks
SYNOPSIS
#include
#include
#include
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
DESCRIPTION
The hookpktevent structure contains fields that relate to
a packet in a network protocol handler. This structure is
passed through to a callback for NHPREROUTING,
NHPOSTROUTING, NHFORWARDING, NHLOPBACKIN and
NHLOPBACKOUT events.
A callback may only modify the hpehdr, hpemp and hpemb
fields.
The following table documents which fields can be safely
used as a result of each event.
Event hpeifp hpeofp hpehdr hpemp hpemb
----- ------- ------- ------- ------ ------
NHPREROUTING yes yes yes yes
NHPOSTROUTING yes yes yes yes
NHFORWARDING yes yes yes yes yes
NHLOPBACKIN yes yes yes yes
NHLOPBACKOUT yes yes yes yes
STRUCTURE MEMBERS
netdatat hnefamily;
phyift hpeifp;
phyift hpeofp;
void *hpehdr;
mblkt *hpemp;
mblkt *hpemb;
uint32t hpeflags;
SunOS 5.11 Last change: 1 May 2008 1
Data Structures for Drivers hookpktevent(9S)
The following fields are set for each event:
hnefamily The protocol family for this packet. This
value matches the corresponding value returned
from a call to netprotocollookup(9F).
hpeifp The inbound interface for a packet.
hpeofp The outbound interface for a packet.
hpehdr Pointer to the start of the network protocol
header within an mblkt structure.
hpemp Pointer to the mblkt pointer that points to
the first mblkt structure in this packet.
hpemb Pointer to the mblkt structure that contains
hpehdr.
hpeflags This field is used to carry additional proper-
ties of packets. The current collection of
defined bits available is:
HPEBROADCAST This bit is set if the packet
was recognized as a broadcast
packet from the link layer.
The bit cannot be set if
HPEMULTICAST is set,
currently only possible with
physical in packet events.
HPEMULTICAST This set if the packet was
recognized as a multicast
packet from the link layer.
This bit cannot be set if
HPEBROADCAST is set,
currently only possible with
physical in packet events.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 1 May 2008 2
Data Structures for Drivers hookpktevent(9S)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
SEE ALSO
netprotocollookup(9F), netinfo(9F)
SunOS 5.11 Last change: 1 May 2008 3
|