wut  v1.5.0
Wii U Toolchain
Data Structures | Macros | Typedefs | Functions
socket.h File Reference
#include <stdint.h>
#include <sys/time.h>
Include dependency graph for socket.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sockaddr
 
struct  sockaddr_storage
 
struct  linger
 

Macros

#define SOL_SOCKET   -1
 
#define PF_UNSPEC   0
 
#define PF_INET   2
 
#define AF_UNSPEC   PF_UNSPEC
 
#define AF_INET   PF_INET
 
#define SOCK_STREAM   1
 
#define SOCK_DGRAM   2
 
#define MSG_OOB   0x0001
 
#define MSG_PEEK   0x0002
 
#define MSG_DONTROUTE   0x0004
 
#define MSG_DONTWAIT   0x0020
 
#define SHUT_RD   0
 
#define SHUT_WR   1
 
#define SHUT_RDWR   2
 
#define SO_REUSEADDR   0x0004
 
#define SO_KEEPALIVE   0x0008
 
#define SO_DONTROUTE   0x0010
 
#define SO_BROADCAST   0x0020
 
#define SO_LINGER   0x0080
 
#define SO_OOBINLINE   0x0100
 
#define SO_TCPSACK   0x0200
 
#define SO_WINSCALE   0x0400
 
#define SO_SNDBUF   0x1001
 
#define SO_RCVBUF   0x1002
 
#define SO_SNDLOWAT   0x1003
 
#define SO_RCVLOWAT   0x1004
 
#define SO_ERROR   0x1007
 
#define SO_TYPE   0x1008
 
#define SO_HOPCNT   0x1009
 
#define SO_MAXMSG   0x1010
 
#define SO_RXDATA   0x1011
 
#define SO_TXDATA   0x1012
 
#define SO_MYADDR   0x1013
 
#define SO_NBIO   0x1014
 
#define SO_BIO   0x1015
 
#define SO_NONBLOCK   0x1016
 
#define SO_UNKNOWN1019   0x1019
 
#define SO_UNKNOWN101A   0x101A
 
#define SO_UNKNOWN101B   0x101B
 
#define SO_NOSLOWSTART   0x4000
 
#define SO_RUSRBUF   0x10000
 

Typedefs

typedef uint32_t socklen_t
 
typedef uint16_t sa_family_t
 

Functions

int accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
int bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen)
 
int connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen)
 
int getpeername (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
int getsockname (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
int getsockopt (int sockfd, int level, int optname, void *optval, socklen_t *optlen)
 
int listen (int sockfd, int backlog)
 
ssize_t recv (int sockfd, void *buf, size_t len, int flags)
 
ssize_t recvfrom (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)
 
ssize_t send (int sockfd, const void *buf, size_t len, int flags)
 
ssize_t sendto (int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)
 
int setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen)
 
int shutdown (int sockfd, int how)
 
int socket (int domain, int type, int protocol)
 
int sockatmark (int sockfd)
 

Data Structure Documentation

◆ sockaddr

struct sockaddr

Definition at line 59 of file socket.h.

Data Fields
sa_family_t sa_family
char sa_data[]

◆ sockaddr_storage

struct sockaddr_storage

Definition at line 65 of file socket.h.

Data Fields
sa_family_t ss_family
char ss_padding[14]

◆ linger

struct linger

Definition at line 71 of file socket.h.

Data Fields
int l_onoff
int l_linger

Macro Definition Documentation

◆ SOL_SOCKET

#define SOL_SOCKET   -1

Definition at line 5 of file socket.h.

◆ PF_UNSPEC

#define PF_UNSPEC   0

Definition at line 7 of file socket.h.

◆ PF_INET

#define PF_INET   2

Definition at line 8 of file socket.h.

◆ AF_UNSPEC

#define AF_UNSPEC   PF_UNSPEC

Definition at line 10 of file socket.h.

◆ AF_INET

#define AF_INET   PF_INET

Definition at line 11 of file socket.h.

◆ SOCK_STREAM

#define SOCK_STREAM   1

Definition at line 13 of file socket.h.

◆ SOCK_DGRAM

#define SOCK_DGRAM   2

Definition at line 14 of file socket.h.

◆ MSG_OOB

#define MSG_OOB   0x0001

Definition at line 16 of file socket.h.

◆ MSG_PEEK

#define MSG_PEEK   0x0002

Definition at line 17 of file socket.h.

◆ MSG_DONTROUTE

#define MSG_DONTROUTE   0x0004

Definition at line 18 of file socket.h.

◆ MSG_DONTWAIT

#define MSG_DONTWAIT   0x0020

Definition at line 19 of file socket.h.

◆ SHUT_RD

#define SHUT_RD   0

Definition at line 21 of file socket.h.

◆ SHUT_WR

#define SHUT_WR   1

Definition at line 22 of file socket.h.

◆ SHUT_RDWR

#define SHUT_RDWR   2

Definition at line 23 of file socket.h.

◆ SO_REUSEADDR

#define SO_REUSEADDR   0x0004

Definition at line 28 of file socket.h.

◆ SO_KEEPALIVE

#define SO_KEEPALIVE   0x0008

Definition at line 29 of file socket.h.

◆ SO_DONTROUTE

#define SO_DONTROUTE   0x0010

Definition at line 30 of file socket.h.

◆ SO_BROADCAST

#define SO_BROADCAST   0x0020

Definition at line 31 of file socket.h.

◆ SO_LINGER

#define SO_LINGER   0x0080

Definition at line 32 of file socket.h.

◆ SO_OOBINLINE

#define SO_OOBINLINE   0x0100

Definition at line 33 of file socket.h.

◆ SO_TCPSACK

#define SO_TCPSACK   0x0200

Definition at line 34 of file socket.h.

◆ SO_WINSCALE

#define SO_WINSCALE   0x0400

Definition at line 35 of file socket.h.

◆ SO_SNDBUF

#define SO_SNDBUF   0x1001

Definition at line 36 of file socket.h.

◆ SO_RCVBUF

#define SO_RCVBUF   0x1002

Definition at line 37 of file socket.h.

◆ SO_SNDLOWAT

#define SO_SNDLOWAT   0x1003

Definition at line 38 of file socket.h.

◆ SO_RCVLOWAT

#define SO_RCVLOWAT   0x1004

Definition at line 39 of file socket.h.

◆ SO_ERROR

#define SO_ERROR   0x1007

Definition at line 40 of file socket.h.

◆ SO_TYPE

#define SO_TYPE   0x1008

Definition at line 41 of file socket.h.

◆ SO_HOPCNT

#define SO_HOPCNT   0x1009

Definition at line 42 of file socket.h.

◆ SO_MAXMSG

#define SO_MAXMSG   0x1010

Definition at line 43 of file socket.h.

◆ SO_RXDATA

#define SO_RXDATA   0x1011

Definition at line 44 of file socket.h.

◆ SO_TXDATA

#define SO_TXDATA   0x1012

Definition at line 45 of file socket.h.

◆ SO_MYADDR

#define SO_MYADDR   0x1013

Definition at line 46 of file socket.h.

◆ SO_NBIO

#define SO_NBIO   0x1014

Definition at line 47 of file socket.h.

◆ SO_BIO

#define SO_BIO   0x1015

Definition at line 48 of file socket.h.

◆ SO_NONBLOCK

#define SO_NONBLOCK   0x1016

Definition at line 49 of file socket.h.

◆ SO_UNKNOWN1019

#define SO_UNKNOWN1019   0x1019

Definition at line 50 of file socket.h.

◆ SO_UNKNOWN101A

#define SO_UNKNOWN101A   0x101A

Definition at line 51 of file socket.h.

◆ SO_UNKNOWN101B

#define SO_UNKNOWN101B   0x101B

Definition at line 52 of file socket.h.

◆ SO_NOSLOWSTART

#define SO_NOSLOWSTART   0x4000

Definition at line 53 of file socket.h.

◆ SO_RUSRBUF

#define SO_RUSRBUF   0x10000

Definition at line 54 of file socket.h.

Typedef Documentation

◆ socklen_t

typedef uint32_t socklen_t

Definition at line 56 of file socket.h.

◆ sa_family_t

typedef uint16_t sa_family_t

Definition at line 57 of file socket.h.

Function Documentation

◆ accept()

int accept ( int  sockfd,
struct sockaddr addr,
socklen_t addrlen 
)

◆ bind()

int bind ( int  sockfd,
const struct sockaddr addr,
socklen_t  addrlen 
)

◆ connect()

int connect ( int  sockfd,
const struct sockaddr addr,
socklen_t  addrlen 
)

◆ getpeername()

int getpeername ( int  sockfd,
struct sockaddr addr,
socklen_t addrlen 
)

◆ getsockname()

int getsockname ( int  sockfd,
struct sockaddr addr,
socklen_t addrlen 
)

◆ getsockopt()

int getsockopt ( int  sockfd,
int  level,
int  optname,
void *  optval,
socklen_t optlen 
)

◆ listen()

int listen ( int  sockfd,
int  backlog 
)

◆ recv()

ssize_t recv ( int  sockfd,
void *  buf,
size_t  len,
int  flags 
)

◆ recvfrom()

ssize_t recvfrom ( int  sockfd,
void *  buf,
size_t  len,
int  flags,
struct sockaddr src_addr,
socklen_t addrlen 
)

◆ send()

ssize_t send ( int  sockfd,
const void *  buf,
size_t  len,
int  flags 
)

◆ sendto()

ssize_t sendto ( int  sockfd,
const void *  buf,
size_t  len,
int  flags,
const struct sockaddr dest_addr,
socklen_t  addrlen 
)

◆ setsockopt()

int setsockopt ( int  sockfd,
int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)

◆ shutdown()

int shutdown ( int  sockfd,
int  how 
)

◆ socket()

int socket ( int  domain,
int  type,
int  protocol 
)

◆ sockatmark()

int sockatmark ( int  sockfd)