All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations
sir_socket_defs.h File Reference
#include <stdint.h>
#include "ip/packet-defines.h"
#include <common.h>
#include "common/sir_common.h"
#include "tcp/sir_tcp_syncache.h"
Include dependency graph for sir_socket_defs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sir_ip_sockaddr_t
 Struct contains address information. More...
 
struct  sir_port_config_t
 
struct  sir_so_socket_t
 

Macros

#define SIR_PORT_DEFAULT_IPV4_ARP_ENTRIES   512
 
#define SIR_PORT_DEFAULT_IPV4_VLAN_ENTRIES   16
 
#define SIR_PORT_DEFAULT_IPV6_CACHE_ENTRIES_POW2   8
 
#define SIR_PORT_DEFAULT_IPV6_INTERFACE_ENTRIES   32
 
#define SIR_PORT_DEFAULT_IPV6_ROUTER_ENTRIES   16
 
#define SIR_PORT_DEFAULT_IPV6_PREFIX_ENTRIES   16
 
#define SIR_IP_IPPROTO_TCP   6
 
#define SIR_IP_IPPROTO_UDP   17
 
#define SIR_IP_INADDR_ANY   TIPAddr(0)
 
#define SIR_SO_AF_INET   2
 
#define SIR_SO_AF_INET6   10
 
#define SIR_SO_SOCK_NONE   0
 
#define SIR_SO_SOCK_STREAM   1
 
#define SIR_SO_SOCK_DGRAM   2
 
#define SIR_SO_SOCK_RAW   3
 
#define SIR_COMMON_OK   0
 
#define SIR_COMMON_EPERM   1
 
#define SIR_COMMON_ENXIO   6
 
#define SIR_COMMON_EBADF   9
 
#define SIR_COMMON_EFAULT   14
 
#define SIR_COMMON_EINVAL   22
 
#define SIR_COMMON_EMFILE   24
 
#define SIR_COMMON_EPIPE   32
 
#define SIR_COMMON_EAGAIN   35
 
#define SIR_COMMON_EPROTONOSOPPORT   43
 
#define SIR_COMMON_EAFNOSUPPORT   47
 
#define SIR_COMMON_EADDRNOTAVAIL   49
 
#define SIR_COMMON_ENOBUFS   55
 
#define SIR_COMMON_ENOSR   63
 
#define SIR_COMMON_ENOPROTOOPT   92
 
#define SIR_COMMON_IPNOARP   93
 
#define SIR_COMMON_ENOTCONN   134
 
#define SIR_COMMON_ECONNREFUSED   146
 
#define SIR_COMMON_EALREADY   149
 
#define SIR_SO_PEEK   0x2
 

Enumerations

enum  ESockOptLevel {
  SIR_IPPROTO_IP, SIR_IPPROTO_IPV6, SIR_IPPROTO_TCP, SIR_IPPROTO_UDP,
  SIR_IPPROTO_RAW, SIR_IPPROTO_ICMP, SIR_SOL_SOCKET
}
 SetSocklevels. More...
 
enum  ESockOptName {
  SIR_IP_OPTIONS, SIR_IP_TOS, SIR_IP_TTL, SIR_IP_RECVLCLIFADDR,
  SIR_IP_ACCEPTFARADDRESS, SIR_IPV6_V6ONLY, SIR_IPV6_ACCEPTFARADDRESS, SIR_TCP_MAXSEG,
  SIR_TCP_MAXSEG_PEER, SIR_TCP_MAXOVERFLOW, SIR_TCP_NODELAY, SIR_TCP_KEEPCNT,
  SIR_TCP_KEEPIDLE, SIR_TCP_KEEPINTVL, SIR_TCP_KEEPTIME, SIR_SO_BROADCAST,
  SIR_SO_DEBUG, SIR_SO_DONTROUTE, SIR_SO_ERROR, SIR_SO_KEEPALIVE,
  SIR_SO_LINGER, SIR_SO_OOBINLINE, SIR_SO_RCVBUF, SIR_SO_RCVTIMEO,
  SIR_SO_MTU
}
 SetSocknames enumeration. More...
 
enum  EPortConfig { SIR_IP_CONFIG }
 Enumerations for port config. More...
 

Macro Definition Documentation

#define SIR_COMMON_EADDRNOTAVAIL   49

Definition at line 58 of file sir_socket_defs.h.

#define SIR_COMMON_EAFNOSUPPORT   47

Definition at line 57 of file sir_socket_defs.h.

#define SIR_COMMON_EAGAIN   35

Definition at line 54 of file sir_socket_defs.h.

#define SIR_COMMON_EALREADY   149

Definition at line 66 of file sir_socket_defs.h.

#define SIR_COMMON_EBADF   9

Definition at line 49 of file sir_socket_defs.h.

#define SIR_COMMON_ECONNREFUSED   146

Definition at line 65 of file sir_socket_defs.h.

#define SIR_COMMON_EFAULT   14

Definition at line 50 of file sir_socket_defs.h.

#define SIR_COMMON_EINVAL   22

Definition at line 51 of file sir_socket_defs.h.

#define SIR_COMMON_EMFILE   24

Definition at line 52 of file sir_socket_defs.h.

#define SIR_COMMON_ENOBUFS   55

Definition at line 59 of file sir_socket_defs.h.

#define SIR_COMMON_ENOPROTOOPT   92

Definition at line 61 of file sir_socket_defs.h.

#define SIR_COMMON_ENOSR   63

Definition at line 60 of file sir_socket_defs.h.

#define SIR_COMMON_ENOTCONN   134

Definition at line 64 of file sir_socket_defs.h.

#define SIR_COMMON_ENXIO   6

Definition at line 48 of file sir_socket_defs.h.

#define SIR_COMMON_EPERM   1

Definition at line 47 of file sir_socket_defs.h.

#define SIR_COMMON_EPIPE   32

Definition at line 53 of file sir_socket_defs.h.

#define SIR_COMMON_EPROTONOSOPPORT   43

Definition at line 56 of file sir_socket_defs.h.

#define SIR_COMMON_IPNOARP   93

Definition at line 62 of file sir_socket_defs.h.

#define SIR_COMMON_OK   0

Definition at line 46 of file sir_socket_defs.h.

#define SIR_IP_INADDR_ANY   TIPAddr(0)

Definition at line 32 of file sir_socket_defs.h.

#define SIR_IP_IPPROTO_TCP   6

Definition at line 29 of file sir_socket_defs.h.

#define SIR_IP_IPPROTO_UDP   17

Definition at line 30 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV4_ARP_ENTRIES   512

Definition at line 21 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV4_VLAN_ENTRIES   16

Definition at line 22 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV6_CACHE_ENTRIES_POW2   8

Definition at line 23 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV6_INTERFACE_ENTRIES   32

Definition at line 24 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV6_PREFIX_ENTRIES   16

Definition at line 26 of file sir_socket_defs.h.

#define SIR_PORT_DEFAULT_IPV6_ROUTER_ENTRIES   16

Definition at line 25 of file sir_socket_defs.h.

#define SIR_SO_AF_INET   2

Definition at line 35 of file sir_socket_defs.h.

#define SIR_SO_AF_INET6   10

Definition at line 36 of file sir_socket_defs.h.

#define SIR_SO_PEEK   0x2

Definition at line 69 of file sir_socket_defs.h.

#define SIR_SO_SOCK_DGRAM   2

Definition at line 42 of file sir_socket_defs.h.

#define SIR_SO_SOCK_NONE   0

Definition at line 40 of file sir_socket_defs.h.

#define SIR_SO_SOCK_RAW   3

Definition at line 43 of file sir_socket_defs.h.

#define SIR_SO_SOCK_STREAM   1

Definition at line 41 of file sir_socket_defs.h.

Enumeration Type Documentation

Enumerations for port config.

Enumerator
SIR_IP_CONFIG 

Definition at line 115 of file sir_socket_defs.h.

SetSocklevels.

Enumerator
SIR_IPPROTO_IP 
SIR_IPPROTO_IPV6 
SIR_IPPROTO_TCP 
SIR_IPPROTO_UDP 
SIR_IPPROTO_RAW 
SIR_IPPROTO_ICMP 
SIR_SOL_SOCKET 

Definition at line 72 of file sir_socket_defs.h.

SetSocknames enumeration.

Enumerator
SIR_IP_OPTIONS 

Not implemented

SIR_IP_TOS 

Not implemented

SIR_IP_TTL 

Not implemented

SIR_IP_RECVLCLIFADDR 

Not implemented

SIR_IP_ACCEPTFARADDRESS 

SIR_IPPROTO_IP : Accept IP addresses on adapters that are not assigned to that adapter

SIR_IPV6_V6ONLY 

SIR_IPPROTO_IPV6: Enable IPV6-only traffic on this socket when listen address is SIR_IPV6_INADDR_ANY

SIR_IPV6_ACCEPTFARADDRESS 

SIR_IPPROTO_IPV6: Accept IPV6 addresses on adapters that are not assigned to that adapter

SIR_TCP_MAXSEG 

SIR_IPPROTO_TCP: Set the MSS size for this session. Defaults to MTU size -size of IP header - sizeof TCP header - sizeof TCP options field

SIR_TCP_MAXSEG_PEER 

SIR_IPPROTO_TCP: The Peers MSS size for this session.

SIR_TCP_MAXOVERFLOW 

SIR_IPPROTO_TCP: Set the maximum size of the TX OVerflow Queue (which defaults to MAX_TXOVERFLOW_SIZE)

SIR_TCP_NODELAY 

SIR_IPPROTO_TCP: Enable NoDelay option, meaning disable Nagle algorithm on this session

SIR_TCP_KEEPCNT 

SIR_IPPROTO_TCP: Nr of keepalives sent before dropping the connection. Defaults to 8 and is a system wide setting

SIR_TCP_KEEPIDLE 

SIR_IPPROTO_TCP: Initial idle time before keepalive probing will start. Defaults to 7200 secs and is a system wide setting

SIR_TCP_KEEPINTVL 

SIR_IPPROTO_TCP: Time between individual keepalive probes. Defaults to 75 secs and is a system wide setting

SIR_TCP_KEEPTIME 

SIR_IPPROTO_TCP: Timeout before keepalive starts probing after last received data. Defaults to 75 secs and is a system wide setting

SIR_SO_BROADCAST 

Not implemented

SIR_SO_DEBUG 

Not implemented

SIR_SO_DONTROUTE 

Not implemented

SIR_SO_ERROR 

Not implemented

SIR_SO_KEEPALIVE 

SIR_SOL_SOCKET: Enable sending keepalive packets on this session to check if peer is still alive

SIR_SO_LINGER 

Not implemented

SIR_SO_OOBINLINE 

Not implemented

SIR_SO_RCVBUF 

Not implemented

SIR_SO_RCVTIMEO 

SIR_SOL_SOCKET: Change the timeout for a session in seconds. Defaults to 100 secs

SIR_SO_MTU 

SIR_SOL_SOCKET: Get MTU size of the socket

Definition at line 84 of file sir_socket_defs.h.