#define KMSG_COMPONENT …
#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <net/ip.h>
#include <net/tcp.h>
#include <net/ip6_checksum.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
#include <linux/indirect_call_wrapper.h>
#include <net/ip_vs.h>
static int
tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp);
static int
tcp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb,
struct ip_vs_proto_data *pd,
int *verdict, struct ip_vs_conn **cpp,
struct ip_vs_iphdr *iph)
{ … }
static inline void
tcp_fast_csum_update(int af, struct tcphdr *tcph,
const union nf_inet_addr *oldip,
const union nf_inet_addr *newip,
__be16 oldport, __be16 newport)
{ … }
static inline void
tcp_partial_csum_update(int af, struct tcphdr *tcph,
const union nf_inet_addr *oldip,
const union nf_inet_addr *newip,
__be16 oldlen, __be16 newlen)
{ … }
INDIRECT_CALLABLE_SCOPE int
tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp,
struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)
{ … }
static int
tcp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp,
struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)
{ … }
static int
tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp)
{ … }
#define TCP_DIR_INPUT …
#define TCP_DIR_OUTPUT …
#define TCP_DIR_INPUT_ONLY …
static const int tcp_state_off[IP_VS_DIR_LAST] = …;
static const int tcp_timeouts[IP_VS_TCP_S_LAST+1] = …;
static const char *const tcp_state_name_table[IP_VS_TCP_S_LAST+1] = …;
static const bool tcp_state_active_table[IP_VS_TCP_S_LAST] = …;
#define sNO …
#define sES …
#define sSS …
#define sSR …
#define sFW …
#define sTW …
#define sCL …
#define sCW …
#define sLA …
#define sLI …
#define sSA …
struct tcp_states_t { … };
static const char * tcp_state_name(int state)
{ … }
static bool tcp_state_active(int state)
{ … }
static struct tcp_states_t tcp_states[] = …;
static struct tcp_states_t tcp_states_dos[] = …;
static void tcp_timeout_change(struct ip_vs_proto_data *pd, int flags)
{ … }
static inline int tcp_state_idx(struct tcphdr *th)
{ … }
static inline void
set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp,
int direction, struct tcphdr *th)
{ … }
static void
tcp_state_transition(struct ip_vs_conn *cp, int direction,
const struct sk_buff *skb,
struct ip_vs_proto_data *pd)
{ … }
static inline __u16 tcp_app_hashkey(__be16 port)
{ … }
static int tcp_register_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc)
{ … }
static void
tcp_unregister_app(struct netns_ipvs *ipvs, struct ip_vs_app *inc)
{ … }
static int
tcp_app_conn_bind(struct ip_vs_conn *cp)
{ … }
void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp)
{ … }
static int __ip_vs_tcp_init(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd)
{ … }
static void __ip_vs_tcp_exit(struct netns_ipvs *ipvs, struct ip_vs_proto_data *pd)
{ … }
struct ip_vs_protocol ip_vs_protocol_tcp = …;