+#define IN_FIRST_MULTI(step, inm) \
+ /* struct in_multistep step; */ \
+ /* struct in_multi *inm; */ \
+do { \
+ in_multihead_lock_assert(LCK_RW_ASSERT_HELD); \
+ (step).i_inm = LIST_FIRST(&in_multihead); \
+ IN_NEXT_MULTI((step), (inm)); \
+} while (0)
+
+extern lck_mtx_t *inet_domain_mutex;
+extern struct domain *inetdomain;
+
+struct ip_moptions;
+struct inpcb;
+
+/*
+ * Return values for imo_multi_filter().
+ */
+#define MCAST_PASS 0 /* Pass */
+#define MCAST_NOTGMEMBER 1 /* This host not a member of group */
+#define MCAST_NOTSMEMBER 2 /* This host excluded source */
+#define MCAST_MUTED 3 /* [deprecated] */
+
+/*
+ * Per-interface IPv4 structures.
+ */
+struct in_ifextra {
+ uint32_t netsig_len;
+ u_int8_t netsig[IFNET_SIGNATURELEN];
+ struct lltable *ii_llt; /* ARP state */
+};
+#define IN_IFEXTRA(_ifp) ((struct in_ifextra *)(_ifp->if_inetdata))
+#define LLTABLE(ifp) ((IN_IFEXTRA(ifp) == NULL) ? NULL : IN_IFEXTRA(ifp)->ii_llt)
+
+extern u_int32_t ipv4_ll_arp_aware;
+
+extern void in_ifaddr_init(void);
+extern int imo_multi_filter(const struct ip_moptions *,
+ const struct ifnet *, const struct sockaddr_in *,
+ const struct sockaddr_in *);
+extern int imo_clone(struct inpcb *, struct inpcb *);
+extern void inm_commit(struct in_multi *);
+extern void inm_clear_recorded(struct in_multi *);
+extern void inm_print(const struct in_multi *);
+extern int inm_record_source(struct in_multi *inm, const in_addr_t);
+extern void inm_release(struct in_multi *);
+extern void in_multi_init(void);
+extern struct in_multi *in_addmulti(struct in_addr *, struct ifnet *);
+extern void in_delmulti(struct in_multi *);
+extern int in_leavegroup(struct in_multi *, struct in_mfilter *);
+extern int in_multi_detach(struct in_multi *);
+extern void inm_addref(struct in_multi *, int);
+extern void inm_remref(struct in_multi *, int);
+extern void inm_purge(struct in_multi *);
+extern uint8_t ims_get_mode(const struct in_multi *,
+ const struct ip_msource *, uint8_t);
+extern int in_control(struct socket *, u_long, caddr_t, struct ifnet *,
+ struct proc *);
+extern int in_inithead(void **, int);
+extern void in_rtqdrain(void);
+extern struct radix_node *in_validate(struct radix_node *);
+extern void ip_input(struct mbuf *);
+extern void ip_input_process_list(struct mbuf *);
+extern int in_ifadown(struct ifaddr *ifa, int);
+extern void in_ifscrub(struct ifnet *, struct in_ifaddr *, int);
+extern u_int32_t inaddr_hashval(u_int32_t);
+extern void in_purgeaddrs(struct ifnet *);
+extern void gre_input(struct mbuf *, int);
+extern void imf_leave(struct in_mfilter *);
+extern void imf_purge(struct in_mfilter *);
+extern int inp_join_group(struct inpcb *, struct sockopt *);
+extern int inp_leave_group(struct inpcb *, struct sockopt *);
+extern void in_multihead_lock_exclusive(void);
+extern void in_multihead_lock_shared(void);
+extern void in_multihead_lock_assert(int);
+extern void in_multihead_lock_done(void);
+#endif /* BSD_KERNEL_PRIVATE */