Xenomai  3.1
arp.h
1 /***
2  *
3  * include/ipv4/arp.h - Adress Resolution Protocol for RTnet
4  *
5  * RTnet - real-time networking subsystem
6  * Copyright (C) 1999,2000 Zentropic Computing, LLC
7  * 2002 Ulrich Marx <marx@kammer.uni-hannover.de>
8  * 2004 Jan Kiszka <jan.kiszka@web.de>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  */
25 
26 #ifndef __RTNET_ARP_H_
27 #define __RTNET_ARP_H_
28 
29 #include <linux/if_arp.h>
30 #include <linux/init.h>
31 #include <linux/types.h>
32 
33 #include <ipv4/route.h>
34 
35 #define RT_ARP_SKB_PRIO \
36  RTSKB_PRIO_VALUE(QUEUE_MIN_PRIO - 1, RTSKB_DEF_NRT_CHANNEL)
37 
38 void rt_arp_send(int type, int ptype, u32 dest_ip, struct rtnet_device *rtdev,
39  u32 src_ip, unsigned char *dest_hw, unsigned char *src_hw,
40  unsigned char *target_hw);
41 
42 static inline void rt_arp_solicit(struct rtnet_device *rtdev, u32 target)
43 {
44  rt_arp_send(ARPOP_REQUEST, ETH_P_ARP, target, rtdev, rtdev->local_ip,
45  NULL, NULL, NULL);
46 }
47 
48 void __init rt_arp_init(void);
49 void rt_arp_release(void);
50 
51 #endif /* __RTNET_ARP_H_ */