This could be considered a continuation of this earlier SO question.
Ideally, I\'d like to jail a process into only using a certain interface, no matter what. It will be
Not a direct answer to your question, but just an FYI. As you mentioned above, this solution may be too much work for what you need/want to do.
I personally like the idea of creating a network stack hook kernel module that will allow me to do this. This way I have full control over multicast and unitcast frames going and coming from userspace. You'd have to use something like netlink sockets to send/receive data to and from your driver and userspace application, but it works very well and is very fast.
You also get to hook into any level of the stack this way... Ethernet, or IP. Thus having full control over what you send/receive.
Here's an example article that talks about hooking into the netfilter stack.
Note: this article hooks into the IP stack, and it's also old. I know that the APIs have changed, but a lot of this article still applies practically and theoretically.
If you wanted to hook into the bridging layer, you would use the a similar mechanism, but specify
BR_LOCAL_IN instead of NF_IP_LOCAL_IN
Note: This is very similar to opening a raw socket on the interface. You'll have to build your frames yourself.