Non-standard socket options?

Brian Call brian.call at soterawireless.com
Thu May 9 13:49:02 PDT 2013


Hi Guys,

My name is Brian Call and I'm a software developer for Sotera Wireless. I'm currently developing a relatively complex multicast application using the jdk7 selector-based I/O for multicast and I've run in to a pretty major hurdle. By "complex", I mean that I have a single bound socket joining multiple groups and it's critical that the bound socket only receive traffic for groups it has joined. I'm hitting the "promiscuous" traffic problem... and while bound to 0.0.0.0 on linux I'm getting traffic for all multicast groups, even if they were not specifically joined. In essence, there is no IP stack-level filtering for datagrams by joined group on linux unless you explicitly tell the stack to do so. Solaris and windows does the filtering by default and Linux does not. 

Is there any way to make use of a non-standard socket option in Java? Having spoken with Neil Horman lead networking developer over at Red Hat, he mentioned that by passing in the socket option IP_MULTICAST_ALL with a value of '0' it will disable UDP multiplexing on Linux when bound to the wildcard address. This would definitely be the hot move... 

If you have any insight into resolving the promiscuous multicast traffic problem in Java, I'd be more than grateful. 

Thanks in advance for your help!

Blessings,

Brian Call
brian.call at soterawireless.com

PRIVILEGED AND CONFIDENTIAL COMMUNICATION: This electronic transmission, and any documents attached hereto, may contain confidential and/or legally privileged information.  The information is intended only for use by the recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of information received in error is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20130509/853dd7cf/attachment.html 


More information about the net-dev mailing list