Lines Matching defs:ea
126 struct ether_arp *ea;
131 if (mbuf_len(m) < sizeof(*ea) &&
132 mbuf_pullup(&m, sizeof(*ea)) != 0)
135 ea = mbuf_data(m);
138 if (ntohs(ea->arp_hrd) != ARPHRD_ETHER ||
139 ntohs(ea->arp_pro) != ETHERTYPE_IP ||
140 ea->arp_pln != sizeof(struct in_addr) ||
141 ea->arp_hln != ETHER_ADDR_LEN) {
147 if (bcmp(ea->arp_sha, etherbroadcastaddr, ETHER_ADDR_LEN) == 0) {
155 _ip_copy(&sender_ip.sin_addr, (const struct in_addr *)ea->arp_spa);
157 _ip_copy(&target_ip.sin_addr, (const struct in_addr *)ea->arp_tpa);
164 bcopy(ea->arp_sha, LLADDR(&sender_hw), ETHER_ADDR_LEN);
166 arp_ip_handle_input(mbuf_pkthdr_rcvif(m), ntohs(ea->arp_op), &sender_hw, &sender_ip, &target_ip);
401 struct ether_arp *ea;
417 mbuf_setlen(m, sizeof(*ea));
418 mbuf_pkthdr_setlen(m, sizeof(*ea));
424 mbuf_setdata(m, datap, sizeof(*ea));
425 ea = mbuf_data(m);
443 ea->arp_pro = htons(ETHERTYPE_IP);
444 ea->arp_hln = sizeof(ea->arp_sha);
445 ea->arp_pln = sizeof(ea->arp_spa);
446 ea->arp_hrd = htons(ARPHRD_ETHER);
447 ea->arp_op = htons(arpop);
451 bcopy(CONST_LLADDR(sender_hw), ea->arp_sha, sizeof(ea->arp_sha));
454 ifnet_lladdr_copy_bytes(ifp, ea->arp_sha, ETHER_ADDR_LEN);
460 bcopy(&sender_ip->sin_addr, ea->arp_spa, sizeof(ea->arp_spa));
472 bcopy(&((struct sockaddr_in*)ifa->ifa_addr)->sin_addr, ea->arp_spa,
473 sizeof(ea->arp_spa));
485 bzero(ea->arp_tha, sizeof(ea->arp_tha));
489 bcopy(CONST_LLADDR(target_hw), ea->arp_tha, sizeof(ea->arp_tha));
494 bcopy(&target_ip->sin_addr, ea->arp_tpa, sizeof(ea->arp_tpa));