Functions | |
int | RawEthSockNew (int Family, int Type, int Protocol, int RxBufSize, int TxBufSize, HANDLE *phSock) |
int | RawEthSockClose (HANDLE h) |
int | RawEthSockCheck (HANDLE h, int IoType) |
int | RawEthSockStatus (HANDLE h, int request, int *results) |
int | RawEthSockShutdown (HANDLE h, int how) |
int | RawEthSockSet (HANDLE hSock, int Type, int Prop, void *pbuf, int size) |
int | RawEthSockGet (HANDLE hSock, int Type, int Prop, void *pbuf, int *psize) |
int | RawEthSockRecvNC (HANDLE h, PBM_Pkt **ppPkt) |
int | RawEthSockSend (HANDLE h, char *pBuf, INT32 size, INT32 *pRetSize) |
int | RawEthSockSendNC (HANDLE h, char *pBuf, INT32 size, HANDLE hPkt, INT32 *pRetSize) |
int | RawEthSockNotify (HANDLE h, int Notification) |
PBM_Pkt * | RawEthSockCreatePacket (HANDLE hSock, UINT32 Payload, UINT32 *pError) |
int RawEthSockCheck | ( | HANDLE | h, | |
int | IoType | |||
) |
Description
The function is called to determine if there is any operation pending on the socket.
[in] | h | Socket Handle which needs to be checked. |
[in] | IoType | Type of operation which is pending. |
1 | - Operation is pending | |
0 | - Operation is not pending |
int RawEthSockClose | ( | HANDLE | h | ) |
Description
The function closes a Raw ethernet Socket.
[in] | h | Socket Handle which is to be closed. |
Success | - 0 | |
Error | - Non Zero |
PBM_Pkt* RawEthSockCreatePacket | ( | HANDLE | hSock, | |
UINT32 | Payload, | |||
UINT32 * | pError | |||
) |
Description
The function creates a Raw Ethernet packet for the SOCKRAWETH Family.
[in] | hSock | Handle of the socket for which the packet is being created. |
[in] | Payload | Size of the packet |
[in] | pError | Pointer to propagate back any errors from this API. |
Success | - Pointer to the packet created | |
Error | - NULL |
int RawEthSockGet | ( | HANDLE | hSock, | |
int | Type, | |||
int | Prop, | |||
void * | pbuf, | |||
int * | psize | |||
) |
Description
The function is used to get the socket parameters
[in] | hSock | Handle to the socket. |
[in] | Type | Socket Level which is to be configured.
|
[in] | Prop | The Property which needs to be configured. |
[out] | pbuf | Data buffer where the value of property will be stored. |
[out] | psize | Size of the Data buffer |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockNew | ( | int | Family, | |
int | Type, | |||
int | Protocol, | |||
int | RxBufSize, | |||
int | TxBufSize, | |||
HANDLE * | phSock | |||
) |
Description
The function creates a new Raw Ethernet Socket.
[in] | Family | Socket Family. Only AF_RAWETH is supported. |
[in] | Type | The type of socket being created
|
[in] | Protocol | Valid Values are 0, IPPROTO_UDP and IPPROTO_TCP. |
[in] | RxBufSize | Receive buffer size of the Socket. |
[in] | TxBufSize | Transmit buffer size of the Socket. |
[out] | phSock | Socket Handle which is returned. |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockNotify | ( | HANDLE | h, | |
int | Notification | |||
) |
Description
This function is called by RawEthernet object to notify the socket of any read/write/connection status activity.
[in] | h | Socket handle on which activity has been detected |
[in] | Notification | Notification Event detected. |
1 | - Message was accepted | |
0 | - Message was not accepted |
int RawEthSockRecvNC | ( | HANDLE | h, | |
PBM_Pkt ** | ppPkt | |||
) |
Description
The function receives data from a socket without copy.
[in] | h | Socket Handle from where data has to be read. |
[in] | ppPkt | Pointer in which the packet received will be returned. |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockSend | ( | HANDLE | h, | |
char * | pBuf, | |||
INT32 | size, | |||
INT32 * | pRetSize | |||
) |
Description
The function send data out using a socket. This is the "copy" implementation of send() wherein the data buffer is copied over by the L3 before being sent out. Thus, the buffer allocation and free is responsibility of the application.
[in] | h | Socket Handle from where data has to be send out |
[in] | pBuf | Data Buffer which contains the data to be sent out. |
[in] | size | Size of the data buffer passed. |
[in] | pRetSize | Total number of data bytes actually sent out. |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockSendNC | ( | HANDLE | h, | |
char * | pBuf, | |||
INT32 | size, | |||
HANDLE | hPkt, | |||
INT32 * | pRetSize | |||
) |
Description
The function send data out using a socket without copy.
[in] | h | Socket Handle from where data has to be send out |
[in] | pBuf | Data Buffer which contains the data to be sent out. |
[in] | size | Size of the data buffer passed. |
[in] | hPkt | Handle to the packet that needs to be sent out on wire. |
[in] | pRetSize | Total number of data bytes actually sent out. |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockSet | ( | HANDLE | hSock, | |
int | Type, | |||
int | Prop, | |||
void * | pbuf, | |||
int | size | |||
) |
Description
The function is used to set the socket parameters
[in] | hSock | Handle to the socket. |
[in] | Type | Socket Level which is to be configured.
|
[in] | Prop | The Property which needs to be configured. |
[in] | pbuf | Data buffer where the value of property is present |
[in] | size | Size of the Data buffer |
Success | - 0 | |
Error | - Non Zero |
int RawEthSockShutdown | ( | HANDLE | h, | |
int | how | |||
) |
Description
The function shuts down the raw ethernet socket.
[in] | h | Socket Handle which is to be shutdown. |
[out] | how |
|
Always | returns 0. |
int RawEthSockStatus | ( | HANDLE | h, | |
int | request, | |||
int * | results | |||
) |
Description
The function returns the socket status.
[in] | h | Socket Handle which needs to be checked. |
[in] | request | Type of request |
[out] | results | Result buffer which has the result of the request. |
Success | - 0 | |
Error | - Non Zero |