The loopback network interface "is a virtual network device implemented entirely in software," according to another question on Unix.SE.
But how is this implementation actually accomplished, and how do you manipulate it?
As far as I know, IPs are marked as local in the local routing table:
ip route show table local
Sending to an IP marked as local will trigger the loopback device. But is this detection done purely by routing tables or also by some other kernel operations?
My ultimate goal is to manipulate the loop-device configuration, so that sending datagrams between two WLAN adapters on my laptop will result in real traffic / datagrams in the network and not in local loops. That is:
Interface 1 -> WLAN -> Interface 2
Interface 1 -> LOOP -> Interface 2