#define _NETINET6_IP6_VAR_H_
#include <sys/appleapiopts.h>
-#ifdef __APPLE_API_PRIVATE
+#ifdef KERNEL_PRIVATE
/*
* IP6 reassembly queue structure. Each fragment
* being reassembled is attached to one of these structures.
#if notyet
u_char *ip6q_nxtp;
#endif
+ int ip6q_nfrag; /* number of fragments */
};
struct ip6asfrag {
/*
* Control options for incoming packets
*/
+#endif /* KERNEL_PRIVATE */
struct ip6stat {
u_quad_t ip6s_total; /* total packets received */
u_quad_t ip6s_forward_cachemiss;
};
+#ifdef KERNEL_PRIVATE
#ifdef KERNEL
/*
* IPv6 onion peeling state.
* with IPsec it may not be accurate.
*/
};
-#endif
-#ifdef KERNEL
/* flags passed to ip6_output as last parameter */
#define IPV6_DADOUTPUT 0x01 /* DAD */
#define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */
#define ip6_mapped_addr_on (!ip6_v6only)
extern int ip6_v6only;
+extern int ip6_neighborgcthresh; /* Threshold # of NDP entries for GC */
+extern int ip6_maxifprefixes; /* Max acceptable prefixes via RA per IF */
+extern int ip6_maxifdefrouters; /* Max acceptable def routers via RA */
+extern int ip6_maxdynroutes; /* Max # of routes created via redirect */
+
extern struct socket *ip6_mrouter; /* multicast routing daemon */
extern int ip6_sendredirects; /* send IP redirects when forwarding? */
-extern int ip6_maxfragpackets; /* Maximum packets in reassembly queue */
+extern int ip6_maxfragpackets; /* Maximum packets in reassembly queue */
+extern int ip6_maxfrags; /* Maximum fragments in reassembly queue */
extern int ip6_sourcecheck; /* Verify source interface */
extern int ip6_sourcecheck_interval; /* Interval between log messages */
extern int ip6_accept_rtadv; /* Acts as a host not a router */
extern int ip6_use_tempaddr; /* whether to use temporary addresses. */
extern struct pr_usrreqs rip6_usrreqs;
+extern struct pr_usrreqs icmp6_dgram_usrreqs;
struct sockopt;
struct inpcb;
-int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt));
+int icmp6_ctloutput(struct socket *, struct sockopt *);
+int icmp6_dgram_ctloutput(struct socket *, struct sockopt *);
+int icmp6_dgram_send(struct socket *, int , struct mbuf *, struct sockaddr *, struct mbuf *, struct proc *);
+int icmp6_dgram_attach(struct socket *, int , struct proc *);
+
struct in6_ifaddr;
-void ip6_init __P((void));
-void ip6intr __P((void));
-void ip6_input __P((struct mbuf *));
-struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *));
-void ip6_freepcbopts __P((struct ip6_pktopts *));
-void ip6_freemoptions __P((struct ip6_moptions *));
-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 *));
-
-struct mbuf *ip6_addaux __P((struct mbuf *));
-struct mbuf *ip6_findaux __P((struct mbuf *));
-void ip6_delaux __P((struct mbuf *));
-
-int ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
-int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
- u_int32_t *));
-void ip6_savecontrol __P((struct inpcb *, struct mbuf **, struct ip6_hdr *,
- 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_forward __P((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_init(void);
+void ip6intr(void);
+void ip6_input(struct mbuf *);
+struct in6_ifaddr *ip6_getdstifaddr(struct mbuf *);
+void ip6_freepcbopts(struct ip6_pktopts *);
+void ip6_freemoptions(struct ip6_moptions *);
+int ip6_unknown_opt(u_int8_t *, struct mbuf *, int, 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(struct mbuf *);
+struct ip6aux *ip6_findaux(struct mbuf *);
+void ip6_delaux(struct mbuf *);
+
+int ip6_mforward(struct ip6_hdr *, struct ifnet *, struct mbuf *);
+int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *,
+ u_int32_t *);
+void ip6_savecontrol(struct inpcb *, struct mbuf **, struct ip6_hdr *,
+ 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(struct mbuf *, struct route_in6 *, int, int);
+
+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 **));
-int ip6_ctloutput __P((struct socket *, struct sockopt *sopt));
-void init_ip6pktopts __P((struct ip6_pktopts *));
-int ip6_setpktoptions __P((struct mbuf *, struct ip6_pktopts *, int, int));
-void ip6_clearpktopts __P((struct ip6_pktopts *, int, 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 **mp, int *offset));
-void rip6_ctlinput __P((int, struct sockaddr *, void *));
-int rip6_ctloutput __P((struct socket *so, struct sockopt *sopt));
-int rip6_output __P((struct mbuf *, struct socket *, struct sockaddr_in6 *, struct mbuf *));
-int rip6_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *));
-
-int dest6_input __P((struct mbuf **, int *, int));
-int none_input __P((struct mbuf **, int *, int));
+ struct ip6_moptions *, struct ifnet **, int locked);
+int ip6_ctloutput(struct socket *, struct sockopt *sopt);
+void init_ip6pktopts(struct ip6_pktopts *);
+int ip6_setpktoptions(struct mbuf *, struct ip6_pktopts *, int, int);
+void ip6_clearpktopts(struct ip6_pktopts *, int, int);
+struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int);
+int ip6_optlen(struct inpcb *);
+
+int route6_input(struct mbuf **, int *);
+
+void frag6_init(void);
+int frag6_input(struct mbuf **, int *);
+void frag6_slowtimo(void);
+void frag6_drain(void);
+
+void rip6_init(void);
+int rip6_input(struct mbuf **mp, int *offset);
+void rip6_ctlinput(int, struct sockaddr *, void *);
+int rip6_ctloutput(struct socket *so, struct sockopt *sopt);
+int rip6_output(struct mbuf *, struct socket *, struct sockaddr_in6 *, struct mbuf *);
+int rip6_usrreq(struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *);
+
+int dest6_input(struct mbuf **, int *);
+int none_input(struct mbuf **, int *);
#endif /* KERNEL */
-#endif /* __APPLE_API_PRIVATE */
+#endif /* KERNEL_PRIVATE */
#endif /* !_NETINET6_IP6_VAR_H_ */