As a UDP segment traverses down the stack, each layer adds a header.
What occurs for this to happen? Does the kernel do a bunch stuff then add the header?
I am particularly interested in the transition from the network to data-link layer on an Ethernet system.
Is ARP performed and then the cache searched in order to provide the next hope information?
Best Answer
Each OS can do this differently. It is up to the OS designers how this specifically happens in an OS.
RFC 826, An Ethernet Address Resolution Protocol -- or -- Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware gives you a general outline of what is supposed to happen, but an OS could skip the whole table creation and use ARP requests for every packet.