xref: /openbmc/linux/include/net/arp.h (revision f610b74b14d74a069f61583131e689550fd5bab3)
11da177e4SLinus Torvalds /* linux/net/inet/arp.h */
21da177e4SLinus Torvalds #ifndef _ARP_H
31da177e4SLinus Torvalds #define _ARP_H
41da177e4SLinus Torvalds 
51da177e4SLinus Torvalds #include <linux/if_arp.h>
61da177e4SLinus Torvalds #include <net/neighbour.h>
71da177e4SLinus Torvalds 
81da177e4SLinus Torvalds 
91da177e4SLinus Torvalds extern struct neigh_table arp_tbl;
101da177e4SLinus Torvalds 
11*f610b74bSDavid S. Miller static inline u32 arp_hashfn(u32 key, const struct net_device *dev, u32 hash_rnd)
12*f610b74bSDavid S. Miller {
13*f610b74bSDavid S. Miller 	u32 val = key ^ dev->ifindex;
14*f610b74bSDavid S. Miller 
15*f610b74bSDavid S. Miller 	return val * hash_rnd;
16*f610b74bSDavid S. Miller }
17*f610b74bSDavid S. Miller 
181da177e4SLinus Torvalds extern void	arp_init(void);
191da177e4SLinus Torvalds extern int	arp_find(unsigned char *haddr, struct sk_buff *skb);
2032e569b7SPavel Emelyanov extern int	arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
21ed9bad06SAl Viro extern void     arp_send(int type, int ptype, __be32 dest_ip,
22ed9bad06SAl Viro 			 struct net_device *dev, __be32 src_ip,
23abfdf1c4SJan Engelhardt 			 const unsigned char *dest_hw,
24abfdf1c4SJan Engelhardt 			 const unsigned char *src_hw, const unsigned char *th);
251da177e4SLinus Torvalds extern int	arp_bind_neighbour(struct dst_entry *dst);
26714e85beSAl Viro extern int	arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
271da177e4SLinus Torvalds extern void	arp_ifdown(struct net_device *dev);
281da177e4SLinus Torvalds 
29ed9bad06SAl Viro extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
30ed9bad06SAl Viro 				  struct net_device *dev, __be32 src_ip,
31abfdf1c4SJan Engelhardt 				  const unsigned char *dest_hw,
32abfdf1c4SJan Engelhardt 				  const unsigned char *src_hw,
33abfdf1c4SJan Engelhardt 				  const unsigned char *target_hw);
341da177e4SLinus Torvalds extern void arp_xmit(struct sk_buff *skb);
35545ecdc3SMaxim Levitsky int arp_invalidate(struct net_device *dev, __be32 ip);
361da177e4SLinus Torvalds 
371da177e4SLinus Torvalds #endif	/* _ARP_H */
38