Re: Code Snippet: SO_BINDTODEVICE - http://codingrelic.geekhold.com/2009...
Feb 20, 2012
from
"I've used IP_PKTINFO for this. There is also an IP6_PKTINFO which I have not personally used, but looks similar.
You set IP_PKTINFO in the flags passed to recvmsg. The control block will contain an ip_pktinfo structure indicating the ingress interface.
This is from memory, but some searching should turn up more specific information."
- DGentry