Under Linux if you send a packet to the address of one of its network interfaces, this packet is routed internally, it is never sent over the network. That's the right thing in 99.99% of the cases.
Occasionally, when testing network configurations, it's useful to send a packet over a local link from the machine itself, with the machine itself as the target. How can I do this? At least for a bus-type link such as Ethernet, if not for a point-to-point link. I'm only interested in IP packets (both IPv4 and IPv6).