linux/net/netfilter/ipvs/ip_vs_proto.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ip_vs_proto.c: transport protocol load balancing support for IPVS
 *
 * Authors:     Wensong Zhang <[email protected]>
 *              Julian Anastasov <[email protected]>
 *
 * Changes:
 */

#define KMSG_COMPONENT
#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/gfp.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <net/protocol.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <linux/stat.h>
#include <linux/proc_fs.h>

#include <net/ip_vs.h>


/*
 * IPVS protocols can only be registered/unregistered when the ipvs
 * module is loaded/unloaded, so no lock is needed in accessing the
 * ipvs protocol table.
 */

#define IP_VS_PROTO_TAB_SIZE
#define IP_VS_PROTO_HASH(proto)

static struct ip_vs_protocol *ip_vs_proto_table[IP_VS_PROTO_TAB_SIZE];

/* States for conn templates: NONE or words separated with ",", max 15 chars */
static const char *ip_vs_ctpl_state_name_table[IP_VS_CTPL_S_LAST] =;

/*
 *	register an ipvs protocol
 */
static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
{}

/*
 *	register an ipvs protocols netns related data
 */
static int
register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp)
{}

/*
 *	unregister an ipvs protocol
 */
static int unregister_ip_vs_protocol(struct ip_vs_protocol *pp)
{}

/*
 *	unregister an ipvs protocols netns data
 */
static int
unregister_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd)
{}

/*
 *	get ip_vs_protocol object by its proto.
 */
struct ip_vs_protocol * ip_vs_proto_get(unsigned short proto)
{}
EXPORT_SYMBOL();

/*
 *	get ip_vs_protocol object data by netns and proto
 */
struct ip_vs_proto_data *
ip_vs_proto_data_get(struct netns_ipvs *ipvs, unsigned short proto)
{}
EXPORT_SYMBOL();

/*
 *	Propagate event for state change to all protocols
 */
void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags)
{}


int *
ip_vs_create_timeout_table(int *table, int size)
{}


const char *ip_vs_state_name(const struct ip_vs_conn *cp)
{}


static void
ip_vs_tcpudp_debug_packet_v4(struct ip_vs_protocol *pp,
			     const struct sk_buff *skb,
			     int offset,
			     const char *msg)
{}

#ifdef CONFIG_IP_VS_IPV6
static void
ip_vs_tcpudp_debug_packet_v6(struct ip_vs_protocol *pp,
			     const struct sk_buff *skb,
			     int offset,
			     const char *msg)
{}
#endif


void
ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp,
			  const struct sk_buff *skb,
			  int offset,
			  const char *msg)
{}

/*
 * per network name-space init
 */
int __net_init ip_vs_protocol_net_init(struct netns_ipvs *ipvs)
{}

void __net_exit ip_vs_protocol_net_cleanup(struct netns_ipvs *ipvs)
{}

int __init ip_vs_protocol_init(void)
{}


void ip_vs_protocol_cleanup(void)
{}