I am trying to understand how the network stack (TCP/IP) handles a UDP message to localhost. I am assuming it goes down the stack and gets to the IP layer, if it sees localhost it then sends it back up the stack?
I am also trying to understand how the network stack (TCP/IP) handles a UDP message destined for your own NIC? If my NIC is assigned 192.168.0.1 and the source and destination address are the same, what happens? Does it leave the hardware, how far down the stack does it even go?
Any Linux source of where these things occur is greatly appreciated!!