Watt-32 tcp/ip  2.2 dev-rel.10
Functions | Variables
sockopt.c File Reference

Go to the source code of this file.

Functions

static int set_sol_opt (Socket *s, int opt, const void *val, unsigned len)
 
static int set_raw_opt (Socket *s, int opt, const void *val, int len)
 
static int get_sol_opt (Socket *s, int opt, void *val, int *len)
 
static int get_raw_opt (Socket *s, int opt, void *val, int *len)
 
static int set_tcp_opt (_tcp_Socket *tcp, int opt, const void *val, int len)
 
static int set_udp_opt (_udp_Socket *udp, int opt, const void *val, int len)
 
static int get_tcp_opt (_tcp_Socket *tcp, int opt, void *val, int *len)
 
static int get_udp_opt (_udp_Socket *udp, int opt, void *val, int *len)
 
static int set_recv_buf (sock_type *s, DWORD size, BOOL is_tcp)
 
static int set_xmit_buf (sock_type *s, DWORD size, BOOL is_tcp)
 
static int raw_rx_buf (_raw_Socket *raw, DWORD size)
 
static int raw6_rx_buf (_raw6_Socket *raw, DWORD size)
 
static int raw_tx_buf (_raw_Socket *raw, DWORD size)
 
static int raw6_tx_buf (_raw6_Socket *raw, DWORD size)
 
static int set_tx_lowat (Socket *s, unsigned size)
 
static int set_rx_lowat (Socket *s, unsigned size)
 
static int get_tx_lowat (const Socket *s, unsigned *size)
 
static int get_rx_lowat (const Socket *s, unsigned *size)
 
static const char * sockopt_name (int level, int option)
 
int W32_CALL setsockopt (int s, int level, int option, const void *optval, int optlen)
 
int W32_CALL getsockopt (int s, int level, int option, void *optval, int *optlen)
 

Variables

static const struct search_list sol_options []
 
static const struct search_list tcp_options []
 
static const struct search_list ip_options []
 

Detailed Description

BSD setsockopt(), getsockopt().

Definition in file sockopt.c.

Function Documentation

static int get_sol_opt ( Socket s,
int  opt,
void val,
int *  len 
)
static
Todo:
Handle urgent (OOB) data
Todo:
Handle these SOL_OPTIONS:

Definition at line 349 of file sockopt.c.

References _raw_Socket::rx_data, and tcp_keep_idle.

static int raw6_rx_buf ( _raw6_Socket raw,
DWORD  size 
)
static
Todo:
Support setting Rx-buffer size of raw IPv6 sockets

Definition at line 890 of file sockopt.c.

static int raw6_tx_buf ( _raw6_Socket raw,
DWORD  size 
)
static
Todo:
Support setting Tx-buffer size of raw IPv6 sockets

Definition at line 908 of file sockopt.c.

static int raw_rx_buf ( _raw_Socket raw,
DWORD  size 
)
static
Todo:
Support setting Rx-buffer size of raw IPv4 sockets

Definition at line 881 of file sockopt.c.

static int raw_tx_buf ( _raw_Socket raw,
DWORD  size 
)
static
Todo:
Support setting Tx-buffer size of raw IPv4 sockets

Definition at line 899 of file sockopt.c.

Variable Documentation

const struct search_list ip_options[]
static
Initial value:
= {
{ IP_OPTIONS, "IP_OPTIONS" },
{ IP_HDRINCL, "IP_HDRINCL" },
{ IP_TOS, "IP_TOS" },
{ IP_TTL, "IP_TTL" },
{ IP_RECVOPTS, "IP_RECVOPTS" },
{ IP_RECVRETOPTS, "IP_RECVRETOPTS" },
{ IP_RECVDSTADDR, "IP_RECVDSTADDR" },
{ IP_RETOPTS, "IP_RETOPTS" },
{ IP_MULTICAST_IF, "IP_MULTICAST_IF" },
{ IP_MULTICAST_TTL, "IP_MULTICAST_TTL" },
{ IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP" },
{ IP_ADD_MEMBERSHIP, "IP_ADD_MEMBERSHIP" },
{ IP_DROP_MEMBERSHIP,"IP_DROP_MEMBERSHIP" },
{ IP_MULTICAST_VIF, "IP_MULTICAST_VIF" },
{ IP_RSVP_ON, "IP_RSVP_ON" },
{ IP_RSVP_OFF, "IP_RSVP_OFF" },
{ IP_RSVP_VIF_ON, "IP_RSVP_VIF_ON" },
{ IP_RSVP_VIF_OFF, "IP_RSVP_VIF_OFF" },
{ IP_PORTRANGE, "IP_PORTRANGE" },
{ IP_RECVIF, "IP_RECVIF" },
{ IP_FW_ADD, "IP_FW_ADD" },
{ IP_FW_DEL, "IP_FW_DEL" },
{ IP_FW_FLUSH, "IP_FW_FLUSH" },
{ IP_FW_ZERO, "IP_FW_ZERO" },
{ IP_FW_GET, "IP_FW_GET" },
{ IP_NAT, "IP_NAT" }
}

Definition at line 1026 of file sockopt.c.

const struct search_list sol_options[]
static
Initial value:
= {
{ SO_DEBUG, "SO_DEBUG" },
{ SO_ACCEPTCONN, "SO_ACCEPTCONN" },
{ SO_REUSEADDR, "SO_REUSEADDR" },
{ SO_KEEPALIVE, "SO_KEEPALIVE" },
{ SO_DONTROUTE, "SO_DONTROUTE" },
{ SO_BROADCAST, "SO_BROADCAST" },
{ SO_USELOOPBACK, "SO_USELOOPBACK" },
{ SO_LINGER, "SO_LINGER" },
{ SO_OOBINLINE, "SO_OOBINLINE" },
{ SO_SNDBUF, "SO_SNDBUF" },
{ SO_RCVBUF, "SO_RCVBUF" },
{ SO_SNDLOWAT, "SO_SNDLOWAT" },
{ SO_RCVLOWAT, "SO_RCVLOWAT" },
{ SO_SNDTIMEO, "SO_SNDTIMEO" },
{ SO_RCVTIMEO, "SO_RCVTIMEO" },
{ SO_ERROR, "SO_ERROR" },
{ SO_TYPE, "SO_TYPE" }
}

Definition at line 999 of file sockopt.c.

const struct search_list tcp_options[]
static
Initial value:
= {
{ TCP_NODELAY, "TCP_NODELAY" },
{ TCP_MAXSEG, "TCP_MAXSEG" },
{ TCP_NOPUSH, "TCP_NOPUSH" },
{ TCP_NOOPT, "TCP_NOOPT" }
}

Definition at line 1019 of file sockopt.c.