Packet (Pkt) Object
A-10
Get Destination Link Level Address Handle
PktGetLLADst
Syntax
HANDLE PktGetLLADst( HANDLE hPkt );
Return Value
Handle to destination LLA (link-level address) or NULL.
Description
This function is called to get a handle to the link-level destination address for
the packet. The link-level address is abstracted into an object of type LLA,
which is discussed later in this document. To send a packet to an Ethernet de-
vice, both the destination LLA and transmission interface handle must be set.
Get Packet Route
PktGetRoute
Syntax
HANDLE PktGetRoute( HANDLE hPkt );
Return Value
Handle to packet route or NULL.
Description
This function is called to get a handle to the destination route for the packet.
The route can be used by the LLI (link-level info) module to resolve both a
transmission interface and destination link-level address (LLA). If these are al-
ready known, a route is not necessary.
Get the Packet Link Layer Control Header Size
PktGetSizeLLC
Syntax
uint PktGetSizeLLC( HANDLE hPkt );
Return Value
LLC header length or max default if unknown.
Description
This function is called to get the length of the link layer control header. For an
Ethernet packet, this value is usually 14 (some devices may imbed additional
tags). For PPP, the value is 2 (contains only the protocol type). The LLC header
size is used for constructing and deconstructing packets in such a manner that
is independent of the physical packet transport mechanism. When building a
packet for an unknown device, the largest value of all device headers is used.
Get the Packet Network Header Size
PktGetSizeNet
Syntax
uint PktGetSizeNet( HANDLE hPkt );
Return Value
IP header length or NULL is unknown.
Description
This function is called to get the length of the network header. For an IP packet,
this value is usually 20, but can be larger if IP options are present. The network
header size is used for constructing and deconstructing packets in such a
manner that is independent of the IP header and it options.