1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

Handle AF_ARP.

This commit is contained in:
Matthew N. Dodd 2004-03-21 06:34:34 +00:00
parent fb1eeb8ede
commit 8f2e60d91e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127260

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: