TCPIP_IPV6_PayloadSet Function
C
unsigned short TCPIP_IPV6_PayloadSet(
IPV6_PACKET * pkt,
uint8_t* payload,
unsigned short len
);
Description
This function will allocate a data segment header and append it to the end of a chain of segments in a TX packet. It will set the data pointer in the packet segment to a pre-existing buffer of data.
Preconditions
TCPIP_IPV6_Initialize() should be called. TCPIP_IPV6_InterfaceIsReady should be true.
Parameters
Parameters | Description |
---|---|
ptrPacket | The packet. |
payload | Address of the data payload. |
len | Length of the data payload. |
Returns
IPV6_ADDR *
The amount of data added to the packet length - On Success.
0 - On Failure.
Remarks
This function is useful for adding payloads to outgoing packets without copying them if the data is in another pre-existing buffer (i.e., TCP).