diff options
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 47 |
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 { | |||
110 | extern int sysctl_mld_max_msf; | 110 | extern int sysctl_mld_max_msf; |
111 | extern struct ctl_path net_ipv6_ctl_path[]; | 111 | extern 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 */ |
130 | DECLARE_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) | |
136 | DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); | 135 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ |
137 | DECLARE_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 | ||
151 | struct ip6_ra_chain | 150 | struct ip6_ra_chain |
152 | { | 151 | { |
@@ -576,6 +575,8 @@ extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); | |||
576 | extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | 575 | extern 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); |
578 | extern 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 |
581 | extern int ac6_proc_init(struct net *net); | 582 | extern int ac6_proc_init(struct net *net); |