Go to the documentation of this file.
30 #ifndef SOPC_ETH_SOCKETS_H_
31 #define SOPC_ETH_SOCKETS_H_
36 #include "p_sopc_sockets.h"
42 #define ETHERNET_HEADER_SIZE 14
69 const char* destMACaddr,
96 const char* destMACaddr,
97 const char* sourceMACaddr,
void SOPC_ETH_Socket_Close(Socket *sock)
Close the socket connection and/or clear the socket.
SOPC_ReturnStatus SOPC_ETH_Socket_CreateToSend(SOPC_ETH_Socket_SendAddressInfo *sendAddrInfo, bool setNonBlocking, Socket *sock)
Create a new ETH socket using sendAddrInfo properties.
SOPC_ReturnStatus SOPC_ETH_Socket_CreateSendAddressInfo(const char *interfaceName, const char *destMACaddr, SOPC_ETH_Socket_SendAddressInfo **sendAddInfo)
Create a new address information for packet sending.
SOPC_ReturnStatus SOPC_ETH_Socket_ReceiveFrom(Socket sock, const SOPC_ETH_Socket_ReceiveAddressInfo *receiveAddrInfo, bool checkEtherType, uint16_t etherType, SOPC_Buffer *buffer)
Receive data on the ETH socket from given address info.
Bytes buffer structure.
Definition: sopc_buffer.h:38
struct SOPC_ETH_Socket_SendAddressInfo SOPC_ETH_Socket_SendAddressInfo
Socket addressing information for sending operation type.
Definition: sopc_eth_sockets.h:47
SOPC_ReturnStatus SOPC_ETH_Socket_CreateToReceive(SOPC_ETH_Socket_ReceiveAddressInfo *receiveAddrInfo, bool setNonBlocking, Socket *sock)
Create a new ETH socket, bind it using and add membership for multicast if active in receiveAddrInfo....
SOPC_ReturnStatus SOPC_ETH_Socket_SendTo(Socket sock, const SOPC_ETH_Socket_SendAddressInfo *sendAddrInfo, uint16_t etherType, SOPC_Buffer *buffer)
Send data through the ETH socket to given IP address and port.
Definition: p_sopc_sockets.h:30
SOPC_ReturnStatus SOPC_ETH_Socket_CreateReceiveAddressInfo(const char *interfaceName, bool recvMulticast, const char *destMACaddr, const char *sourceMACaddr, SOPC_ETH_Socket_ReceiveAddressInfo **recvAddInfo)
Create a new address information for packet reception.
struct SOPC_ETH_Socket_ReceiveAddressInfo SOPC_ETH_Socket_ReceiveAddressInfo
Socket addressing information for listening operation type.
Definition: sopc_eth_sockets.h:51
A buffer of bytes with a maximum size, length and position.
SOPC_ReturnStatus
Definition: libs2opc_client.h:64