![Texas TMS320C6000 Programmer'S Reference Manual Download Page 141](http://html.mh-extra.com/html/texas/tms320c6000/tms320c6000_programmers-reference-manual_1093844141.webp)
Packet (Pkt) Object
A-7
Internal Stack Functions
the section on the FRAG object). The size of the individual layers can be ob-
tained from the size properties SizeLLCHdr, SizeNetHdr, and SizeTPHdr.
When a packet is created with the generic interface (IF) API (discussed later),
these properties are initialized with the standard header sizes for their respec-
tive types. So even when the headers are not “valid”, an appropriate header
size can usually be found in the header size property. This allows higher level
protocols to leave sufficient room in the packet data area to place the lower
level headers. In the event that a header is larger than the default size, the
packet data will have to be moved.
Building and decoding packet data is discussed further in the following Frag-
ment object section.
A.3.2 Object Type
Static – Packet (PKT) objects are owned and destroyed by a single entity.
Passing a packet handle to a function is considered transfer of ownership.
A.3.3 API Function Overview
The PKT API is extensive, and most programmers will never need to call it, but
as it is so central to the design of the stack, the entire API is presented here
for completeness.
Create/Destroy Functions:
PktNew()
Create New Packet Handle
PktFree()
Destroy Packet Handle
Get Property Functions:
PktGetEthType()
Get the Packet Ethertype
PktGetFlags()
Get Packet Flags
PktGetFrag()
Attach a Packet Fragment Handle to a Packet
PktGetIFRx()
Get the Receive (Ingress) Interface Handle
PktGetIFTx()
Get the Transmit (Egress) Interface Handle
PktGetLLADst()
Get Destination Link Level Address Handle
PktGetRoute()
Get Packet Route
PktGetSizeLLC()
Get the Packet Link Layer Control Header Size
PktGetSizeNet()
Get the Packet Network Header Size
PktGetSizeTP()
Get the Packet Transport Header Size
Set Property Functions:
PktSetEthType()
Set the Packet Ethertype
PktSetFlagsClear()
Clear Packet Flags
PktSetFlagsSet()
Set Packet Flags