Xenomai  3.1
icmp.h
1 /***
2  *
3  * ipv4/icmp.h
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, 2005 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_ICMP_H_
27 #define __RTNET_ICMP_H_
28 
29 #include <linux/init.h>
30 
31 #include <rtskb.h>
32 #include <rtnet_rtpc.h>
33 #include <ipv4/protocol.h>
34 
35 #define RT_ICMP_PRIO RTSKB_PRIO_VALUE(QUEUE_MIN_PRIO - 1, RTSKB_DEF_NRT_CHANNEL)
36 
37 #define ICMP_REPLY_POOL_SIZE 8
38 
39 void rt_icmp_queue_echo_request(struct rt_proc_call *call);
40 void rt_icmp_dequeue_echo_request(struct rt_proc_call *call);
41 void rt_icmp_cleanup_echo_requests(void);
42 int rt_icmp_send_echo(u32 daddr, u16 id, u16 sequence, size_t msg_size);
43 
44 #ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4_ICMP
45 void __init rt_icmp_init(void);
46 void rt_icmp_release(void);
47 #else /* !CONFIG_XENO_DRIVERS_NET_RTIPV4_ICMP */
48 #define rt_icmp_init() \
49  do { \
50  } while (0)
51 #define rt_icmp_release() \
52  do { \
53  } while (0)
54 #endif /* CONFIG_XENO_DRIVERS_NET_RTIPV4_ICMP */
55 
56 #endif /* __RTNET_ICMP_H_ */