How to add SO_BINDTODEVICE option support in FreeBSD stack

I am implementing a code based on raw sockets. In order to receive incoming Ethernet frames I have to bind the socket I created to an Ethernet interface (eth0 for instance). The only way to do that, as far as I am concerned, is via the setsockopt() function with the option SO_BINDTODEVICE.

The problem is that the FreeBSD stack does not support that option. Is there any patch to apply in order to enable this feature or any other trusted alternatives to try?
 
Back
Top