aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-12 09:05:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-12 09:05:39 -0400
commita9b9e81c915e4a57ac3b21d1a7fa7ff184639780 (patch)
tree98304395fbb5b9c74fca35b196cd414c1949f280 /include/net/ipv6.h
parenta8b71a2810386a5ac8f43d2095fe3355f0d8db37 (diff)
parentfd048088306656824958e7783ffcee27e241b361 (diff)
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 113028fb8f66..6d5b58a1c743 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -110,43 +110,42 @@ struct frag_hdr {
110extern int sysctl_mld_max_msf; 110extern int sysctl_mld_max_msf;
111extern struct ctl_path net_ipv6_ctl_path[]; 111extern struct ctl_path net_ipv6_ctl_path[];
112 112
113#define _DEVINC(statname, modifier, idev, field) \ 113#define _DEVINC(net, statname, modifier, idev, field) \
114({ \ 114({ \
115 struct inet6_dev *_idev = (idev); \ 115 struct inet6_dev *_idev = (idev); \
116 if (likely(_idev != NULL)) \ 116 if (likely(_idev != NULL)) \
117 SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \ 117 SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \
118 SNMP_INC_STATS##modifier(statname##_statistics, (field)); \ 118 SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\
119}) 119})
120 120
121#define _DEVADD(statname, modifier, idev, field, val) \ 121#define _DEVADD(net, statname, modifier, idev, field, val) \
122({ \ 122({ \
123 struct inet6_dev *_idev = (idev); \ 123 struct inet6_dev *_idev = (idev); \
124 if (likely(_idev != NULL)) \ 124 if (likely(_idev != NULL)) \
125 SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \ 125 SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \
126 SNMP_ADD_STATS##modifier(statname##_statistics, (field), (val));\ 126 SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\
127}) 127})
128 128
129/* MIBs */ 129/* MIBs */
130DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics);
131 130
132#define IP6_INC_STATS(idev,field) _DEVINC(ipv6, , idev, field) 131#define IP6_INC_STATS(net, idev,field) \
133#define IP6_INC_STATS_BH(idev,field) _DEVINC(ipv6, _BH, idev, field) 132 _DEVINC(net, ipv6, , idev, field)
134#define IP6_ADD_STATS_BH(idev,field,val) _DEVADD(ipv6, _BH, idev, field, val) 133#define IP6_INC_STATS_BH(net, idev,field) \
135 134 _DEVINC(net, ipv6, _BH, idev, field)
136DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); 135#define IP6_ADD_STATS_BH(net, idev,field,val) \
137DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); 136 _DEVADD(net, ipv6, _BH, idev, field, val)
138 137
139#define ICMP6_INC_STATS(idev, field) _DEVINC(icmpv6, , idev, field) 138#define ICMP6_INC_STATS(net, idev, field) \
140#define ICMP6_INC_STATS_BH(idev, field) _DEVINC(icmpv6, _BH, idev, field) 139 _DEVINC(net, icmpv6, , idev, field)
141 140#define ICMP6_INC_STATS_BH(net, idev, field) \
142#define ICMP6MSGOUT_INC_STATS(idev, field) \ 141 _DEVINC(net, icmpv6, _BH, idev, field)
143 _DEVINC(icmpv6msg, , idev, field +256) 142
144#define ICMP6MSGOUT_INC_STATS_BH(idev, field) \ 143#define ICMP6MSGOUT_INC_STATS(net, idev, field) \
145 _DEVINC(icmpv6msg, _BH, idev, field +256) 144 _DEVINC(net, icmpv6msg, , idev, field +256)
146#define ICMP6MSGIN_INC_STATS(idev, field) \ 145#define ICMP6MSGOUT_INC_STATS_BH(net, idev, field) \
147 _DEVINC(icmpv6msg, , idev, field) 146 _DEVINC(net, icmpv6msg, _BH, idev, field +256)
148#define ICMP6MSGIN_INC_STATS_BH(idev, field) \ 147#define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \
149 _DEVINC(icmpv6msg, _BH, idev, field) 148 _DEVINC(net, icmpv6msg, _BH, idev, field)
150 149
151struct ip6_ra_chain 150struct ip6_ra_chain
152{ 151{
@@ -576,6 +575,8 @@ extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf);
576extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 575extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
577 struct group_filter __user *optval, 576 struct group_filter __user *optval,
578 int __user *optlen); 577 int __user *optlen);
578extern unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
579 const struct in6_addr *daddr, u32 rnd);
579 580
580#ifdef CONFIG_PROC_FS 581#ifdef CONFIG_PROC_FS
581extern int ac6_proc_init(struct net *net); 582extern int ac6_proc_init(struct net *net);