[libnice] Ignore host candidates for testing

Philip Withnall philip at tecnocode.co.uk
Wed Jun 24 07:52:18 PDT 2015


Hey,

On Tue, 2015-06-23 at 21:09 +1200, Felix Schlitter wrote:
> I am wondering if it is possible to force libnice to ignore host 
> candidates?
> I have a use case where I would like to test the connection locally 
> on the
> same machine as if there were actually two machines involved:
*snip*

There is no API for this, but it’s a problem I’ve come across in the
past and I think it would be reasonable to add something. Patches
welcome!

The approach I vaguely had in mind is to allow the priority table to be
overridden by the user, with something like:

   void
   nice_agent_set_ice_priorities (NiceAgent *agent,
                                  const guint8 priorities[],
                                  guint n_priorities);

However, I do worry that this would be exposing too much of the
protocol innards in the public API. Your approach of selectively
eliding some of the candidates from the signalling between the peers is
potentially better, actually. Why do you think it’s a bad approach?

While I toyed with that priorities idea for a while, when I test with
libnice I actually implement this using iptables rules which block UDP
traffic on localhost. You can constrain the set of ports libnice
listens on if you want to make the rule more specific (use
nice_agent_set_port_range()).

> PS: It would be great to see this project hosted on github... using 
> the mailing
> list is pretty off-putting - the search function does not seem to 
> work, so I could not search
> if someone had asked sth like this before, unless I click manually 
> through 5 years
> worth of threads... Also submitting pull requests would be a lot 
> easier than attaching patches
> which may go stale. I would be happy to volunteer time to help this 
> transition.

Good idea. GitHub project added:

https://github.com/libnice/libnice

I’ve also updated the website to link to Bugzilla and GitHub, since it
inexplicably wasn’t linked to Bugzilla before.

Note that while pull requests on GitHub are fine, I don’t think we want
to use GitHub’s issue tracking, or we’ll end up with bug reports there
and on Bugzilla, and everything will get very confusing.

Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/nice/attachments/20150624/f19c0406/attachment.sig>


More information about the nice mailing list