#define pr_fmt(fmt) …
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/string.h>
#include <linux/sockios.h>
#include <linux/net.h>
#include <linux/capability.h>
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/netfilter_ipv4.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/inet.h>
#include <linux/igmp.h>
#include <linux/inetdevice.h>
#include <linux/netdevice.h>
#include <net/checksum.h>
#include <net/ip.h>
#include <net/protocol.h>
#include <net/arp.h>
#include <net/route.h>
#include <net/ip_fib.h>
#include <net/inet_connection_sock.h>
#include <net/gro.h>
#include <net/gso.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/udplite.h>
#include <net/ping.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/raw.h>
#include <net/icmp.h>
#include <net/inet_common.h>
#include <net/ip_tunnels.h>
#include <net/xfrm.h>
#include <net/net_namespace.h>
#include <net/secure_seq.h>
#ifdef CONFIG_IP_MROUTE
#include <linux/mroute.h>
#endif
#include <net/l3mdev.h>
#include <net/compat.h>
#include <net/rps.h>
#include <trace/events/sock.h>
static struct list_head inetsw[SOCK_MAX];
static DEFINE_SPINLOCK(inetsw_lock);
void inet_sock_destruct(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);
static int inet_autobind(struct sock *sk)
{ … }
int __inet_listen_sk(struct sock *sk, int backlog)
{ … }
int inet_listen(struct socket *sock, int backlog)
{ … }
EXPORT_SYMBOL(…);
static int inet_create(struct net *net, struct socket *sock, int protocol,
int kern)
{ … }
int inet_release(struct socket *sock)
{ … }
EXPORT_SYMBOL(…);
int inet_bind_sk(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{ … }
int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{ … }
EXPORT_SYMBOL(…);
int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
u32 flags)
{ … }
int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
int addr_len, int flags)
{ … }
EXPORT_SYMBOL(…);
static long inet_wait_for_connect(struct sock *sk, long timeo, int writebias)
{ … }
int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
int addr_len, int flags, int is_sendmsg)
{ … }
EXPORT_SYMBOL(…);
int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
int addr_len, int flags)
{ … }
EXPORT_SYMBOL(…);
void __inet_accept(struct socket *sock, struct socket *newsock, struct sock *newsk)
{ … }
int inet_accept(struct socket *sock, struct socket *newsock,
struct proto_accept_arg *arg)
{ … }
EXPORT_SYMBOL(…);
int inet_getname(struct socket *sock, struct sockaddr *uaddr,
int peer)
{ … }
EXPORT_SYMBOL(…);
int inet_send_prepare(struct sock *sk)
{ … }
EXPORT_SYMBOL_GPL(…);
int inet_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
{ … }
EXPORT_SYMBOL(…);
void inet_splice_eof(struct socket *sock)
{ … }
EXPORT_SYMBOL_GPL(…);
INDIRECT_CALLABLE_DECLARE(…);
int inet_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
int flags)
{ … }
EXPORT_SYMBOL(…);
int inet_shutdown(struct socket *sock, int how)
{ … }
EXPORT_SYMBOL(…);
int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_COMPAT
static int inet_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
struct compat_rtentry __user *ur)
{ … }
static int inet_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ … }
#endif
const struct proto_ops inet_stream_ops = …;
EXPORT_SYMBOL(…);
const struct proto_ops inet_dgram_ops = …;
EXPORT_SYMBOL(…);
static const struct proto_ops inet_sockraw_ops = …;
static const struct net_proto_family inet_family_ops = …;
static struct inet_protosw inetsw_array[] = …;
#define INETSW_ARRAY_LEN …
void inet_register_protosw(struct inet_protosw *p)
{ … }
EXPORT_SYMBOL(…);
void inet_unregister_protosw(struct inet_protosw *p)
{ … }
EXPORT_SYMBOL(…);
static int inet_sk_reselect_saddr(struct sock *sk)
{ … }
int inet_sk_rebuild_header(struct sock *sk)
{ … }
EXPORT_SYMBOL(…);
void inet_sk_set_state(struct sock *sk, int state)
{ … }
EXPORT_SYMBOL(…);
void inet_sk_state_store(struct sock *sk, int newstate)
{ … }
struct sk_buff *inet_gso_segment(struct sk_buff *skb,
netdev_features_t features)
{ … }
static struct sk_buff *ipip_gso_segment(struct sk_buff *skb,
netdev_features_t features)
{ … }
struct sk_buff *inet_gro_receive(struct list_head *head, struct sk_buff *skb)
{ … }
static struct sk_buff *ipip_gro_receive(struct list_head *head,
struct sk_buff *skb)
{ … }
#define SECONDS_PER_DAY …
__be32 inet_current_timestamp(void)
{ … }
EXPORT_SYMBOL(…);
int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
{ … }
EXPORT_SYMBOL(…);
int inet_gro_complete(struct sk_buff *skb, int nhoff)
{ … }
static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
{ … }
int inet_ctl_sock_create(struct sock **sk, unsigned short family,
unsigned short type, unsigned char protocol,
struct net *net)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned long snmp_fold_field(void __percpu *mib, int offt)
{ … }
EXPORT_SYMBOL_GPL(…);
#if BITS_PER_LONG==32
u64 snmp_get_cpu_field64(void __percpu *mib, int cpu, int offt,
size_t syncp_offset)
{
void *bhptr;
struct u64_stats_sync *syncp;
u64 v;
unsigned int start;
bhptr = per_cpu_ptr(mib, cpu);
syncp = (struct u64_stats_sync *)(bhptr + syncp_offset);
do {
start = u64_stats_fetch_begin(syncp);
v = *(((u64 *)bhptr) + offt);
} while (u64_stats_fetch_retry(syncp, start));
return v;
}
EXPORT_SYMBOL_GPL(snmp_get_cpu_field64);
u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_offset)
{
u64 res = 0;
int cpu;
for_each_possible_cpu(cpu) {
res += snmp_get_cpu_field64(mib, cpu, offt, syncp_offset);
}
return res;
}
EXPORT_SYMBOL_GPL(snmp_fold_field64);
#endif
#ifdef CONFIG_IP_MULTICAST
static const struct net_protocol igmp_protocol = …;
#endif
static const struct net_protocol icmp_protocol = …;
static __net_init int ipv4_mib_init_net(struct net *net)
{ … }
static __net_exit void ipv4_mib_exit_net(struct net *net)
{ … }
static __net_initdata struct pernet_operations ipv4_mib_ops = …;
static int __init init_ipv4_mibs(void)
{ … }
static __net_init int inet_init_net(struct net *net)
{ … }
static __net_initdata struct pernet_operations af_inet_ops = …;
static int __init init_inet_pernet_ops(void)
{ … }
static int ipv4_proc_init(void);
static const struct net_offload ipip_offload = …;
static int __init ipip_offload_init(void)
{ … }
static int __init ipv4_offload_init(void)
{ … }
fs_initcall(ipv4_offload_init);
static struct packet_type ip_packet_type __read_mostly = …;
static int __init inet_init(void)
{ … }
fs_initcall(inet_init);
#ifdef CONFIG_PROC_FS
static int __init ipv4_proc_init(void)
{ … }
#else
static int __init ipv4_proc_init(void)
{
return 0;
}
#endif