Packet (Pkt) Object
A-8
PktSetFrag()
Attach a Packet Fragment Handle to a Packet
PktSetIFRx()
Set Receive (Ingress) Interface Handle
PktSetIFTx()
Set Transmit (Egress) Interface Handle
PktSetLLADst()
Set Destination Link Level Address Handle
PktSetRoute()
Set Packet Route
PktSetSizeLLC()
Set the Packet Link Layer Control Header Size
PktSetSizeNet()
Set the Packet Network Header Size
PktSetSizeTP()
Set the Packet Transport Header Size
A.3.4 API Function Description
Create New Packet Handle
PktNew
Syntax
HANDLE PktNew();
Return Value
Handle to packet or NULL on memory allocation error.
Description
This function is called to create a new packet handle. When first created, the
packet is entirely uninitialized.
Destroy Packet Handle
PktFree
Syntax
void PktFree( HANDLE hPkt );
Return Value
nothing
Description
This function is called to destroy a packet. When called, all objects associated
with the packet are dereferenced or destroyed.
Get the Packet Ethertype
PktGetEthType
Syntax
uint PktGetEthType( HANDLE hPkt );
Return Value
Ethertype value or NULL on error.
Description
This function is called to get the ethertype for the packet. The ethertype is a
two byte value that is contained in the Ethernet header along with the destina-
tion and source MAC addresses. For a packet being transmitted, this type is
used to construct the Ethernet header. For packets that have been received,
this value contains the ethertype found in the ingress header.