Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
ip_vs.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  ip_vs_service_user
 
struct  ip_vs_dest_user
 
struct  ip_vs_stats_user
 
struct  ip_vs_getinfo
 
struct  ip_vs_service_entry
 
struct  ip_vs_dest_entry
 
struct  ip_vs_get_dests
 
struct  ip_vs_get_services
 
struct  ip_vs_timeout_user
 
struct  ip_vs_daemon_user
 
struct  ip_vs_flags
 

Macros

#define IP_VS_VERSION_CODE   0x010201
 
#define NVERSION(version)
 
#define IP_VS_SVC_F_PERSISTENT   0x0001 /* persistent port */
 
#define IP_VS_SVC_F_HASHED   0x0002 /* hashed entry */
 
#define IP_VS_SVC_F_ONEPACKET   0x0004 /* one-packet scheduling */
 
#define IP_VS_DEST_F_AVAILABLE   0x0001 /* server is available */
 
#define IP_VS_DEST_F_OVERLOAD   0x0002 /* server is overloaded */
 
#define IP_VS_STATE_NONE   0x0000 /* daemon is stopped */
 
#define IP_VS_STATE_MASTER   0x0001 /* started as master */
 
#define IP_VS_STATE_BACKUP   0x0002 /* started as backup */
 
#define IP_VS_BASE_CTL   (64+1024+64) /* base */
 
#define IP_VS_SO_SET_NONE   IP_VS_BASE_CTL /* just peek */
 
#define IP_VS_SO_SET_INSERT   (IP_VS_BASE_CTL+1)
 
#define IP_VS_SO_SET_ADD   (IP_VS_BASE_CTL+2)
 
#define IP_VS_SO_SET_EDIT   (IP_VS_BASE_CTL+3)
 
#define IP_VS_SO_SET_DEL   (IP_VS_BASE_CTL+4)
 
#define IP_VS_SO_SET_FLUSH   (IP_VS_BASE_CTL+5)
 
#define IP_VS_SO_SET_LIST   (IP_VS_BASE_CTL+6)
 
#define IP_VS_SO_SET_ADDDEST   (IP_VS_BASE_CTL+7)
 
#define IP_VS_SO_SET_DELDEST   (IP_VS_BASE_CTL+8)
 
#define IP_VS_SO_SET_EDITDEST   (IP_VS_BASE_CTL+9)
 
#define IP_VS_SO_SET_TIMEOUT   (IP_VS_BASE_CTL+10)
 
#define IP_VS_SO_SET_STARTDAEMON   (IP_VS_BASE_CTL+11)
 
#define IP_VS_SO_SET_STOPDAEMON   (IP_VS_BASE_CTL+12)
 
#define IP_VS_SO_SET_RESTORE   (IP_VS_BASE_CTL+13)
 
#define IP_VS_SO_SET_SAVE   (IP_VS_BASE_CTL+14)
 
#define IP_VS_SO_SET_ZERO   (IP_VS_BASE_CTL+15)
 
#define IP_VS_SO_SET_MAX   IP_VS_SO_SET_ZERO
 
#define IP_VS_SO_GET_VERSION   IP_VS_BASE_CTL
 
#define IP_VS_SO_GET_INFO   (IP_VS_BASE_CTL+1)
 
#define IP_VS_SO_GET_SERVICES   (IP_VS_BASE_CTL+2)
 
#define IP_VS_SO_GET_SERVICE   (IP_VS_BASE_CTL+3)
 
#define IP_VS_SO_GET_DESTS   (IP_VS_BASE_CTL+4)
 
#define IP_VS_SO_GET_DEST   (IP_VS_BASE_CTL+5) /* not used now */
 
#define IP_VS_SO_GET_TIMEOUT   (IP_VS_BASE_CTL+6)
 
#define IP_VS_SO_GET_DAEMON   (IP_VS_BASE_CTL+7)
 
#define IP_VS_SO_GET_MAX   IP_VS_SO_GET_DAEMON
 
#define IP_VS_CONN_F_FWD_MASK   0x0007 /* mask for the fwd methods */
 
#define IP_VS_CONN_F_MASQ   0x0000 /* masquerading/NAT */
 
#define IP_VS_CONN_F_LOCALNODE   0x0001 /* local node */
 
#define IP_VS_CONN_F_TUNNEL   0x0002 /* tunneling */
 
#define IP_VS_CONN_F_DROUTE   0x0003 /* direct routing */
 
#define IP_VS_CONN_F_BYPASS   0x0004 /* cache bypass */
 
#define IP_VS_CONN_F_SYNC   0x0020 /* entry created by sync */
 
#define IP_VS_CONN_F_HASHED   0x0040 /* hashed entry */
 
#define IP_VS_CONN_F_NOOUTPUT   0x0080 /* no output packets */
 
#define IP_VS_CONN_F_INACTIVE   0x0100 /* not established */
 
#define IP_VS_CONN_F_OUT_SEQ   0x0200 /* must do output seq adjust */
 
#define IP_VS_CONN_F_IN_SEQ   0x0400 /* must do input seq adjust */
 
#define IP_VS_CONN_F_SEQ_MASK   0x0600 /* in/out sequence mask */
 
#define IP_VS_CONN_F_NO_CPORT   0x0800 /* no client port set yet */
 
#define IP_VS_CONN_F_TEMPLATE   0x1000 /* template, not connection */
 
#define IP_VS_CONN_F_ONE_PACKET   0x2000 /* forward only one packet */
 
#define IP_VS_CONN_F_BACKUP_MASK
 
#define IP_VS_CONN_F_BACKUP_UPD_MASK
 
#define IP_VS_CONN_F_NFCT   (1 << 16) /* use netfilter conntrack */
 
#define IP_VS_CONN_F_DEST_MASK
 
#define IP_VS_SCHEDNAME_MAXLEN   16
 
#define IP_VS_PENAME_MAXLEN   16
 
#define IP_VS_IFNAME_MAXLEN   16
 
#define IP_VS_PEDATA_MAXLEN   255
 
#define IPVS_GENL_NAME   "IPVS"
 
#define IPVS_GENL_VERSION   0x1
 
#define IPVS_CMD_MAX   (__IPVS_CMD_MAX - 1)
 
#define IPVS_CMD_ATTR_MAX   (__IPVS_SVC_ATTR_MAX - 1)
 
#define IPVS_SVC_ATTR_MAX   (__IPVS_SVC_ATTR_MAX - 1)
 
#define IPVS_DEST_ATTR_MAX   (__IPVS_DEST_ATTR_MAX - 1)
 
#define IPVS_DAEMON_ATTR_MAX   (__IPVS_DAEMON_ATTR_MAX - 1)
 
#define IPVS_STATS_ATTR_MAX   (__IPVS_STATS_ATTR_MAX - 1)
 
#define IPVS_INFO_ATTR_MAX   (__IPVS_INFO_ATTR_MAX - 1)
 

Enumerations

enum  {
  IPVS_CMD_UNSPEC = 0, IPVS_CMD_NEW_SERVICE, IPVS_CMD_SET_SERVICE, IPVS_CMD_DEL_SERVICE,
  IPVS_CMD_GET_SERVICE, IPVS_CMD_NEW_DEST, IPVS_CMD_SET_DEST, IPVS_CMD_DEL_DEST,
  IPVS_CMD_GET_DEST, IPVS_CMD_NEW_DAEMON, IPVS_CMD_DEL_DAEMON, IPVS_CMD_GET_DAEMON,
  IPVS_CMD_SET_CONFIG, IPVS_CMD_GET_CONFIG, IPVS_CMD_SET_INFO, IPVS_CMD_GET_INFO,
  IPVS_CMD_ZERO, IPVS_CMD_FLUSH, __IPVS_CMD_MAX
}
 
enum  {
  IPVS_CMD_ATTR_UNSPEC = 0, IPVS_CMD_ATTR_SERVICE, IPVS_CMD_ATTR_DEST, IPVS_CMD_ATTR_DAEMON,
  IPVS_CMD_ATTR_TIMEOUT_TCP, IPVS_CMD_ATTR_TIMEOUT_TCP_FIN, IPVS_CMD_ATTR_TIMEOUT_UDP, __IPVS_CMD_ATTR_MAX
}
 
enum  {
  IPVS_SVC_ATTR_UNSPEC = 0, IPVS_SVC_ATTR_AF, IPVS_SVC_ATTR_PROTOCOL, IPVS_SVC_ATTR_ADDR,
  IPVS_SVC_ATTR_PORT, IPVS_SVC_ATTR_FWMARK, IPVS_SVC_ATTR_SCHED_NAME, IPVS_SVC_ATTR_FLAGS,
  IPVS_SVC_ATTR_TIMEOUT, IPVS_SVC_ATTR_NETMASK, IPVS_SVC_ATTR_STATS, IPVS_SVC_ATTR_PE_NAME,
  __IPVS_SVC_ATTR_MAX
}
 
enum  {
  IPVS_DEST_ATTR_UNSPEC = 0, IPVS_DEST_ATTR_ADDR, IPVS_DEST_ATTR_PORT, IPVS_DEST_ATTR_FWD_METHOD,
  IPVS_DEST_ATTR_WEIGHT, IPVS_DEST_ATTR_U_THRESH, IPVS_DEST_ATTR_L_THRESH, IPVS_DEST_ATTR_ACTIVE_CONNS,
  IPVS_DEST_ATTR_INACT_CONNS, IPVS_DEST_ATTR_PERSIST_CONNS, IPVS_DEST_ATTR_STATS, __IPVS_DEST_ATTR_MAX
}
 
enum  {
  IPVS_DAEMON_ATTR_UNSPEC = 0, IPVS_DAEMON_ATTR_STATE, IPVS_DAEMON_ATTR_MCAST_IFN, IPVS_DAEMON_ATTR_SYNC_ID,
  __IPVS_DAEMON_ATTR_MAX
}
 
enum  {
  IPVS_STATS_ATTR_UNSPEC = 0, IPVS_STATS_ATTR_CONNS, IPVS_STATS_ATTR_INPKTS, IPVS_STATS_ATTR_OUTPKTS,
  IPVS_STATS_ATTR_INBYTES, IPVS_STATS_ATTR_OUTBYTES, IPVS_STATS_ATTR_CPS, IPVS_STATS_ATTR_INPPS,
  IPVS_STATS_ATTR_OUTPPS, IPVS_STATS_ATTR_INBPS, IPVS_STATS_ATTR_OUTBPS, __IPVS_STATS_ATTR_MAX
}
 
enum  { IPVS_INFO_ATTR_UNSPEC = 0, IPVS_INFO_ATTR_VERSION, IPVS_INFO_ATTR_CONN_TAB_SIZE, __IPVS_INFO_ATTR_MAX }
 

Macro Definition Documentation

#define IP_VS_BASE_CTL   (64+1024+64) /* base */

Definition at line 40 of file ip_vs.h.

#define IP_VS_CONN_F_BACKUP_MASK
Value:
IP_VS_CONN_F_NOOUTPUT | \
IP_VS_CONN_F_INACTIVE | \
IP_VS_CONN_F_SEQ_MASK | \
IP_VS_CONN_F_NO_CPORT | \
IP_VS_CONN_F_TEMPLATE \
)

Definition at line 93 of file ip_vs.h.

#define IP_VS_CONN_F_BACKUP_UPD_MASK
Value:
IP_VS_CONN_F_SEQ_MASK)

Definition at line 102 of file ip_vs.h.

#define IP_VS_CONN_F_BYPASS   0x0004 /* cache bypass */

Definition at line 80 of file ip_vs.h.

#define IP_VS_CONN_F_DEST_MASK
Value:
IP_VS_CONN_F_ONE_PACKET | \
IP_VS_CONN_F_NFCT | \
0)

Definition at line 109 of file ip_vs.h.

#define IP_VS_CONN_F_DROUTE   0x0003 /* direct routing */

Definition at line 79 of file ip_vs.h.

#define IP_VS_CONN_F_FWD_MASK   0x0007 /* mask for the fwd methods */

Definition at line 75 of file ip_vs.h.

#define IP_VS_CONN_F_HASHED   0x0040 /* hashed entry */

Definition at line 82 of file ip_vs.h.

#define IP_VS_CONN_F_IN_SEQ   0x0400 /* must do input seq adjust */

Definition at line 86 of file ip_vs.h.

#define IP_VS_CONN_F_INACTIVE   0x0100 /* not established */

Definition at line 84 of file ip_vs.h.

#define IP_VS_CONN_F_LOCALNODE   0x0001 /* local node */

Definition at line 77 of file ip_vs.h.

#define IP_VS_CONN_F_MASQ   0x0000 /* masquerading/NAT */

Definition at line 76 of file ip_vs.h.

#define IP_VS_CONN_F_NFCT   (1 << 16) /* use netfilter conntrack */

Definition at line 106 of file ip_vs.h.

#define IP_VS_CONN_F_NO_CPORT   0x0800 /* no client port set yet */

Definition at line 88 of file ip_vs.h.

#define IP_VS_CONN_F_NOOUTPUT   0x0080 /* no output packets */

Definition at line 83 of file ip_vs.h.

#define IP_VS_CONN_F_ONE_PACKET   0x2000 /* forward only one packet */

Definition at line 90 of file ip_vs.h.

#define IP_VS_CONN_F_OUT_SEQ   0x0200 /* must do output seq adjust */

Definition at line 85 of file ip_vs.h.

#define IP_VS_CONN_F_SEQ_MASK   0x0600 /* in/out sequence mask */

Definition at line 87 of file ip_vs.h.

#define IP_VS_CONN_F_SYNC   0x0020 /* entry created by sync */

Definition at line 81 of file ip_vs.h.

#define IP_VS_CONN_F_TEMPLATE   0x1000 /* template, not connection */

Definition at line 89 of file ip_vs.h.

#define IP_VS_CONN_F_TUNNEL   0x0002 /* tunneling */

Definition at line 78 of file ip_vs.h.

#define IP_VS_DEST_F_AVAILABLE   0x0001 /* server is available */

Definition at line 27 of file ip_vs.h.

#define IP_VS_DEST_F_OVERLOAD   0x0002 /* server is overloaded */

Definition at line 28 of file ip_vs.h.

#define IP_VS_IFNAME_MAXLEN   16

Definition at line 116 of file ip_vs.h.

#define IP_VS_PEDATA_MAXLEN   255

Definition at line 118 of file ip_vs.h.

#define IP_VS_PENAME_MAXLEN   16

Definition at line 115 of file ip_vs.h.

#define IP_VS_SCHEDNAME_MAXLEN   16

Definition at line 114 of file ip_vs.h.

#define IP_VS_SO_GET_DAEMON   (IP_VS_BASE_CTL+7)

Definition at line 67 of file ip_vs.h.

#define IP_VS_SO_GET_DEST   (IP_VS_BASE_CTL+5) /* not used now */

Definition at line 65 of file ip_vs.h.

#define IP_VS_SO_GET_DESTS   (IP_VS_BASE_CTL+4)

Definition at line 64 of file ip_vs.h.

#define IP_VS_SO_GET_INFO   (IP_VS_BASE_CTL+1)

Definition at line 61 of file ip_vs.h.

#define IP_VS_SO_GET_MAX   IP_VS_SO_GET_DAEMON

Definition at line 68 of file ip_vs.h.

#define IP_VS_SO_GET_SERVICE   (IP_VS_BASE_CTL+3)

Definition at line 63 of file ip_vs.h.

#define IP_VS_SO_GET_SERVICES   (IP_VS_BASE_CTL+2)

Definition at line 62 of file ip_vs.h.

#define IP_VS_SO_GET_TIMEOUT   (IP_VS_BASE_CTL+6)

Definition at line 66 of file ip_vs.h.

#define IP_VS_SO_GET_VERSION   IP_VS_BASE_CTL

Definition at line 60 of file ip_vs.h.

#define IP_VS_SO_SET_ADD   (IP_VS_BASE_CTL+2)

Definition at line 44 of file ip_vs.h.

#define IP_VS_SO_SET_ADDDEST   (IP_VS_BASE_CTL+7)

Definition at line 49 of file ip_vs.h.

#define IP_VS_SO_SET_DEL   (IP_VS_BASE_CTL+4)

Definition at line 46 of file ip_vs.h.

#define IP_VS_SO_SET_DELDEST   (IP_VS_BASE_CTL+8)

Definition at line 50 of file ip_vs.h.

#define IP_VS_SO_SET_EDIT   (IP_VS_BASE_CTL+3)

Definition at line 45 of file ip_vs.h.

#define IP_VS_SO_SET_EDITDEST   (IP_VS_BASE_CTL+9)

Definition at line 51 of file ip_vs.h.

#define IP_VS_SO_SET_FLUSH   (IP_VS_BASE_CTL+5)

Definition at line 47 of file ip_vs.h.

#define IP_VS_SO_SET_INSERT   (IP_VS_BASE_CTL+1)

Definition at line 43 of file ip_vs.h.

#define IP_VS_SO_SET_LIST   (IP_VS_BASE_CTL+6)

Definition at line 48 of file ip_vs.h.

#define IP_VS_SO_SET_MAX   IP_VS_SO_SET_ZERO

Definition at line 58 of file ip_vs.h.

#define IP_VS_SO_SET_NONE   IP_VS_BASE_CTL /* just peek */

Definition at line 42 of file ip_vs.h.

#define IP_VS_SO_SET_RESTORE   (IP_VS_BASE_CTL+13)

Definition at line 55 of file ip_vs.h.

#define IP_VS_SO_SET_SAVE   (IP_VS_BASE_CTL+14)

Definition at line 56 of file ip_vs.h.

#define IP_VS_SO_SET_STARTDAEMON   (IP_VS_BASE_CTL+11)

Definition at line 53 of file ip_vs.h.

#define IP_VS_SO_SET_STOPDAEMON   (IP_VS_BASE_CTL+12)

Definition at line 54 of file ip_vs.h.

#define IP_VS_SO_SET_TIMEOUT   (IP_VS_BASE_CTL+10)

Definition at line 52 of file ip_vs.h.

#define IP_VS_SO_SET_ZERO   (IP_VS_BASE_CTL+15)

Definition at line 57 of file ip_vs.h.

#define IP_VS_STATE_BACKUP   0x0002 /* started as backup */

Definition at line 35 of file ip_vs.h.

#define IP_VS_STATE_MASTER   0x0001 /* started as master */

Definition at line 34 of file ip_vs.h.

#define IP_VS_STATE_NONE   0x0000 /* daemon is stopped */

Definition at line 33 of file ip_vs.h.

#define IP_VS_SVC_F_HASHED   0x0002 /* hashed entry */

Definition at line 21 of file ip_vs.h.

#define IP_VS_SVC_F_ONEPACKET   0x0004 /* one-packet scheduling */

Definition at line 22 of file ip_vs.h.

#define IP_VS_SVC_F_PERSISTENT   0x0001 /* persistent port */

Definition at line 20 of file ip_vs.h.

#define IP_VS_VERSION_CODE   0x010201

Definition at line 11 of file ip_vs.h.

#define IPVS_CMD_ATTR_MAX   (__IPVS_SVC_ATTR_MAX - 1)

Definition at line 331 of file ip_vs.h.

#define IPVS_CMD_MAX   (__IPVS_CMD_MAX - 1)

Definition at line 317 of file ip_vs.h.

#define IPVS_DAEMON_ATTR_MAX   (__IPVS_DAEMON_ATTR_MAX - 1)

Definition at line 399 of file ip_vs.h.

#define IPVS_DEST_ATTR_MAX   (__IPVS_DEST_ATTR_MAX - 1)

Definition at line 384 of file ip_vs.h.

#define IPVS_GENL_NAME   "IPVS"

Definition at line 279 of file ip_vs.h.

#define IPVS_GENL_VERSION   0x1

Definition at line 280 of file ip_vs.h.

#define IPVS_INFO_ATTR_MAX   (__IPVS_INFO_ATTR_MAX - 1)

Definition at line 432 of file ip_vs.h.

#define IPVS_STATS_ATTR_MAX   (__IPVS_STATS_ATTR_MAX - 1)

Definition at line 422 of file ip_vs.h.

#define IPVS_SVC_ATTR_MAX   (__IPVS_SVC_ATTR_MAX - 1)

Definition at line 358 of file ip_vs.h.

#define NVERSION (   version)
Value:
(version >> 16) & 0xFF, \
(version >> 8) & 0xFF, \
version & 0xFF

Definition at line 12 of file ip_vs.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IPVS_CMD_UNSPEC 
IPVS_CMD_NEW_SERVICE 
IPVS_CMD_SET_SERVICE 
IPVS_CMD_DEL_SERVICE 
IPVS_CMD_GET_SERVICE 
IPVS_CMD_NEW_DEST 
IPVS_CMD_SET_DEST 
IPVS_CMD_DEL_DEST 
IPVS_CMD_GET_DEST 
IPVS_CMD_NEW_DAEMON 
IPVS_CMD_DEL_DAEMON 
IPVS_CMD_GET_DAEMON 
IPVS_CMD_SET_CONFIG 
IPVS_CMD_GET_CONFIG 
IPVS_CMD_SET_INFO 
IPVS_CMD_GET_INFO 
IPVS_CMD_ZERO 
IPVS_CMD_FLUSH 
__IPVS_CMD_MAX 

Definition at line 288 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_CMD_ATTR_UNSPEC 
IPVS_CMD_ATTR_SERVICE 
IPVS_CMD_ATTR_DEST 
IPVS_CMD_ATTR_DAEMON 
IPVS_CMD_ATTR_TIMEOUT_TCP 
IPVS_CMD_ATTR_TIMEOUT_TCP_FIN 
IPVS_CMD_ATTR_TIMEOUT_UDP 
__IPVS_CMD_ATTR_MAX 

Definition at line 320 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_SVC_ATTR_UNSPEC 
IPVS_SVC_ATTR_AF 
IPVS_SVC_ATTR_PROTOCOL 
IPVS_SVC_ATTR_ADDR 
IPVS_SVC_ATTR_PORT 
IPVS_SVC_ATTR_FWMARK 
IPVS_SVC_ATTR_SCHED_NAME 
IPVS_SVC_ATTR_FLAGS 
IPVS_SVC_ATTR_TIMEOUT 
IPVS_SVC_ATTR_NETMASK 
IPVS_SVC_ATTR_STATS 
IPVS_SVC_ATTR_PE_NAME 
__IPVS_SVC_ATTR_MAX 

Definition at line 338 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_DEST_ATTR_UNSPEC 
IPVS_DEST_ATTR_ADDR 
IPVS_DEST_ATTR_PORT 
IPVS_DEST_ATTR_FWD_METHOD 
IPVS_DEST_ATTR_WEIGHT 
IPVS_DEST_ATTR_U_THRESH 
IPVS_DEST_ATTR_L_THRESH 
IPVS_DEST_ATTR_ACTIVE_CONNS 
IPVS_DEST_ATTR_INACT_CONNS 
IPVS_DEST_ATTR_PERSIST_CONNS 
IPVS_DEST_ATTR_STATS 
__IPVS_DEST_ATTR_MAX 

Definition at line 365 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_DAEMON_ATTR_UNSPEC 
IPVS_DAEMON_ATTR_STATE 
IPVS_DAEMON_ATTR_MCAST_IFN 
IPVS_DAEMON_ATTR_SYNC_ID 
__IPVS_DAEMON_ATTR_MAX 

Definition at line 391 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_STATS_ATTR_UNSPEC 
IPVS_STATS_ATTR_CONNS 
IPVS_STATS_ATTR_INPKTS 
IPVS_STATS_ATTR_OUTPKTS 
IPVS_STATS_ATTR_INBYTES 
IPVS_STATS_ATTR_OUTBYTES 
IPVS_STATS_ATTR_CPS 
IPVS_STATS_ATTR_INPPS 
IPVS_STATS_ATTR_OUTPPS 
IPVS_STATS_ATTR_INBPS 
IPVS_STATS_ATTR_OUTBPS 
__IPVS_STATS_ATTR_MAX 

Definition at line 406 of file ip_vs.h.

anonymous enum
Enumerator:
IPVS_INFO_ATTR_UNSPEC 
IPVS_INFO_ATTR_VERSION 
IPVS_INFO_ATTR_CONN_TAB_SIZE 
__IPVS_INFO_ATTR_MAX 

Definition at line 425 of file ip_vs.h.