![Texas TMS320C6000 Programmer'S Reference Manual Download Page 161](http://html.mh-extra.com/html/texas/tms320c6000/tms320c6000_programmers-reference-manual_1093844161.webp)
Interface (IF) Object
A-27
Internal Stack Functions
Create a Packet Object for Transmission
IFCreatePacket
Syntax
HANDLE IFCreatePacket( uint SizePayload, uint SizeNet, uint SizeTP );
Return Value
Handle to new packet or NULL on allocation error.
Description
This function is probably the most useful of the IF functions. It is called to create
a packet object to send packets out of the stack. It uses information collected
from the physical devices to create a packet that can be transmitted on any of
the physical devices in the system. It does this by applying worst case header
and padding sizes. A packet Frag object is also created and attached to the
packet.
The value of SizePayload is the size of the packet without the layer 2 header.
The value of SizeNet and SizeTP is the size of the network header and trans-
port to be associated with the packet (see the section of the Packet object for
more information). These latter two parameters are informational only, and
can be NULL. They don’t affect the size of the buffer (they are included in the
SizePayload parameter).