linux/include/uapi/linux/ip_vs.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 *      IP Virtual Server
 *      data structure and functionality definitions
 */

#ifndef _IP_VS_H
#define _IP_VS_H

#include <linux/types.h>	/* For __beXX types in userland */

#define IP_VS_VERSION_CODE
#define NVERSION(version)

/*
 *      Virtual Service Flags
 */
#define IP_VS_SVC_F_PERSISTENT
#define IP_VS_SVC_F_HASHED
#define IP_VS_SVC_F_ONEPACKET
#define IP_VS_SVC_F_SCHED1
#define IP_VS_SVC_F_SCHED2
#define IP_VS_SVC_F_SCHED3

#define IP_VS_SVC_F_SCHED_SH_FALLBACK
#define IP_VS_SVC_F_SCHED_SH_PORT

/*
 *      Destination Server Flags
 */
#define IP_VS_DEST_F_AVAILABLE
#define IP_VS_DEST_F_OVERLOAD

/*
 *      IPVS sync daemon states
 */
#define IP_VS_STATE_NONE
#define IP_VS_STATE_MASTER
#define IP_VS_STATE_BACKUP

/*
 *      IPVS socket options
 */
#define IP_VS_BASE_CTL

#define IP_VS_SO_SET_NONE
#define IP_VS_SO_SET_INSERT
#define IP_VS_SO_SET_ADD
#define IP_VS_SO_SET_EDIT
#define IP_VS_SO_SET_DEL
#define IP_VS_SO_SET_FLUSH
#define IP_VS_SO_SET_LIST
#define IP_VS_SO_SET_ADDDEST
#define IP_VS_SO_SET_DELDEST
#define IP_VS_SO_SET_EDITDEST
#define IP_VS_SO_SET_TIMEOUT
#define IP_VS_SO_SET_STARTDAEMON
#define IP_VS_SO_SET_STOPDAEMON
#define IP_VS_SO_SET_RESTORE
#define IP_VS_SO_SET_SAVE
#define IP_VS_SO_SET_ZERO
#define IP_VS_SO_SET_MAX

#define IP_VS_SO_GET_VERSION
#define IP_VS_SO_GET_INFO
#define IP_VS_SO_GET_SERVICES
#define IP_VS_SO_GET_SERVICE
#define IP_VS_SO_GET_DESTS
#define IP_VS_SO_GET_DEST
#define IP_VS_SO_GET_TIMEOUT
#define IP_VS_SO_GET_DAEMON
#define IP_VS_SO_GET_MAX


/*
 *      IPVS Connection Flags
 *      Only flags 0..15 are sent to backup server
 */
#define IP_VS_CONN_F_FWD_MASK
#define IP_VS_CONN_F_MASQ
#define IP_VS_CONN_F_LOCALNODE
#define IP_VS_CONN_F_TUNNEL
#define IP_VS_CONN_F_DROUTE
#define IP_VS_CONN_F_BYPASS
#define IP_VS_CONN_F_SYNC
#define IP_VS_CONN_F_HASHED
#define IP_VS_CONN_F_NOOUTPUT
#define IP_VS_CONN_F_INACTIVE
#define IP_VS_CONN_F_OUT_SEQ
#define IP_VS_CONN_F_IN_SEQ
#define IP_VS_CONN_F_SEQ_MASK
#define IP_VS_CONN_F_NO_CPORT
#define IP_VS_CONN_F_TEMPLATE
#define IP_VS_CONN_F_ONE_PACKET

/* Initial bits allowed in backup server */
#define IP_VS_CONN_F_BACKUP_MASK

/* Bits allowed to update in backup server */
#define IP_VS_CONN_F_BACKUP_UPD_MASK

/* Flags that are not sent to backup server start from bit 16 */
#define IP_VS_CONN_F_NFCT

/* Connection flags from destination that can be changed by user space */
#define IP_VS_CONN_F_DEST_MASK

#define IP_VS_SCHEDNAME_MAXLEN
#define IP_VS_PENAME_MAXLEN
#define IP_VS_IFNAME_MAXLEN

#define IP_VS_PEDATA_MAXLEN

/* Tunnel types */
enum {};

/* Tunnel encapsulation flags */
#define IP_VS_TUNNEL_ENCAP_FLAG_NOCSUM
#define IP_VS_TUNNEL_ENCAP_FLAG_CSUM
#define IP_VS_TUNNEL_ENCAP_FLAG_REMCSUM

/*
 *	The struct ip_vs_service_user and struct ip_vs_dest_user are
 *	used to set IPVS rules through setsockopt.
 */
struct ip_vs_service_user {};


struct ip_vs_dest_user {};


/*
 *	IPVS statistics object (for user space)
 */
struct ip_vs_stats_user {};


/* The argument to IP_VS_SO_GET_INFO */
struct ip_vs_getinfo {};


/* The argument to IP_VS_SO_GET_SERVICE */
struct ip_vs_service_entry {};


struct ip_vs_dest_entry {};


/* The argument to IP_VS_SO_GET_DESTS */
struct ip_vs_get_dests {};


/* The argument to IP_VS_SO_GET_SERVICES */
struct ip_vs_get_services {};


/* The argument to IP_VS_SO_GET_TIMEOUT */
struct ip_vs_timeout_user {};


/* The argument to IP_VS_SO_GET_DAEMON */
struct ip_vs_daemon_user {};

/*
 *
 * IPVS Generic Netlink interface definitions
 *
 */

/* Generic Netlink family info */

#define IPVS_GENL_NAME
#define IPVS_GENL_VERSION

struct ip_vs_flags {};

/* Generic Netlink command attributes */
enum {};

#define IPVS_CMD_MAX

/* Attributes used in the first level of commands */
enum {};

#define IPVS_CMD_ATTR_MAX

/*
 * Attributes used to describe a service
 *
 * Used inside nested attribute IPVS_CMD_ATTR_SERVICE
 */
enum {};

#define IPVS_SVC_ATTR_MAX

/*
 * Attributes used to describe a destination (real server)
 *
 * Used inside nested attribute IPVS_CMD_ATTR_DEST
 */
enum {};

#define IPVS_DEST_ATTR_MAX

/*
 * Attributes describing a sync daemon
 *
 * Used inside nested attribute IPVS_CMD_ATTR_DAEMON
 */
enum {};

#define IPVS_DAEMON_ATTR_MAX

/*
 * Attributes used to describe service or destination entry statistics
 *
 * Used inside nested attributes IPVS_SVC_ATTR_STATS, IPVS_DEST_ATTR_STATS,
 * IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64.
 */
enum {};

#define IPVS_STATS_ATTR_MAX

/* Attributes used in response to IPVS_CMD_GET_INFO command */
enum {};

#define IPVS_INFO_ATTR_MAX

#endif	/* _IP_VS_H */