It is worth noting that the ARP protocol and IP protocol do not contact.
When the MAC frame is encapsulated, if the Mac (ie HH_CACHE is empty) does not find the destination IP, then call DST-> neighbour-> output (point to neigh-> resolve-> output, in neigh-> resolve- > OUTPUT Call neigh_event_send uses ARP to parse the IP address for hardware addresses.