nut/include/sys/socket.h File Reference

Detailed Description

UDP and TCP socket interface definitions.

#include <cfg/udp.h>
#include <sys/sock_var.h>


#define _SYS_SOCKET_H_
#define AF_INET   2
 internetwork: UDP, TCP, etc.
#define SO_ACCEPTCONN   0x0002
 Socket has had listen().
#define SO_BROADCAST   0x0020
 Permit sending of broadcast msgs.
#define SO_DEBUG   0x0001
 Turn on debugging info recording.
#define SO_DONTROUTE   0x0010
 Just use interface addresses.
#define SO_ERROR   0x1007
 Get error status and clear.
#define SO_KEEPALIVE   0x0008
 Keep connections alive.
#define SO_LINGER   0x0080
 Linger on close if data present.
#define SO_OOBINLINE   0x0100
 Leave received OOB data in line.
#define SO_RCVBUF   0x1002
 Receive buffer size.
#define SO_RCVLOWAT   0x1004
 Receive low-water mark.
#define SO_RCVTIMEO   0x1006
 Receive timeout.
#define SO_REUSEADDR   0x0004
 Allow local address reuse.
#define SO_REUSEPORT   0x0200
 Allow local address & port reuse.
#define SO_SNDBUF   0x1001
 Send buffer size.
#define SO_SNDLOWAT   0x1003
 Send low-water mark.
#define SO_SNDTIMEO   0x1005
 Send timeout.
#define SO_TYPE   0x1008
 Get socket type.
#define SO_USELOOPBACK   0x0040
 Bypass hardware when possible.
#define SOCK_DGRAM   2
 Datagram socket.
#define SOCK_RAW   3
 Raw-protocol interface.
#define SOCK_STREAM   1
 Stream socket.


int NutTcpAbortSocket (TCPSOCKET *sock, uint16_t last_error)
int NutTcpAccept (TCPSOCKET *sock, uint16_t port)
int NutTcpCloseSocket (TCPSOCKET *sock)
int NutTcpConnect (TCPSOCKET *sock, uint32_t addr, uint16_t port)
TCPSOCKETNutTcpCreateSocket (void)
void NutTcpDestroySocket (TCPSOCKET *sock)
int NutTcpDeviceClose (TCPSOCKET *sock)
int NutTcpDeviceIOCtl (TCPSOCKET *sock, int cmd, void *param)
int NutTcpDeviceRead (TCPSOCKET *sock, void *buffer, int size)
int NutTcpDeviceWrite (TCPSOCKET *sock, CONST void *buffer, int size)
void NutTcpDiscardBuffers (TCPSOCKET *sock)
int NutTcpError (TCPSOCKET *sock)
TCPSOCKETNutTcpFindSocket (uint16_t lport, uint16_t rport, uint32_t raddr)
int NutTcpGetSockOpt (TCPSOCKET *sock, int optname, void *optval, int optlen)
int NutTcpInput (NUTDEVICE *dev, NETBUF *nb)
int NutTcpReceive (TCPSOCKET *sock, void *data, int size)
int NutTcpSend (TCPSOCKET *sock, CONST void *data, int len)
int NutTcpSetSockOpt (TCPSOCKET *sock, int optname, CONST void *optval, int optlen)
UDPSOCKETNutUdpCreateSocket (uint16_t port)
int NutUdpDestroySocket (UDPSOCKET *sock)
UDPSOCKETNutUdpFindSocket (uint16_t port)
int NutUdpGetSockOpt (UDPSOCKET *sock, int optname, void *optval, int optlen)
int NutUdpReceiveFrom (UDPSOCKET *sock, uint32_t *addr, uint16_t *port, void *data, int size, uint32_t timeout)
int NutUdpSendTo (UDPSOCKET *sock, uint32_t addr, uint16_t port, void *data, int len)
int NutUdpSetSockOpt (UDPSOCKET *sock, int optname, CONST void *optval, int optlen)

Generated on Wed Apr 29 11:12:30 2009 for BTnut System Software by doxygen 1.5.1
!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!