diff options
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index ae328b680ff2..fa80ea48639d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -109,9 +109,10 @@ struct frag_hdr { | |||
109 | #include <net/sock.h> | 109 | #include <net/sock.h> |
110 | 110 | ||
111 | /* sysctls */ | 111 | /* sysctls */ |
112 | extern int sysctl_ipv6_bindv6only; | ||
113 | extern int sysctl_mld_max_msf; | 112 | extern int sysctl_mld_max_msf; |
114 | 113 | ||
114 | extern struct ctl_path net_ipv6_ctl_path[]; | ||
115 | |||
115 | #define _DEVINC(statname, modifier, idev, field) \ | 116 | #define _DEVINC(statname, modifier, idev, field) \ |
116 | ({ \ | 117 | ({ \ |
117 | struct inet6_dev *_idev = (idev); \ | 118 | struct inet6_dev *_idev = (idev); \ |
@@ -143,14 +144,6 @@ DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | |||
143 | #define ICMP6_INC_STATS_BH(idev, field) _DEVINC(icmpv6, _BH, idev, field) | 144 | #define ICMP6_INC_STATS_BH(idev, field) _DEVINC(icmpv6, _BH, idev, field) |
144 | #define ICMP6_INC_STATS_USER(idev, field) _DEVINC(icmpv6, _USER, idev, field) | 145 | #define ICMP6_INC_STATS_USER(idev, field) _DEVINC(icmpv6, _USER, idev, field) |
145 | 146 | ||
146 | #define ICMP6_INC_STATS_OFFSET_BH(idev, field, offset) ({ \ | ||
147 | struct inet6_dev *_idev = idev; \ | ||
148 | __typeof__(offset) _offset = (offset); \ | ||
149 | if (likely(_idev != NULL)) \ | ||
150 | SNMP_INC_STATS_OFFSET_BH(_idev->stats.icmpv6, field, _offset); \ | ||
151 | SNMP_INC_STATS_OFFSET_BH(icmpv6_statistics, field, _offset); \ | ||
152 | }) | ||
153 | |||
154 | #define ICMP6MSGOUT_INC_STATS(idev, field) \ | 147 | #define ICMP6MSGOUT_INC_STATS(idev, field) \ |
155 | _DEVINC(icmpv6msg, , idev, field +256) | 148 | _DEVINC(icmpv6msg, , idev, field +256) |
156 | #define ICMP6MSGOUT_INC_STATS_BH(idev, field) \ | 149 | #define ICMP6MSGOUT_INC_STATS_BH(idev, field) \ |
@@ -164,15 +157,6 @@ DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | |||
164 | #define ICMP6MSGIN_INC_STATS_USER(idev, field) \ | 157 | #define ICMP6MSGIN_INC_STATS_USER(idev, field) \ |
165 | _DEVINC(icmpv6msg, _USER, idev, field) | 158 | _DEVINC(icmpv6msg, _USER, idev, field) |
166 | 159 | ||
167 | DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); | ||
168 | DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | ||
169 | #define UDP6_INC_STATS_BH(field, is_udplite) do { \ | ||
170 | if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ | ||
171 | else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0) | ||
172 | #define UDP6_INC_STATS_USER(field, is_udplite) do { \ | ||
173 | if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ | ||
174 | else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) | ||
175 | |||
176 | struct ip6_ra_chain | 160 | struct ip6_ra_chain |
177 | { | 161 | { |
178 | struct ip6_ra_chain *next; | 162 | struct ip6_ra_chain *next; |
@@ -236,7 +220,7 @@ extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_spac | |||
236 | struct ipv6_txoptions * fopt); | 220 | struct ipv6_txoptions * fopt); |
237 | extern void fl6_free_socklist(struct sock *sk); | 221 | extern void fl6_free_socklist(struct sock *sk); |
238 | extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); | 222 | extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); |
239 | extern void ip6_flowlabel_init(void); | 223 | extern int ip6_flowlabel_init(void); |
240 | extern void ip6_flowlabel_cleanup(void); | 224 | extern void ip6_flowlabel_cleanup(void); |
241 | 225 | ||
242 | static inline void fl6_sock_release(struct ip6_flowlabel *fl) | 226 | static inline void fl6_sock_release(struct ip6_flowlabel *fl) |
@@ -261,8 +245,8 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | |||
261 | 245 | ||
262 | extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); | 246 | extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); |
263 | 247 | ||
264 | int ip6_frag_nqueues(void); | 248 | int ip6_frag_nqueues(struct net *net); |
265 | int ip6_frag_mem(void); | 249 | int ip6_frag_mem(struct net *net); |
266 | 250 | ||
267 | #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ | 251 | #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ |
268 | 252 | ||
@@ -509,6 +493,9 @@ extern int ip6_forward(struct sk_buff *skb); | |||
509 | extern int ip6_input(struct sk_buff *skb); | 493 | extern int ip6_input(struct sk_buff *skb); |
510 | extern int ip6_mc_input(struct sk_buff *skb); | 494 | extern int ip6_mc_input(struct sk_buff *skb); |
511 | 495 | ||
496 | extern int __ip6_local_out(struct sk_buff *skb); | ||
497 | extern int ip6_local_out(struct sk_buff *skb); | ||
498 | |||
512 | /* | 499 | /* |
513 | * Extension header (options) processing | 500 | * Extension header (options) processing |
514 | */ | 501 | */ |
@@ -559,7 +546,7 @@ extern int compat_ipv6_getsockopt(struct sock *sk, | |||
559 | char __user *optval, | 546 | char __user *optval, |
560 | int __user *optlen); | 547 | int __user *optlen); |
561 | 548 | ||
562 | extern void ipv6_packet_init(void); | 549 | extern int ipv6_packet_init(void); |
563 | 550 | ||
564 | extern void ipv6_packet_cleanup(void); | 551 | extern void ipv6_packet_cleanup(void); |
565 | 552 | ||
@@ -585,9 +572,6 @@ extern int inet6_hash_connect(struct inet_timewait_death_row *death_row, | |||
585 | /* | 572 | /* |
586 | * reassembly.c | 573 | * reassembly.c |
587 | */ | 574 | */ |
588 | struct inet_frags_ctl; | ||
589 | extern struct inet_frags_ctl ip6_frags_ctl; | ||
590 | |||
591 | extern const struct proto_ops inet6_stream_ops; | 575 | extern const struct proto_ops inet6_stream_ops; |
592 | extern const struct proto_ops inet6_dgram_ops; | 576 | extern const struct proto_ops inet6_dgram_ops; |
593 | 577 | ||
@@ -602,6 +586,9 @@ extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | |||
602 | int __user *optlen); | 586 | int __user *optlen); |
603 | 587 | ||
604 | #ifdef CONFIG_PROC_FS | 588 | #ifdef CONFIG_PROC_FS |
589 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | ||
590 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | ||
591 | |||
605 | extern int ac6_proc_init(void); | 592 | extern int ac6_proc_init(void); |
606 | extern void ac6_proc_exit(void); | 593 | extern void ac6_proc_exit(void); |
607 | extern int raw6_proc_init(void); | 594 | extern int raw6_proc_init(void); |
@@ -631,10 +618,10 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev) | |||
631 | #endif | 618 | #endif |
632 | 619 | ||
633 | #ifdef CONFIG_SYSCTL | 620 | #ifdef CONFIG_SYSCTL |
634 | extern ctl_table ipv6_route_table[]; | 621 | extern ctl_table ipv6_route_table_template[]; |
635 | extern ctl_table ipv6_icmp_table[]; | 622 | extern ctl_table ipv6_icmp_table_template[]; |
636 | 623 | ||
637 | extern void ipv6_sysctl_register(void); | 624 | extern int ipv6_sysctl_register(void); |
638 | extern void ipv6_sysctl_unregister(void); | 625 | extern void ipv6_sysctl_unregister(void); |
639 | #endif | 626 | #endif |
640 | 627 | ||