On Mon, May 14, 2007 at 05:53:32AM -0400, Dylan Taft wrote:
> I just found out, SO_BINDTODEVICE requires root privs.  If I am a
> regular user, and I want to recv a broadcast sent to 255.255.255.255
> on a specific interface, how can this be done?  Binding to 0.0.0.0, it
> seems only broadcasts will come in on whatever if has the default
> route.
> 
> I'm trying to work around the fact that linux will not receive
> broadcasts when binding a socket to an IP other than INADDR_ANY.
> Windows does this, and it's required for the wine project.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Why don't you bind to INADDR_ANY, set the IP_PKTINFO socket option on the socket
in question, and filter based on the ipi_ifindex value in the ancillary messages
that come in with each packet?

Regards
Neil

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to