Handle AF_ARP.

This commit is contained in:
mdodd 2004-03-21 06:34:34 +00:00
parent 8aaef87543
commit f7356ef2fa

View File

@ -142,6 +142,33 @@ arc_output(ifp, m, dst, rt0)
atype = (ifp->if_flags & IFF_LINK0) ?
ARCTYPE_IP_OLD : ARCTYPE_IP;
break;
case AF_ARP:
{
struct arphdr *ah;
ah = mtod(m, struct arphdr *);
ah->ar_hrd = htons(ARPHRD_ARCNET);
loop_copy = -1; /* if this is for us, don't do it */
switch(ntohs(ah->ar_op)) {
case ARPOP_REVREQUEST:
case ARPOP_REVREPLY:
type = htons(ARCTYPE_REVARP);
break;
case ARPOP_REQUEST:
case ARPOP_REPLY:
default:
type = htons(ARCTYPE_ARP);
break;
}
if (m->m_flags & M_BCAST)
bcopy(ifp->if_broadcastaddr, adst, ARC_ADDR_LEN);
else
bcopy(ar_tha(ah), adst, ARC_ADDR_LEN);
}
break;
#endif
#ifdef INET6
case AF_INET6: