#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/capability.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/errno.h>
#include <linux/in.h>
#include <linux/mm.h>
#include <linux/inet.h>
#include <linux/inetdevice.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/fddidevice.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/net.h>
#include <linux/rcupdate.h>
#include <linux/slab.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
#endif
#include <net/net_namespace.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/route.h>
#include <net/protocol.h>
#include <net/tcp.h>
#include <net/sock.h>
#include <net/arp.h>
#include <net/ax25.h>
#include <net/netrom.h>
#include <net/dst_metadata.h>
#include <net/ip_tunnels.h>
#include <linux/uaccess.h>
#include <linux/netfilter_arp.h>
static u32 arp_hash(const void *pkey, const struct net_device *dev, __u32 *hash_rnd);
static bool arp_key_eq(const struct neighbour *n, const void *pkey);
static int arp_constructor(struct neighbour *neigh);
static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb);
static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb);
static void parp_redo(struct sk_buff *skb);
static int arp_is_multicast(const void *pkey);
static const struct neigh_ops arp_generic_ops = …;
static const struct neigh_ops arp_hh_ops = …;
static const struct neigh_ops arp_direct_ops = …;
struct neigh_table arp_tbl = …;
EXPORT_SYMBOL(…);
int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
{ … }
static u32 arp_hash(const void *pkey,
const struct net_device *dev,
__u32 *hash_rnd)
{ … }
static bool arp_key_eq(const struct neighbour *neigh, const void *pkey)
{ … }
static int arp_constructor(struct neighbour *neigh)
{ … }
static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
{ … }
static void arp_send_dst(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
const unsigned char *dest_hw,
const unsigned char *src_hw,
const unsigned char *target_hw,
struct dst_entry *dst)
{ … }
void arp_send(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
const unsigned char *dest_hw, const unsigned char *src_hw,
const unsigned char *target_hw)
{ … }
EXPORT_SYMBOL(…);
static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
{ … }
static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
{ … }
static int arp_accept(struct in_device *in_dev, __be32 sip)
{ … }
static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
{ … }
static inline int arp_fwd_proxy(struct in_device *in_dev,
struct net_device *dev, struct rtable *rt)
{ … }
static inline int arp_fwd_pvlan(struct in_device *in_dev,
struct net_device *dev, struct rtable *rt,
__be32 sip, __be32 tip)
{ … }
struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip,
const unsigned char *dest_hw,
const unsigned char *src_hw,
const unsigned char *target_hw)
{ … }
EXPORT_SYMBOL(…);
static int arp_xmit_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
{ … }
void arp_xmit(struct sk_buff *skb)
{ … }
EXPORT_SYMBOL(…);
static bool arp_is_garp(struct net *net, struct net_device *dev,
int *addr_type, __be16 ar_op,
__be32 sip, __be32 tip,
unsigned char *sha, unsigned char *tha)
{ … }
static int arp_process(struct net *net, struct sock *sk, struct sk_buff *skb)
{ … }
static void parp_redo(struct sk_buff *skb)
{ … }
static int arp_is_multicast(const void *pkey)
{ … }
static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{ … }
static struct net_device *arp_req_dev_by_name(struct net *net, struct arpreq *r,
bool getarp)
{ … }
static struct net_device *arp_req_dev(struct net *net, struct arpreq *r)
{ … }
static int arp_req_set_proxy(struct net *net, struct net_device *dev, int on)
{ … }
static int arp_req_set_public(struct net *net, struct arpreq *r,
struct net_device *dev)
{ … }
static int arp_req_set(struct net *net, struct arpreq *r)
{ … }
static unsigned int arp_state_to_flags(struct neighbour *neigh)
{ … }
static int arp_req_get(struct net *net, struct arpreq *r)
{ … }
int arp_invalidate(struct net_device *dev, __be32 ip, bool force)
{ … }
static int arp_req_delete_public(struct net *net, struct arpreq *r,
struct net_device *dev)
{ … }
static int arp_req_delete(struct net *net, struct arpreq *r)
{ … }
int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg)
{ … }
static int arp_netdev_event(struct notifier_block *this, unsigned long event,
void *ptr)
{ … }
static struct notifier_block arp_netdev_notifier = …;
void arp_ifdown(struct net_device *dev)
{ … }
static struct packet_type arp_packet_type __read_mostly = …;
#ifdef CONFIG_PROC_FS
#if IS_ENABLED(CONFIG_AX25)
static void ax2asc2(ax25_address *a, char *buf)
{ … }
#endif
#define HBUFFERLEN …
static void arp_format_neigh_entry(struct seq_file *seq,
struct neighbour *n)
{ … }
static void arp_format_pneigh_entry(struct seq_file *seq,
struct pneigh_entry *n)
{ … }
static int arp_seq_show(struct seq_file *seq, void *v)
{ … }
static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
{ … }
static const struct seq_operations arp_seq_ops = …;
#endif
static int __net_init arp_net_init(struct net *net)
{ … }
static void __net_exit arp_net_exit(struct net *net)
{ … }
static struct pernet_operations arp_net_ops = …;
void __init arp_init(void)
{ … }