+#pragma unused(ifp, protocol_family)
+ mbuf_t m;
+ mbuf_t *tailptr = &m_list;
+ mbuf_t nextpkt;
+
+ /* Strip ARP and non-IP packets out of the list */
+ for (m = m_list; m; m = nextpkt) {
+ struct ether_header *eh = mbuf_pkthdr_header(m);
+ struct ifnet *mifp;
+
+ /*
+ * Trust the ifp in the mbuf, rather than ifproto's
+ * since the packet could have been injected via
+ * a dlil_input_packet_list() using an ifp that is
+ * different than the one where the packet really
+ * came from.
+ */
+ mifp = mbuf_pkthdr_rcvif(m);
+
+ nextpkt = m->m_nextpkt;
+
+ if (eh->ether_type == htons(ETHERTYPE_IP)) {
+ /*
+ * Update L2 reachability record, if present
+ * (and if not a broadcast sender).
+ */
+ if (bcmp(eh->ether_shost, etherbroadcastaddr,
+ ETHER_ADDR_LEN) != 0) {
+ arp_llreach_set_reachable(mifp, eh->ether_shost,
+ ETHER_ADDR_LEN);
+ }
+ /* put this packet in the list */
+ *tailptr = m;
+ tailptr = &m->m_nextpkt;
+ } else {
+ /* Pass ARP packets to arp input */
+ m->m_nextpkt = NULL;
+ if (eh->ether_type == htons(ETHERTYPE_ARP))
+ ether_inet_arp_input(mifp, m);
+ else
+ mbuf_freem(m);
+ }
+ }