The name process_arp_req() is a misnomer since the function not only processes arp-requests but also processes arp-replies. process_arp_req() is called by arp_putdata(), which is (indirectly) called by packet2user() upon receipt of either an arp-request or an arp-reply. If an entry in the arp table for the source ip address of the arp-request or arp-reply doesn't exist, the arp-request or arp-reply is discarded. Otherwise, the entry is updated with the ethernet address contained in the arp-request/arp-reply. If the updated entry was previously incomplete (in other words, the system was waiting for an arp-reply from an earlier arp-request), client_reply() is called to send out ethernet packets that were waiting for arp resolution. If an arp-request was received for the system's ip address, setup_write() is called to send out an arp-reply answering the arp-request.