bsd_socket.c
Go to the documentation of this file.
error_t socketSend(Socket *socket, const void *data, size_t length, size_t *written, uint_t flags)
Send data to a connected socket.
Definition: socket.c:1486
int_t socketSetSoSndBufOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_SNDBUF option.
Definition: bsd_socket_options.c:230
char_t * ipv6AddrToString(const Ipv6Addr *ipAddr, char_t *str)
Convert a binary IPv6 address to a string representation.
Definition: ipv6.c:2329
struct hostent * gethostbyname(const char_t *name)
Host name resolution.
Definition: bsd_socket.c:3292
int_t socketGetTcpMaxSegOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get TCP_MAXSEG option.
Definition: bsd_socket_options.c:3891
int_t socketSetTcpKeepIdleOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set TCP_KEEPIDLE option.
Definition: bsd_socket_options.c:2406
int_t inet_pton(int_t af, const char_t *src, void *dst)
Convert an IPv4 or IPv6 address from text to binary form.
Definition: bsd_socket.c:3947
error_t socketBind(Socket *socket, const IpAddr *localIpAddr, uint16_t localPort)
Associate a local address with a socket.
Definition: socket.c:1316
int_t socketGetTcpKeepIntvlOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get TCP_KEEPINTVL option.
Definition: bsd_socket_options.c:3988
int_t getsourcefilter(int_t s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t *fmode, uint_t *numsrc, struct sockaddr_storage *slist)
Get multicast source filter.
Definition: bsd_socket.c:2673
int_t socketSetSoRcvBufOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_RCVBUF option.
Definition: bsd_socket_options.c:271
int_t socketSetSoNoCheckOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_NO_CHECK option.
Definition: bsd_socket_options.c:353
int_t connect(int_t s, const struct sockaddr *addr, socklen_t addrlen)
Establish a connection to a specified socket.
Definition: bsd_socket.c:204
int_t recvmsg(int_t s, struct msghdr *msg, int_t flags)
Receive a message.
Definition: bsd_socket.c:1115
int_t setsockopt(int_t s, int_t level, int_t optname, const void *optval, socklen_t optlen)
The setsockopt function sets a socket option.
Definition: bsd_socket.c:1672
Helper function for BSD socket API.
int_t socketSetMcastLeaveGroupOption(Socket *socket, const struct group_req *optval, socklen_t optlen)
Set MCAST_LEAVE_GROUP option.
Definition: bsd_socket_options.c:1054
int_t socketGetSoRcvBufOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_RCVBUF option.
Definition: bsd_socket_options.c:2851
int_t socketGetIpv6RecvHopLimitOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_RECVHOPLIMIT option.
Definition: bsd_socket_options.c:3786
int_t socketSetIpv6TrafficClassOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_TCLASS option.
Definition: bsd_socket_options.c:1705
int_t socketSetTcpMaxSegOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set TCP_MAXSEG option.
Definition: bsd_socket_options.c:2362
int_t socketGetSoErrorOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_ERROR option.
Definition: bsd_socket_options.c:2626
const char_t * inet_ntoa(struct in_addr in)
Convert a binary IPv4 address to dot-decimal notation.
Definition: bsd_socket.c:3902
int_t socketSetMcastLeaveSourceGroupOption(Socket *socket, const struct group_source_req *optval, socklen_t optlen)
Set MCAST_LEAVE_SOURCE_GROUP option.
Definition: bsd_socket_options.c:1398
int_t socketGetIpv6MulticastHopsOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_MULTICAST_HOPS option.
Definition: bsd_socket_options.c:3474
int_t shutdown(int_t s, int_t how)
The shutdown function disables sends or receives on a socket.
Definition: bsd_socket.c:2991
int_t recv(int_t s, void *data, size_t size, int_t flags)
Receive data from a connected socket.
Definition: bsd_socket.c:917
int_t socketSetIpv6MulticastHopsOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_MULTICAST_HOPS option.
Definition: bsd_socket_options.c:1828
error_t socketSetMulticastSourceFilter(Socket *socket, const IpAddr *groupAddr, IpFilterMode filterMode, const IpAddr *sources, uint_t numSources)
Set multicast source filter (full-state API)
Definition: socket.c:562
int_t socketGetSoRcvTimeoOption(Socket *socket, struct timeval *optval, socklen_t *optlen)
Get SO_RCVTIMEO option.
Definition: bsd_socket_options.c:2761
int_t socketGetIpTosOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_TOS option.
Definition: bsd_socket_options.c:2987
const char_t * inet_ntop(int_t af, const void *src, char_t *dst, socklen_t size)
Convert an IPv4 or IPv6 address from binary to text.
Definition: bsd_socket.c:4019
int_t listen(int_t s, int_t backlog)
Place a socket in the listening state.
Definition: bsd_socket.c:322
int_t socketSetIpv6MulticastLoopOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_MULTICAST_LOOP option.
Definition: bsd_socket_options.c:1871
const uint8_t res[]
const char_t * inet_ntoa_r(struct in_addr in, char_t *buf, socklen_t buflen)
Convert a binary IPv4 address to dot-decimal notation (reentrant version)
Definition: bsd_socket.c:3919
int_t socketGetIpRecvTtlOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_RECVTTL option.
Definition: bsd_socket_options.c:3331
int_t socketGetTcpKeepIdleOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get TCP_KEEPIDLE option.
Definition: bsd_socket_options.c:3947
void socketFdClr(fd_set *fds, int_t s)
Remove a descriptor from an existing set.
Definition: bsd_socket_misc.c:160
uint_t if_nametoindex(const char_t *ifname)
Map an interface name into its corresponding index.
Definition: bsd_socket.c:3756
@ SOCKET_OPTION_IPV6_RECV_TRAFFIC_CLASS
Definition: socket.h:203
int_t socketSetIpRecvTtlOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_RECVTTL option.
Definition: bsd_socket_options.c:1649
int_t socketSetIpv6UnicastHopsOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_UNICAST_HOPS option.
Definition: bsd_socket_options.c:1746
int_t socketSetIpDropSourceMembershipOption(Socket *socket, const struct ip_mreq_source *optval, socklen_t optlen)
Set IP_DROP_SOURCE_MEMBERSHIP option.
Definition: bsd_socket_options.c:919
int_t socketGetTcpKeepCntOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get TCP_KEEPCNT option.
Definition: bsd_socket_options.c:4030
int_t socketSetSoKeepAliveOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_KEEPALIVE option.
Definition: bsd_socket_options.c:312
int_t socketGetIpv6MulticastLoopOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_MULTICAST_LOOP option.
Definition: bsd_socket_options.c:3520
error_t ipStringToAddr(const char_t *str, IpAddr *ipAddr)
Convert a string representation of an IP address to a binary IP address.
Definition: ip.c:761
int_t socketSetIpv6OnlyOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_V6ONLY option.
Definition: bsd_socket_options.c:2035
int_t socketSetIpDontFragOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_DONTFRAG option.
Definition: bsd_socket_options.c:1482
error_t socketSendMsg(Socket *socket, const SocketMsg *message, uint_t flags)
Send a message to a connectionless socket.
Definition: socket.c:1634
char_t * if_indextoname(uint_t ifindex, char_t *ifname)
Map an interface index into its corresponding name.
Definition: bsd_socket.c:3795
void socketTranslateErrorCode(Socket *socket, error_t errorCode)
Translate error code.
Definition: bsd_socket_misc.c:239
int_t socketSetMcastJoinSourceGroupOption(Socket *socket, const struct group_source_req *optval, socklen_t optlen)
Set MCAST_JOIN_SOURCE_GROUP option.
Definition: bsd_socket_options.c:1303
int_t socketSetIpv6DontFragOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_DONTFRAG option.
Definition: bsd_socket_options.c:2091
int_t socketGetSoReuseAddrOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_REUSEADDR option.
Definition: bsd_socket_options.c:2529
int_t socketSetMcastUnblockSourceOption(Socket *socket, const struct group_source_req *optval, socklen_t optlen)
Set MCAST_UNBLOCK_SOURCE option.
Definition: bsd_socket_options.c:1219
error_t socketReceive(Socket *socket, void *data, size_t size, size_t *received, uint_t flags)
Receive data from a connected socket.
Definition: socket.c:1692
int_t socketGetIpv6RecvTrafficClassOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_RECVTCLASS option.
Definition: bsd_socket_options.c:3733
__weak_func void osFreeMem(void *p)
Release a previously allocated memory block.
Definition: os_port_chibios.c:464
int_t socketGetIpv6DontFragOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_DONTFRAG option.
Definition: bsd_socket_options.c:3626
int_t socket(int_t family, int_t type, int_t protocol)
Create a socket that is bound to a specific transport service provider.
Definition: bsd_socket.c:65
void socketSetErrnoCode(Socket *socket, uint_t errnoCode)
Set BSD error code.
Definition: bsd_socket_misc.c:219
int_t socketGetIpPktInfoOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_PKTINFO option.
Definition: bsd_socket_options.c:3225
int_t socketGetIpv6UnicastHopsOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_UNICAST_HOPS option.
Definition: bsd_socket_options.c:3428
int_t getsockname(int_t s, struct sockaddr *addr, socklen_t *addrlen)
Retrieves the local name for a socket.
Definition: bsd_socket.c:1476
struct hostent * gethostbyname_r(const char_t *name, struct hostent *result, char_t *buf, size_t buflen, int_t *h_errnop)
Host name resolution (reentrant version)
Definition: bsd_socket.c:3315
BSD socket API.
int_t socketGetIpv6OnlyOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_V6ONLY option.
Definition: bsd_socket_options.c:3573
error_t socketReceiveFrom(Socket *socket, IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size, size_t *received, uint_t flags)
Receive a datagram from a connectionless socket.
Definition: socket.c:1714
int_t socketSetIpRecvTosOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_RECVTOS option.
Definition: bsd_socket_options.c:1593
error_t socketReceiveMsg(Socket *socket, SocketMsg *message, uint_t flags)
Receive a message from a connectionless socket.
Definition: socket.c:1894
int_t socketSetIpTtlOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_TTL option.
Definition: bsd_socket_options.c:449
error_t getHostByName(NetInterface *interface, const char_t *name, IpAddr *ipAddr, uint_t flags)
Resolve a host name into an IP address.
Definition: socket.c:2274
int_t socketSetIpAddSourceMembershipOption(Socket *socket, const struct ip_mreq_source *optval, socklen_t optlen)
Set IP_ADD_SOURCE_MEMBERSHIP option.
Definition: bsd_socket_options.c:855
int_t socketSetIpAddMembershipOption(Socket *socket, const struct ip_mreq *optval, socklen_t optlen)
Set IP_ADD_MEMBERSHIP option.
Definition: bsd_socket_options.c:631
int_t socketSetTcpKeepCntOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set TCP_KEEPCNT option.
Definition: bsd_socket_options.c:2488
error_t socketConnect(Socket *socket, const IpAddr *remoteIpAddr, uint16_t remotePort)
Establish a connection to a specified socket.
Definition: socket.c:1349
int_t socketGetSoNoCheckOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_NO_CHECK option.
Definition: bsd_socket_options.c:2935
error_t socketShutdown(Socket *socket, uint_t how)
Disable reception, transmission, or both.
Definition: socket.c:2020
int_t socketSetIpPktInfoOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_PKTINFO option.
Definition: bsd_socket_options.c:1537
Socket * socketOpen(uint_t type, uint_t protocol)
Create a socket (UDP or TCP)
Definition: socket.c:125
in_addr_t inet_addr(const char_t *cp)
Convert a dot-decimal string into binary data in network byte order.
Definition: bsd_socket.c:3833
int_t socketSetIpDropMembershipOption(Socket *socket, const struct ip_mreq *optval, socklen_t optlen)
Set IP_DROP_MEMBERSHIP option.
Definition: bsd_socket_options.c:690
int_t socketSetIpv6RecvHopLimitOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_RECVHOPLIMIT option.
Definition: bsd_socket_options.c:2251
int_t socketSetIpv6AddMembershipOption(Socket *socket, const struct ipv6_mreq *optval, socklen_t optlen)
Set IPV6_ADD_MEMBERSHIP option.
Definition: bsd_socket_options.c:1928
int_t socketGetIpMulticastLoopOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_MULTICAST_LOOP option.
Definition: bsd_socket_options.c:3119
int_t socketGetIpTtlOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_TTL option.
Definition: bsd_socket_options.c:3031
int_t socketSetIpTosOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_TOS option.
Definition: bsd_socket_options.c:408
int_t recvfrom(int_t s, void *data, size_t size, int_t flags, struct sockaddr *addr, socklen_t *addrlen)
Receive a datagram.
Definition: bsd_socket.c:989
Socket * socketAccept(Socket *socket, IpAddr *clientIpAddr, uint16_t *clientPort)
Permit an incoming connection attempt on a socket.
Definition: socket.c:1451
int_t ioctlsocket(int_t s, uint32_t cmd, void *arg)
Control the I/O mode of a socket.
Definition: bsd_socket.c:2833
int_t socketGetIpv6TrafficClassOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_TCLASS option.
Definition: bsd_socket_options.c:3384
int_t socketSetTcpKeepIntvlOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set TCP_KEEPINTVL option.
Definition: bsd_socket_options.c:2447
int_t socketGetSoTypeOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_TYPE option.
Definition: bsd_socket_options.c:2576
int_t bind(int_t s, const struct sockaddr *addr, socklen_t addrlen)
Associate a local address with a socket.
Definition: bsd_socket.c:107
void socketRegisterEvents(Socket *socket, OsEvent *event, uint_t eventMask)
Subscribe to the specified socket events.
Definition: socket_misc.c:195
int_t socketGetSoSndTimeoOption(Socket *socket, struct timeval *optval, socklen_t *optlen)
Get SO_SNDTIMEO option.
Definition: bsd_socket_options.c:2714
error_t socketGetMulticastSourceFilter(Socket *socket, const IpAddr *groupAddr, IpFilterMode *filterMode, IpAddr *sources, uint_t *numSources)
Get multicast source filter.
Definition: socket.c:679
BSD socket options.
int_t socketGetSoBroadcastOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_BROADCAST option.
Definition: bsd_socket_options.c:2667
int_t select(int_t nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout)
Determine the status of one or more sockets.
Definition: bsd_socket.c:3069
Helper functions for sockets.
bool_t osWaitForEvent(OsEvent *event, systime_t timeout)
Wait until the specified event is in the signaled state.
Definition: os_port_chibios.c:229
int_t setipv4sourcefilter(int_t s, struct in_addr interface, struct in_addr group, uint32_t fmode, uint_t numsrc, struct in_addr *slist)
Set multicast source filter (IPv4 only)
Definition: bsd_socket.c:2313
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
int_t socketSetIpUnblockSourceOption(Socket *socket, const struct ip_mreq_source *optval, socklen_t optlen)
Set IP_UNBLOCK_SOURCE option.
Definition: bsd_socket_options.c:802
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
int_t socketSetIpv6DropMembershipOption(Socket *socket, const struct ipv6_mreq *optval, socklen_t optlen)
Set IPV6_DROP_MEMBERSHIP option.
Definition: bsd_socket_options.c:1987
int_t getnameinfo(const struct sockaddr *addr, socklen_t addrlen, char_t *host, size_t hostlen, char_t *serv, size_t servlen, int flags)
Convert a socket address to a corresponding host and service.
Definition: bsd_socket.c:3658
int_t socketSetSoSndTimeoOption(Socket *socket, const struct timeval *optval, socklen_t optlen)
Set SO_SNDTIMEO option.
Definition: bsd_socket_options.c:144
int_t socketSetSoBroadcastOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_BROADCAST option.
Definition: bsd_socket_options.c:107
int_t getipv4sourcefilter(int_t s, struct in_addr interface, struct in_addr group, uint32_t *fmode, uint_t *numsrc, struct in_addr *slist)
Get multicast source filter (IPv4 only)
Definition: bsd_socket.c:2414
int_t accept(int_t s, struct sockaddr *addr, socklen_t *addrlen)
Permit an incoming connection attempt on a socket.
Definition: bsd_socket.c:360
int_t socketGetIpRecvTosOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_RECVTOS option.
Definition: bsd_socket_options.c:3278
int_t socketSetSoRcvTimeoOption(Socket *socket, const struct timeval *optval, socklen_t optlen)
Set SO_RCVTIMEO option.
Definition: bsd_socket_options.c:187
Socket API.
error_t socketSendTo(Socket *socket, const IpAddr *destIpAddr, uint16_t destPort, const void *data, size_t length, size_t *written, uint_t flags)
Send a datagram to a specific destination.
Definition: socket.c:1507
int_t socketGetSoKeepAliveOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_KEEPALIVE option.
Definition: bsd_socket_options.c:2894
int_t getsockopt(int_t s, int_t level, int_t optname, void *optval, socklen_t *optlen)
The getsockopt function retrieves a socket option.
Definition: bsd_socket.c:2024
int_t socketGetIpDontFragOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_DONTFRAG option.
Definition: bsd_socket_options.c:3173
int_t getpeername(int_t s, struct sockaddr *addr, socklen_t *addrlen)
Retrieves the address of the peer to which a socket is connected.
Definition: bsd_socket.c:1572
int_t socketSetIpMulticastTtlOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_MULTICAST_TTL option.
Definition: bsd_socket_options.c:531
error_t ipv4StringToAddr(const char_t *str, Ipv4Addr *ipAddr)
Convert a dot-decimal string to a binary IPv4 address.
Definition: ipv4.c:1368
int_t setsourcefilter(int_t s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t fmode, uint_t numsrc, struct sockaddr_storage *slist)
Set multicast source filter.
Definition: bsd_socket.c:2508
int_t sendto(int_t s, const void *data, size_t length, int_t flags, const struct sockaddr *addr, socklen_t addrlen)
Send a datagram to a specific destination.
Definition: bsd_socket.c:535
int_t socketSetIpMulticastLoopOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IP_MULTICAST_LOOP option.
Definition: bsd_socket_options.c:574
error_t ipv6StringToAddr(const char_t *str, Ipv6Addr *ipAddr)
Convert a string representation of an IPv6 address to a binary IPv6 address.
Definition: ipv6.c:2174
int_t socketSetSoReuseAddrOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set SO_REUSEADDR option.
Definition: bsd_socket_options.c:57
int_t socketSetTcpNoDelayOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set TCP_NODELAY option.
Definition: bsd_socket_options.c:2307
int_t socketSetIpv6MulticastIfOption(Socket *socket, const struct in_addr *optval, socklen_t optlen)
Set IPV6_MULTICAST_IF option.
Definition: bsd_socket_options.c:1789
int_t socketSetIpv6RecvTrafficClassOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_RECVTCLASS option.
Definition: bsd_socket_options.c:2195
int_t getaddrinfo(const char_t *node, const char_t *service, const struct addrinfo *hints, struct addrinfo **res)
Convert host and service names to socket address.
Definition: bsd_socket.c:3389
void socketUnregisterEvents(Socket *socket)
Unsubscribe previously registered events.
Definition: socket_misc.c:250
TCP/IP stack core.
int_t socketSetMcastBlockSourceOption(Socket *socket, const struct group_source_req *optval, socklen_t optlen)
Set MCAST_BLOCK_SOURCE option.
Definition: bsd_socket_options.c:1125
int_t socketSetIpv6PktInfoOption(Socket *socket, const int_t *optval, socklen_t optlen)
Set IPV6_PKTINFO option.
Definition: bsd_socket_options.c:2139
char_t * ipv4AddrToString(Ipv4Addr ipAddr, char_t *str)
Convert a binary IPv4 address to dot-decimal notation.
Definition: ipv4.c:1457
int_t socketGetSoSndBufOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get SO_SNDBUF option.
Definition: bsd_socket_options.c:2808
int_t socketGetIpv6PktInfoOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IPV6_PKTINFO option.
Definition: bsd_socket_options.c:3680
int_t inet_aton(const char_t *cp, struct in_addr *inp)
Convert a dot-decimal string into binary form.
Definition: bsd_socket.c:3867
int_t socketGetTcpNoDelayOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get TCP_NODELAY option.
Definition: bsd_socket_options.c:3839
int_t send(int_t s, const void *data, size_t length, int_t flags)
Send data to a connected socket.
Definition: bsd_socket.c:459
int_t socketGetIpMulticastTtlOption(Socket *socket, int_t *optval, socklen_t *optlen)
Get IP_MULTICAST_TTL option.
Definition: bsd_socket_options.c:3075
uint_t socketGetEvents(Socket *socket)
Retrieve event flags for a specified socket.
Definition: socket_misc.c:273
int_t socketSetMcastJoinGroupOption(Socket *socket, const struct group_req *optval, socklen_t optlen)
Set MCAST_JOIN_GROUP option.
Definition: bsd_socket_options.c:972
int_t socketSetIpMulticastIfOption(Socket *socket, const struct in_addr *optval, socklen_t optlen)
Set IP_MULTICAST_IF option.
Definition: bsd_socket_options.c:492
int_t socketSetIpBlockSourceOption(Socket *socket, const struct ip_mreq_source *optval, socklen_t optlen)
Set IP_BLOCK_SOURCE option.
Definition: bsd_socket_options.c:738
Debugging facilities.
int_t closesocket(int_t s)
The closesocket function closes an existing socket.
Definition: bsd_socket.c:3027
error_t socketListen(Socket *socket, uint_t backlog)
Place a socket in the listening state.
Definition: socket.c:1413