Method ITcIoUdpProtocolRecv:ReceiveData
Is called by the TCP/UDP RT module as a callback to transfer data.
Syntax
HRESULT TCOMAPI ReceiveData(ULONG ipAddr, USHORT udpDestPort, USHORT udpSrcPort, ULONG nData, PVOID pData, ETYPE_VLAN_HEADER* pVlan=0)
Return value
Type | Description |
---|---|
HRESULT | Indicates success and must be provided accordingly by the implemented module. |
Parameter
Name | Type | Description |
---|---|---|
ipAddr | ULONG | The IP address of the sender. |
udpDestPort | USHORT | Port on which the data was received. |
udpSrcPort | USHORT | Port of the sender. |
nData | ULONG | Number of bytes received. |
pData | PVOID | Pointer to the received data. |
pVlan | ETYPE_VLAN_HEADER | ETYPE_VLAN_HEADER structure - see below. |
The VLAN header represents information about the VLAN.
typedef struct _ETYPE_VLAN_HEADER
{
USHORT VLanType;
unsigned short VLanIdH : 4;
unsigned short reserved1 : 1;
unsigned short Priority : 3;
unsigned short VLanIdL : 8;
} ETYPE_VLAN_HEADER, *PETYPE_VLAN_HEADER;