ns-allinone-2.35/ns-2.35/emulate/arp.cc
void
ArpAgent::doreply(ether_arp* ea)
{
	/*
	 * reply will be from the replier's point of view,
	 * so, look in the sender ha/pa fields for the info
	 * we want
	 */
	in_addr t;
	ether_addr e;
	memcpy(&t, ea->arp_spa, 4);	// copy IP address
	memcpy(&e, ea->arp_sha, ETHER_ADDR_LEN);
	insert(t, e, 'D');
	return;
}
/*
 * process an ARP reply frame -- insert into cache
 */
process an ARP reply frame -- insert into cache
process an ARP reply frame -- insert into cache
void
ArpAgent::doreply(ether_arp* ea)
{
	in_addr t;
	ether_addr e;
	memcpy(&t, ea->arp_spa, 4);	
	memcpy(&e, ea->arp_sha, ETHER_ADDR_LEN);
	insert(t, e, 'D');
	return;
}
void ArpAgent :: doreply ( ether_arp * ea ) { in_addr t ; ether_addr e ; memcpy ( & t , ea -> arp_spa , 4 ) ; memcpy ( & e , ea -> arp_sha , ETHER_ADDR_LEN ) ; insert ( t , e , ' ' ) ; return ; }
process an ARP reply frame -- insert into cache
process an ARP reply frame -- insert into cache
/*
	 * reply will be from the replier's point of view,
	 * so, look in the sender ha/pa fields for the info
	 * we want
	 */ // copy IP address