#include <linux/types.h>
#include <linux/atomic.h>
#include <asm/byteorder.h>
#include <asm/current.h>
#include <linux/uaccess.h>
#include <asm/ioctls.h>
#include <linux/stddef.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/sockios.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/mroute.h>
#include <linux/netdevice.h>
#include <linux/in_route.h>
#include <linux/route.h>
#include <linux/skbuff.h>
#include <linux/igmp.h>
#include <net/net_namespace.h>
#include <net/dst.h>
#include <net/sock.h>
#include <linux/ip.h>
#include <linux/net.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/udp.h>
#include <net/raw.h>
#include <net/snmp.h>
#include <net/tcp_states.h>
#include <net/inet_common.h>
#include <net/checksum.h>
#include <net/xfrm.h>
#include <linux/rtnetlink.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
#include <linux/compat.h>
#include <linux/uio.h>
struct raw_frag_vec { … };
struct raw_hashinfo raw_v4_hashinfo;
EXPORT_SYMBOL_GPL(…);
int raw_hash_sk(struct sock *sk)
{ … }
EXPORT_SYMBOL_GPL(…);
void raw_unhash_sk(struct sock *sk)
{ … }
EXPORT_SYMBOL_GPL(…);
bool raw_v4_match(struct net *net, const struct sock *sk, unsigned short num,
__be32 raddr, __be32 laddr, int dif, int sdif)
{ … }
EXPORT_SYMBOL_GPL(…);
static int icmp_filter(const struct sock *sk, const struct sk_buff *skb)
{ … }
static int raw_v4_input(struct net *net, struct sk_buff *skb,
const struct iphdr *iph, int hash)
{ … }
int raw_local_deliver(struct sk_buff *skb, int protocol)
{ … }
static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info)
{ … }
void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info)
{ … }
static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ … }
int raw_rcv(struct sock *sk, struct sk_buff *skb)
{ … }
static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
struct msghdr *msg, size_t length,
struct rtable **rtp, unsigned int flags,
const struct sockcm_cookie *sockc)
{ … }
static int raw_probe_proto_opt(struct raw_frag_vec *rfv, struct flowi4 *fl4)
{ … }
static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
struct sk_buff *skb)
{ … }
static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{ … }
static void raw_close(struct sock *sk, long timeout)
{ … }
static void raw_destroy(struct sock *sk)
{ … }
static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{ … }
static int raw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int flags, int *addr_len)
{ … }
static int raw_sk_init(struct sock *sk)
{ … }
static int raw_seticmpfilter(struct sock *sk, sockptr_t optval, int optlen)
{ … }
static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *optlen)
{ … }
static int do_raw_setsockopt(struct sock *sk, int optname,
sockptr_t optval, unsigned int optlen)
{ … }
static int raw_setsockopt(struct sock *sk, int level, int optname,
sockptr_t optval, unsigned int optlen)
{ … }
static int do_raw_getsockopt(struct sock *sk, int optname,
char __user *optval, int __user *optlen)
{ … }
static int raw_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{ … }
static int raw_ioctl(struct sock *sk, int cmd, int *karg)
{ … }
#ifdef CONFIG_COMPAT
static int compat_raw_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg)
{ … }
#endif
int raw_abort(struct sock *sk, int err)
{ … }
EXPORT_SYMBOL_GPL(…);
struct proto raw_prot = …;
#ifdef CONFIG_PROC_FS
static struct sock *raw_get_first(struct seq_file *seq, int bucket)
{ … }
static struct sock *raw_get_next(struct seq_file *seq, struct sock *sk)
{ … }
static struct sock *raw_get_idx(struct seq_file *seq, loff_t pos)
{ … }
void *raw_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(&h->lock)
{ … }
EXPORT_SYMBOL_GPL(…);
void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
EXPORT_SYMBOL_GPL(…);
void raw_seq_stop(struct seq_file *seq, void *v)
__releases(&h->lock)
{ … }
EXPORT_SYMBOL_GPL(…);
static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
{ … }
static int raw_seq_show(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations raw_seq_ops = …;
static __net_init int raw_init_net(struct net *net)
{ … }
static __net_exit void raw_exit_net(struct net *net)
{ … }
static __net_initdata struct pernet_operations raw_net_ops = …;
int __init raw_proc_init(void)
{ … }
void __init raw_proc_exit(void)
{ … }
#endif
static void raw_sysctl_init_net(struct net *net)
{ … }
static int __net_init raw_sysctl_init(struct net *net)
{ … }
static struct pernet_operations __net_initdata raw_sysctl_ops = …;
void __init raw_init(void)
{ … }