30#ifndef SOPC_ETH_SOCKETS_H_
31#define SOPC_ETH_SOCKETS_H_
41#define ETHERNET_HEADER_SIZE 14
68 const char* destMACaddr,
95 const char* destMACaddr,
96 const char* sourceMACaddr,
A buffer of bytes with a maximum size, length and position.
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
SOPC_ReturnStatus SOPC_ETH_Socket_SendTo(SOPC_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.
struct SOPC_ETH_Socket_SendAddressInfo SOPC_ETH_Socket_SendAddressInfo
Socket addressing information for sending operation type.
Definition sopc_eth_sockets.h:46
void SOPC_ETH_Socket_Close(SOPC_Socket *sock)
Close the socket connection and/or clear the socket.
SOPC_ReturnStatus SOPC_ETH_Socket_CreateToReceive(SOPC_ETH_Socket_ReceiveAddressInfo *receiveAddrInfo, bool setNonBlocking, SOPC_Socket *sock)
Create a new ETH socket, bind it using and add membership for multicast if active in receiveAddrInfo....
SOPC_ReturnStatus SOPC_ETH_Socket_ReceiveFrom(SOPC_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.
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.
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.
struct SOPC_ETH_Socket_ReceiveAddressInfo SOPC_ETH_Socket_ReceiveAddressInfo
Socket addressing information for listening operation type.
Definition sopc_eth_sockets.h:50
SOPC_ReturnStatus SOPC_ETH_Socket_CreateToSend(SOPC_ETH_Socket_SendAddressInfo *sendAddrInfo, bool setNonBlocking, SOPC_Socket *sock)
Create a new ETH socket using sendAddrInfo properties.
A platform independent API to use sockets.
Bytes buffer structure.
Definition sopc_buffer.h:38
Socket base type.
Definition p_sopc_sockets.h:36