diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netns/ipv4.h | 2 | ||||
-rw-r--r-- | include/net/ping.h | 57 |
2 files changed, 59 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 542195d9469e..d786b4fc02a4 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -54,6 +54,8 @@ struct netns_ipv4 { | |||
54 | int sysctl_rt_cache_rebuild_count; | 54 | int sysctl_rt_cache_rebuild_count; |
55 | int current_rt_cache_rebuild_count; | 55 | int current_rt_cache_rebuild_count; |
56 | 56 | ||
57 | unsigned int sysctl_ping_group_range[2]; | ||
58 | |||
57 | atomic_t rt_genid; | 59 | atomic_t rt_genid; |
58 | atomic_t dev_addr_genid; | 60 | atomic_t dev_addr_genid; |
59 | 61 | ||
diff --git a/include/net/ping.h b/include/net/ping.h new file mode 100644 index 000000000000..23062c369c62 --- /dev/null +++ b/include/net/ping.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
3 | * operating system. INET is implemented using the BSD Socket | ||
4 | * interface as the means of communication with the user level. | ||
5 | * | ||
6 | * Definitions for the "ping" module. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | #ifndef _PING_H | ||
14 | #define _PING_H | ||
15 | |||
16 | #include <net/netns/hash.h> | ||
17 | |||
18 | /* PING_HTABLE_SIZE must be power of 2 */ | ||
19 | #define PING_HTABLE_SIZE 64 | ||
20 | #define PING_HTABLE_MASK (PING_HTABLE_SIZE-1) | ||
21 | |||
22 | #define ping_portaddr_for_each_entry(__sk, node, list) \ | ||
23 | hlist_nulls_for_each_entry(__sk, node, list, sk_nulls_node) | ||
24 | |||
25 | /* | ||
26 | * gid_t is either uint or ushort. We want to pass it to | ||
27 | * proc_dointvec_minmax(), so it must not be larger than MAX_INT | ||
28 | */ | ||
29 | #define GID_T_MAX (((gid_t)~0U) >> 1) | ||
30 | |||
31 | struct ping_table { | ||
32 | struct hlist_nulls_head hash[PING_HTABLE_SIZE]; | ||
33 | rwlock_t lock; | ||
34 | }; | ||
35 | |||
36 | struct ping_iter_state { | ||
37 | struct seq_net_private p; | ||
38 | int bucket; | ||
39 | }; | ||
40 | |||
41 | extern struct proto ping_prot; | ||
42 | |||
43 | |||
44 | extern void ping_rcv(struct sk_buff *); | ||
45 | extern void ping_err(struct sk_buff *, u32 info); | ||
46 | |||
47 | extern void inet_get_ping_group_range_net(struct net *net, unsigned int *low, unsigned int *high); | ||
48 | |||
49 | #ifdef CONFIG_PROC_FS | ||
50 | extern int __init ping_proc_init(void); | ||
51 | extern void ping_proc_exit(void); | ||
52 | #endif | ||
53 | |||
54 | void __init ping_init(void); | ||
55 | |||
56 | |||
57 | #endif /* _PING_H */ | ||