Lines Matching refs:arp_recv
66 struct arp_hdr *arp_recv; in sandbox_eth_arp_req_to_reply() local
89 arp_recv = (void *)eth_recv + ETHER_HDR_SIZE; in sandbox_eth_arp_req_to_reply()
90 arp_recv->ar_hrd = htons(ARP_ETHER); in sandbox_eth_arp_req_to_reply()
91 arp_recv->ar_pro = htons(PROT_IP); in sandbox_eth_arp_req_to_reply()
92 arp_recv->ar_hln = ARP_HLEN; in sandbox_eth_arp_req_to_reply()
93 arp_recv->ar_pln = ARP_PLEN; in sandbox_eth_arp_req_to_reply()
94 arp_recv->ar_op = htons(ARPOP_REPLY); in sandbox_eth_arp_req_to_reply()
95 memcpy(&arp_recv->ar_sha, priv->fake_host_hwaddr, ARP_HLEN); in sandbox_eth_arp_req_to_reply()
96 net_write_ip(&arp_recv->ar_spa, priv->fake_host_ipaddr); in sandbox_eth_arp_req_to_reply()
97 memcpy(&arp_recv->ar_tha, &arp->ar_sha, ARP_HLEN); in sandbox_eth_arp_req_to_reply()
98 net_copy_ip(&arp_recv->ar_tpa, &arp->ar_spa); in sandbox_eth_arp_req_to_reply()
176 struct arp_hdr *arp_recv; in sandbox_eth_recv_arp_req() local
188 arp_recv = (void *)eth_recv + ETHER_HDR_SIZE; in sandbox_eth_recv_arp_req()
189 arp_recv->ar_hrd = htons(ARP_ETHER); in sandbox_eth_recv_arp_req()
190 arp_recv->ar_pro = htons(PROT_IP); in sandbox_eth_recv_arp_req()
191 arp_recv->ar_hln = ARP_HLEN; in sandbox_eth_recv_arp_req()
192 arp_recv->ar_pln = ARP_PLEN; in sandbox_eth_recv_arp_req()
193 arp_recv->ar_op = htons(ARPOP_REQUEST); in sandbox_eth_recv_arp_req()
194 memcpy(&arp_recv->ar_sha, priv->fake_host_hwaddr, ARP_HLEN); in sandbox_eth_recv_arp_req()
195 net_write_ip(&arp_recv->ar_spa, priv->fake_host_ipaddr); in sandbox_eth_recv_arp_req()
196 memcpy(&arp_recv->ar_tha, net_null_ethaddr, ARP_HLEN); in sandbox_eth_recv_arp_req()
197 net_write_ip(&arp_recv->ar_tpa, net_ip); in sandbox_eth_recv_arp_req()