IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


Socket functions


Detailed Description

This interface provides access to the TCP/IP stack's socket interface for programming TCP/IP applications.

Alternative BSD compatible socket API.

TCPIP API main page

Functions

int socket (int family, int type, int protocol)
 Open an IPv4 or IPv6 socket.
int get_socketerror (int sd)
 Last error value for socket.
int select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 Await events on a set of sockets.
int select_ms (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, long timeout_ms)
 Await or poll events on a set of sockets.
int FD_Next (const fd_set *fds_set, int previous_fds)
 Iterator for sets of sockets.
int GetSocketListIPv4 (SocketInfo *SocketInfoPtr, int maxEntries)
 Retrieve socket information.
int GetSocketList (SocketInfoIPv4v6 *SocketInfoPtr, int maxEntries)
 Retrieve socket information.
unsigned char GetTcpConnectionStateIPv4 (unsigned int localPort, unsigned long *remoteIpAddressPtr, unsigned int *remotePort)
 Get TCP connection state (IPv4-based).
unsigned char GetTcpConnectionState (unsigned int localPort, struct in6_addr *remoteIpAddressPtr, unsigned int *remotePort)
 Get TCP connection state (IPv4 and IPv6 based).
int setreuse (int sd, int *error)
 Set reuse option on a listening socket.
int accept (int sd, struct sockaddr *addressPtr, int *error)
 Accept next incoming connection.
int bind (int sd, const struct sockaddr *addressPtr, int *error)
 Bind a socket.
int connect (int sd, const struct sockaddr *addressPtr, int *error)
 Establish connection.
int listen (int sd, int backlog, int *error)
 Listen for incoming connections.
int recv (int sd, char *bufPtr, int bufLen, int flags, unsigned long timeout, int *error)
 Receive a message from another socket.
int recvfrom (int sd, char *bufptr, int buflen, int flags, unsigned long timeout, struct sockaddr *fromPtr, int *error)
 Receive a datagram from another socket.
int send (int sd, const char *bufptr, int buflen, int flags, int *error)
 Transmit a message.
int sendto (int sd, const char *bufptr, int buflen, int flags, const struct sockaddr *toPtr, int *error)
 Transmit a datagram.
int setsockopt (int sd, const SetSocketOption *sockoptptr, int *error)
 Set socket option.
int getsockopt (int sd, const GetSocketOption *sockoptptr, int *error)
 Retrieve socket option.
int setlinger (int sd, int seconds, int *error)
 Set TCP linger time.
int shutdown (int sd, unsigned char dir, int *error)
 Shutdown a socket.
int closesocket (int sd, int *error)
 Close socket.
int opensocket (unsigned char type, int *error)
 Open an IPv4 socket.
int opensocketIPv4v6 (int family, unsigned char type, int *error)
 Open an IPv4 or IPv6 socket.
int ResetConnection (int sd, int *error)
 Abort a TCP connection.
int GetWaitingBytes (int sd, int *error)
 Bytes available on a socket queue.
int SocketBlockingMode (int sd, unsigned char blocking_mode, int *error)
 Set the blocking mode of a socket.
int Set_IP_Type_Of_Service (int sd, unsigned char tos, int *error)
 Set socket's default IP TOS field.
int RegisterSocketCB (int sd, void *socketCBFuncPtr, int eventFlags, int *error)
 Register a socket callback function.
int sendto_iface (int sd, const char *bufPtr, int bufLen, int flags, const struct sockaddr *toPtr, void *devHandle, int *error)
 Transmit a datagram via interface.
int SendToInterface (int sd, char *bufPtr, int bufLen, int flags, const struct sockaddr *toPtr, int toLen, void *devHandle, unsigned char mhomeIndex)
 Transmit a datagram via interface.
int recvfromto (int sd, char *bufPtr, int bufLen, int flags, unsigned long timeout, struct sockaddr *fromPtr, struct sockaddr *toPtr, int *error)
 Receive a datagram from another socket.
int recvfromto_iface (int sd, char *bufPtr, int bufLen, int flags, unsigned long timeout, struct sockaddr *fromPtr, struct sockaddr *toPtr, unsigned char *fromPhyAddrPtr, int *fromPhyAddrLenPtr, DevUserIfaceHandle *DevHandlePtr, int *error)
 Receive a datagram from another socket.
int tcp_connect (const char *DestIPStr, unsigned int ClientPort, unsigned int HostPort, int *error)
 Open a client TCP/IP socket connection to a specified host.





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:38 2017 by Doxygen 1.6.1