Lines Matching refs:arpreply
281 struct arprequest *arpreply;
286 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];
288 if (arpreply->opcode != htons(ARP_REPLY))
290 if (memcmp(arpreply->sipaddr, ptr, sizeof(in_addr)) != 0)
292 memcpy(arptable[ival].node, arpreply->shwaddr, ETH_ALEN);
458 struct arprequest *arpreply;
463 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];
464 if (arpreply->opcode != htons(RARP_REPLY))
466 if (memcmp(arpreply->thwaddr, ptr, ETH_ALEN) == 0){
467 memcpy(arptable[ARP_SERVER].node, arpreply->shwaddr, ETH_ALEN);
468 memcpy(&arptable[ARP_SERVER].ipaddr, arpreply->sipaddr, sizeof(in_addr));
469 memcpy(&arptable[ARP_CLIENT].ipaddr, arpreply->tipaddr, sizeof(in_addr));
979 struct arprequest *arpreply;
982 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];
983 memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr));
984 if ((arpreply->opcode == htons(ARP_REQUEST)) &&
986 arpreply->opcode = htons(ARP_REPLY);
987 memcpy(arpreply->tipaddr, arpreply->sipaddr, sizeof(in_addr));
988 memcpy(arpreply->thwaddr, arpreply->shwaddr, ETH_ALEN);
989 memcpy(arpreply->sipaddr, &arptable[ARP_CLIENT].ipaddr, sizeof(in_addr));
990 memcpy(arpreply->shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN);
991 eth_transmit(arpreply->thwaddr, ARP,
993 arpreply);
995 memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr));