aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h43
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 */
112extern int sysctl_ipv6_bindv6only;
113extern int sysctl_mld_max_msf; 112extern int sysctl_mld_max_msf;
114 113
114extern 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
167DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6);
168DECLARE_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
176struct ip6_ra_chain 160struct 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);
237extern void fl6_free_socklist(struct sock *sk); 221extern void fl6_free_socklist(struct sock *sk);
238extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 222extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen);
239extern void ip6_flowlabel_init(void); 223extern int ip6_flowlabel_init(void);
240extern void ip6_flowlabel_cleanup(void); 224extern void ip6_flowlabel_cleanup(void);
241 225
242static inline void fl6_sock_release(struct ip6_flowlabel *fl) 226static 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
262extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); 246extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
263 247
264int ip6_frag_nqueues(void); 248int ip6_frag_nqueues(struct net *net);
265int ip6_frag_mem(void); 249int 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);
509extern int ip6_input(struct sk_buff *skb); 493extern int ip6_input(struct sk_buff *skb);
510extern int ip6_mc_input(struct sk_buff *skb); 494extern int ip6_mc_input(struct sk_buff *skb);
511 495
496extern int __ip6_local_out(struct sk_buff *skb);
497extern 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
562extern void ipv6_packet_init(void); 549extern int ipv6_packet_init(void);
563 550
564extern void ipv6_packet_cleanup(void); 551extern 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 */
588struct inet_frags_ctl;
589extern struct inet_frags_ctl ip6_frags_ctl;
590
591extern const struct proto_ops inet6_stream_ops; 575extern const struct proto_ops inet6_stream_ops;
592extern const struct proto_ops inet6_dgram_ops; 576extern 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
589extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
590extern struct ctl_table *ipv6_route_sysctl_init(struct net *net);
591
605extern int ac6_proc_init(void); 592extern int ac6_proc_init(void);
606extern void ac6_proc_exit(void); 593extern void ac6_proc_exit(void);
607extern int raw6_proc_init(void); 594extern 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
634extern ctl_table ipv6_route_table[]; 621extern ctl_table ipv6_route_table_template[];
635extern ctl_table ipv6_icmp_table[]; 622extern ctl_table ipv6_icmp_table_template[];
636 623
637extern void ipv6_sysctl_register(void); 624extern int ipv6_sysctl_register(void);
638extern void ipv6_sysctl_unregister(void); 625extern void ipv6_sysctl_unregister(void);
639#endif 626#endif
640 627