summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netinet6/ip6_var.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-06 16:20:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-11 10:08:08 +0100
commit66659ff1ad6831b0ea7425fa6ecd8a8687523658 (patch)
tree48e22b475fa8854128e0861a33fed6f78c8094b5 /freebsd/sys/netinet6/ip6_var.h
parentDefine __GLOBL1() and __GLOBL() (diff)
downloadrtems-libbsd-66659ff1ad6831b0ea7425fa6ecd8a8687523658.tar.bz2
Update to FreeBSD 9.2
Diffstat (limited to 'freebsd/sys/netinet6/ip6_var.h')
-rw-r--r--freebsd/sys/netinet6/ip6_var.h138
1 files changed, 76 insertions, 62 deletions
diff --git a/freebsd/sys/netinet6/ip6_var.h b/freebsd/sys/netinet6/ip6_var.h
index 9e210e2d..4a094d42 100644
--- a/freebsd/sys/netinet6/ip6_var.h
+++ b/freebsd/sys/netinet6/ip6_var.h
@@ -204,12 +204,14 @@ struct ip6stat {
u_quad_t ip6s_rawout; /* total raw ip packets generated */
u_quad_t ip6s_badscope; /* scope error */
u_quad_t ip6s_notmember; /* don't join this multicast group */
- u_quad_t ip6s_nxthist[256]; /* next header history */
+#define IP6S_HDRCNT 256 /* headers count */
+ u_quad_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
u_quad_t ip6s_m1; /* one mbuf */
- u_quad_t ip6s_m2m[32]; /* two or more mbuf */
+#define IP6S_M2MMAX 32
+ u_quad_t ip6s_m2m[IP6S_M2MMAX]; /* two or more mbuf */
u_quad_t ip6s_mext1; /* one ext mbuf */
u_quad_t ip6s_mext2m; /* two or more ext mbuf */
- u_quad_t ip6s_exthdrtoolong; /* ext hdr are not continuous */
+ u_quad_t ip6s_exthdrtoolong; /* ext hdr are not contiguous */
u_quad_t ip6s_nogif; /* no match gif found */
u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */
@@ -218,27 +220,29 @@ struct ip6stat {
* algorithm:
* XXX: hardcoded 16 = # of ip6 multicast scope types + 1
*/
+#define IP6S_RULESMAX 16
+#define IP6S_SCOPECNT 16
/* number of times that address selection fails */
u_quad_t ip6s_sources_none;
/* number of times that an address on the outgoing I/F is chosen */
- u_quad_t ip6s_sources_sameif[16];
+ u_quad_t ip6s_sources_sameif[IP6S_SCOPECNT];
/* number of times that an address on a non-outgoing I/F is chosen */
- u_quad_t ip6s_sources_otherif[16];
+ u_quad_t ip6s_sources_otherif[IP6S_SCOPECNT];
/*
* number of times that an address that has the same scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_samescope[16];
+ u_quad_t ip6s_sources_samescope[IP6S_SCOPECNT];
/*
* number of times that an address that has a different scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_otherscope[16];
+ u_quad_t ip6s_sources_otherscope[IP6S_SCOPECNT];
/* number of times that a deprecated address is chosen */
- u_quad_t ip6s_sources_deprecated[16];
+ u_quad_t ip6s_sources_deprecated[IP6S_SCOPECNT];
/* number of times that each rule of source selection is applied. */
- u_quad_t ip6s_sources_rule[16];
+ u_quad_t ip6s_sources_rule[IP6S_RULESMAX];
};
#ifdef _KERNEL
@@ -285,6 +289,8 @@ struct ip6aux {
#define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */
#define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */
+#define M_IP6_NEXTHOP M_PROTO7 /* explicit ip nexthop */
+
#ifdef __NO_STRICT_ALIGNMENT
#define IP6_HDR_ALIGNED_P(ip) 1
#else
@@ -316,6 +322,11 @@ VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum packets in reassembly
VNET_DECLARE(int, ip6_maxfrags); /* Maximum fragments in reassembly
* queue */
VNET_DECLARE(int, ip6_accept_rtadv); /* Acts as a host not a router */
+VNET_DECLARE(int, ip6_no_radr); /* No defroute from RA */
+VNET_DECLARE(int, ip6_norbit_raif); /* Disable R-bit in NA on RA
+ * receiving IF. */
+VNET_DECLARE(int, ip6_rfc6204w3); /* Accept defroute from RA even when
+ forwarding enabled */
VNET_DECLARE(int, ip6_keepfaith); /* Firewall Aided Internet Translator */
VNET_DECLARE(int, ip6_log_interval);
VNET_DECLARE(time_t, ip6_log_time);
@@ -327,6 +338,9 @@ VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionTransmits */
#define V_ip6_maxfragpackets VNET(ip6_maxfragpackets)
#define V_ip6_maxfrags VNET(ip6_maxfrags)
#define V_ip6_accept_rtadv VNET(ip6_accept_rtadv)
+#define V_ip6_no_radr VNET(ip6_no_radr)
+#define V_ip6_norbit_raif VNET(ip6_norbit_raif)
+#define V_ip6_rfc6204w3 VNET(ip6_rfc6204w3)
#define V_ip6_keepfaith VNET(ip6_keepfaith)
#define V_ip6_log_interval VNET(ip6_log_interval)
#define V_ip6_log_time VNET(ip6_log_time)
@@ -361,87 +375,87 @@ struct sockopt;
struct inpcb;
-int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt));
+int icmp6_ctloutput(struct socket *, struct sockopt *sopt);
struct in6_ifaddr;
-void ip6_init __P((void));
+void ip6_init(void);
#ifdef VIMAGE
-void ip6_destroy __P((void));
+void ip6_destroy(void);
#endif
int ip6proto_register(short);
int ip6proto_unregister(short);
-void ip6_input __P((struct mbuf *));
-struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *));
-void ip6_freepcbopts __P((struct ip6_pktopts *));
+void ip6_input(struct mbuf *);
+struct in6_ifaddr *ip6_getdstifaddr(struct mbuf *);
+void ip6_freepcbopts(struct ip6_pktopts *);
-int ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int));
-char * ip6_get_prevhdr __P((struct mbuf *, int));
-int ip6_nexthdr __P((struct mbuf *, int, int, int *));
-int ip6_lasthdr __P((struct mbuf *, int, int, int *));
+int ip6_unknown_opt(u_int8_t *, struct mbuf *, int);
+char * ip6_get_prevhdr(struct mbuf *, int);
+int ip6_nexthdr(struct mbuf *, int, int, int *);
+int ip6_lasthdr(struct mbuf *, int, int, int *);
-struct ip6aux *ip6_addaux __P((struct mbuf *));
-struct ip6aux *ip6_findaux __P((struct mbuf *));
-void ip6_delaux __P((struct mbuf *));
+#ifdef __notyet__
+struct ip6aux *ip6_findaux(struct mbuf *);
+#endif
extern int (*ip6_mforward)(struct ip6_hdr *, struct ifnet *,
struct mbuf *);
-int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
- u_int32_t *));
+int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *,
+ u_int32_t *);
struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *,
struct mbuf **, int *);
-void ip6_savecontrol __P((struct inpcb *, struct mbuf *, struct mbuf **));
-void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
- u_int32_t *));
-int ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
+void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **);
+void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *,
+ u_int32_t *);
+int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t);
-void ip6_forward __P((struct mbuf *, int));
+void ip6_forward(struct mbuf *, int);
-void ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *));
-int ip6_output __P((struct mbuf *, struct ip6_pktopts *,
+void ip6_mloopback(struct ifnet *, struct mbuf *, struct sockaddr_in6 *);
+int ip6_output(struct mbuf *, struct ip6_pktopts *,
struct route_in6 *,
int,
struct ip6_moptions *, struct ifnet **,
- struct inpcb *));
-int ip6_ctloutput __P((struct socket *, struct sockopt *));
-int ip6_raw_ctloutput __P((struct socket *, struct sockopt *));
-void ip6_initpktopts __P((struct ip6_pktopts *));
-int ip6_setpktopts __P((struct mbuf *, struct ip6_pktopts *,
- struct ip6_pktopts *, struct ucred *, int));
-void ip6_clearpktopts __P((struct ip6_pktopts *, int));
-struct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int));
-int ip6_optlen __P((struct inpcb *));
-
-int route6_input __P((struct mbuf **, int *, int));
-
-void frag6_init __P((void));
-int frag6_input __P((struct mbuf **, int *, int));
-void frag6_slowtimo __P((void));
-void frag6_drain __P((void));
-
-void rip6_init __P((void));
-int rip6_input __P((struct mbuf **, int *, int));
-void rip6_ctlinput __P((int, struct sockaddr *, void *));
-int rip6_ctloutput __P((struct socket *, struct sockopt *));
-int rip6_output __P((struct mbuf *, ...));
-int rip6_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *));
-
-int dest6_input __P((struct mbuf **, int *, int));
-int none_input __P((struct mbuf **, int *, int));
+ struct inpcb *);
+int ip6_ctloutput(struct socket *, struct sockopt *);
+int ip6_raw_ctloutput(struct socket *, struct sockopt *);
+void ip6_initpktopts(struct ip6_pktopts *);
+int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *,
+ struct ip6_pktopts *, struct ucred *, int);
+void ip6_clearpktopts(struct ip6_pktopts *, int);
+struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int);
+int ip6_optlen(struct inpcb *);
+
+int route6_input(struct mbuf **, int *, int);
+
+void frag6_init(void);
+int frag6_input(struct mbuf **, int *, int);
+void frag6_slowtimo(void);
+void frag6_drain(void);
+
+void rip6_init(void);
+int rip6_input(struct mbuf **, int *, int);
+void rip6_ctlinput(int, struct sockaddr *, void *);
+int rip6_ctloutput(struct socket *, struct sockopt *);
+int rip6_output(struct mbuf *, ...);
+int rip6_usrreq(struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *);
+
+int dest6_input(struct mbuf **, int *, int);
+int none_input(struct mbuf **, int *, int);
int in6_selectsrc(struct sockaddr_in6 *, struct ip6_pktopts *,
struct inpcb *inp, struct route_in6 *, struct ucred *cred,
struct ifnet **, struct in6_addr *);
-int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *,
+int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *,
struct ip6_moptions *, struct route_in6 *, struct ifnet **,
- struct rtentry **));
+ struct rtentry **);
int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *,
struct ip6_moptions *, struct route_in6 *, struct ifnet **,
struct rtentry **, u_int);
-u_int32_t ip6_randomid __P((void));
-u_int32_t ip6_randomflowlabel __P((void));
+u_int32_t ip6_randomid(void);
+u_int32_t ip6_randomflowlabel(void);
#endif /* _KERNEL */
#endif /* !_NETINET6_IP6_VAR_H_ */