-extern int (*legal_vif_num)(int);
-extern u_long (*ip_mcast_src)(int);
-extern int rsvp_on;
-extern struct pr_usrreqs rip_usrreqs;
-
-int ip_ctloutput(struct socket *, struct sockopt *sopt);
-void ip_drain(void);
-void ip_freemoptions(struct ip_moptions *);
-void ip_init(void);
-extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *);
-int ip_output(struct mbuf *,
- struct mbuf *, struct route *, int, struct ip_moptions *);
-int ip_output_list(struct mbuf *, int,
- struct mbuf *, struct route *, int, struct ip_moptions *);
-struct in_ifaddr *
- ip_rtaddr(struct in_addr, struct route *);
-void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *,
- struct mbuf *);
-void ip_slowtimo(void);
-struct mbuf *
- ip_srcroute(void);
-void ip_stripoptions(struct mbuf *, struct mbuf *);
-#if RANDOM_IP_ID
-u_int16_t
- ip_randomid(void);
-#endif
-int rip_ctloutput(struct socket *, struct sockopt *);
-void rip_ctlinput(int, struct sockaddr *, void *);
-void rip_init(void);
-void rip_input(struct mbuf *, int);
-int rip_output(struct mbuf *, struct socket *, u_long);
-int rip_unlock(struct socket *, int, int);
-void ipip_input(struct mbuf *, int);
-void rsvp_input(struct mbuf *, int);
-int ip_rsvp_init(struct socket *);
-int ip_rsvp_done(void);
-int ip_rsvp_vif_init(struct socket *, struct sockopt *);
-int ip_rsvp_vif_done(struct socket *, struct sockopt *);
-void ip_rsvp_force_done(struct socket *);
-
-void in_delayed_cksum(struct mbuf *m);
-
-#endif KERNEL_PRIVATE
-#endif !_NETINET_IP_VAR_H_
+
+extern void rsvp_input(struct mbuf *, int);
+extern int ip_rsvp_init(struct socket *);
+extern int ip_rsvp_done(void);
+extern int ip_rsvp_vif_init(struct socket *, struct sockopt *);
+extern int ip_rsvp_vif_done(struct socket *, struct sockopt *);
+extern void ip_rsvp_force_done(struct socket *);
+extern void ipip_input(struct mbuf *, int);
+extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
+ struct ip_moptions *);
+#endif /* MROUTING */
+
+extern void ip_moptions_init(void);
+extern struct ip_moptions *ip_allocmoptions(int);
+extern int inp_getmoptions(struct inpcb *, struct sockopt *);
+extern int inp_setmoptions(struct inpcb *, struct sockopt *);
+extern void imo_addref(struct ip_moptions *, int);
+extern void imo_remref(struct ip_moptions *);
+
+struct protosw;
+struct domain;
+
+extern int ip_checkrouteralert(struct mbuf *);
+extern int ip_ctloutput(struct socket *, struct sockopt *sopt);
+extern void ip_drain(void);
+extern void ip_init(struct protosw *, struct domain *);
+extern int ip_output(struct mbuf *, struct mbuf *, struct route *, int,
+ struct ip_moptions *, struct ip_out_args *);
+extern int ip_output_list(struct mbuf *, int, struct mbuf *, struct route *,
+ int, struct ip_moptions *, struct ip_out_args *);
+extern void ip_output_checksum(struct ifnet *, struct mbuf *, int, int,
+ uint32_t *);
+extern struct in_ifaddr *ip_rtaddr(struct in_addr);
+extern int ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *,
+ struct mbuf *);
+extern struct mbuf *ip_srcroute(void);
+extern void ip_stripoptions(struct mbuf *, struct mbuf *);
+extern void ip_initid(void);
+extern u_int16_t ip_randomid(void);
+extern void ip_proto_dispatch_in_wrapper(struct mbuf *, int, u_int8_t);
+extern int ip_fragment(struct mbuf *, struct ifnet *, unsigned long, int);
+
+extern void ip_setsrcifaddr_info(struct mbuf *, uint32_t, struct in_ifaddr *);
+extern void ip_setdstifaddr_info(struct mbuf *, uint32_t, struct in_ifaddr *);
+extern int ip_getsrcifaddr_info(struct mbuf *, uint32_t *, uint32_t *);
+extern int ip_getdstifaddr_info(struct mbuf *, uint32_t *, uint32_t *);
+
+extern int rip_ctloutput(struct socket *, struct sockopt *);
+extern void rip_ctlinput(int, struct sockaddr *, void *);
+extern void rip_init(struct protosw *, struct domain *);
+extern void rip_input(struct mbuf *, int);
+extern int rip_output(struct mbuf *, struct socket *, u_int32_t, struct mbuf *);
+extern int rip_unlock(struct socket *, int, void *);
+extern int rip_send(struct socket *, int, struct mbuf *, struct sockaddr *,
+ struct mbuf *, struct proc *);
+
+extern void tcp_in_cksum_stats(u_int32_t);
+extern void tcp_out_cksum_stats(u_int32_t);
+
+extern void udp_in_cksum_stats(u_int32_t);
+extern void udp_out_cksum_stats(u_int32_t);
+
+#if INET6
+extern void tcp_in6_cksum_stats(u_int32_t);
+extern void tcp_out6_cksum_stats(u_int32_t);
+
+extern void udp_in6_cksum_stats(u_int32_t);
+extern void udp_out6_cksum_stats(u_int32_t);
+#endif /* INET6 */
+#endif /* BSD_KERNEL_PRIVATE */
+#ifdef KERNEL_PRIVATE
+/* for PPP/PPTP */
+extern int ip_gre_output(struct mbuf *);
+typedef struct mbuf *(*gre_input_func_t)(struct mbuf *, int, int);
+extern int ip_gre_register_input(gre_input_func_t);
+#endif /* KERNEL_PRIVATE */
+#endif /* !_NETINET_IP_VAR_H_ */