Hey, If it's of any future use to you, here's how I handled binding to all the interfaces and listen for upnp broadcasts. Check out the 'CreateSockets' method here:
http://anonsvn.mono-project.com/viewvc/trunk/Mono.Nat/src/Mono.Nat/UpnpSearcher.cs Alan. p.s. I really need to sort out the formatting of those files. They have both 4 line spaces and real tabs in them :( On Tue, May 11, 2010 at 3:41 PM, Ylian <[email protected]> wrote: > > Yesterday night I > http://software.intel.com/en-us/blogs/2010/05/10/tools-for-upnp-running-on-linuxmono/ > posted a blog about the http://opentools.homeip.net/dev-tools-for-upnp > Developer Tools for UPnP Technologies now working on MONO. > > First, ExclusiveAddressUse was optional and not my real problem anyway. > Skipping it was perfectly fine. The real problem was that I normally bind a > different socket to each local interface and join the SSDP multicast group. > After much trial and error I noticed that if I bind to ANY, it worked and I > started receiving multicast traffic, but bind to a specific interface and I > would not. > > Now, I MUST know the specific local interface on which I received the > multicast packet so, binding to ANY is not an option. I then noticed that > you can specify an interface in the multicast join, so I tried creating a > bunch of sockets all with ANY bind, but each with a multicast join on a > separate local interface. That worked! > > I had to chance the code because normally when I receive traffic, I look at > the client.localendpoint to give me to local interface then traffic came on. > Since all sockets are now bind to ANY, I have to carry the localendpoint > separately. This was an easy fix and the result is impressive. The main > tools Device Sniffer, Device Spy and Network Light all work perfectly. > > Thanks, > Ylian > http://opentools.homeip.net opentools.homeip.net > -- > View this message in context: > http://mono.1490590.n4.nabble.com/Porting-UPnP-Tools-to-MONO-Socket-ExclusiveAddressUse-problem-tp2173013p2173919.html > Sent from the Mono - General mailing list archive at Nabble.com. > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
