libnice 0.1.4 released!

Hey everyone,

I have just released a new version of libnice, the NAT traversal library.

Version 0.1.4 has a few bug fixes but the major changes are the addition of an SDP parsing and generation API.

You can now more easily generate your credentials and candidates and parse them with a single API call, making it much easier to exchange candidates and establish a successful connection.

Also, I have added three examples to the examples/ subdirectoy from the libnice source tree. Those examples should help anyone learn how to use libnice and what to do in order to establish a successful connection.

The first example, simple-example.c will create a new agent, and gather its candidates and print out a single line to paste on the peer. It uses the signals to asynchronously wait for events and continue the code execution.

The second example, threaded-example.c, will run the mainloop on the main thread and do everything else sequentially in another thread, waiting for signals to release the libnice thread to continue processing.

The final example, sdp-example.c, is based on the threaded example but uses the new SDP generate/parsing API to generate the candidates and credentials line to exchange between the two instances. It will base64 the SDP to make it all fit into a single line, making it easier to exchange the SDP between clients without having to parse the multi-line SDP in the example, keeping it small and concise.

I hope you will find this release useful, let me know if you have any comments.

You can get the latest version here and the documentation has been updated here.

KaKaRoTo

Libnice 0.1.0 released!

Yesterday, I released a new version of Libnice, This is a new major version that has a small API/ABI break from previous versions.

Here are the main changes :

  • Added nice_candidate_copy to the public API
  • Make stun_timer timeouts configurable (Breaks API and ABI)
  • Add compatibility support for MSOC 2007 and MSOC 2007 R2
  • Add MS-TURN support for MSOC
  • Added and completed TURN RFC 5766 support
  • Add a nice_agent_set_port_range API to force a component to use a specific port range
  • Fix various bugs and memory leaks
  • Improved documentation

The API and ABI break is with the StunTimer usage, so if you use it, you’ll need to do a small change to your code. Because the library version changed, you’ll also need to recompile your applications that link with libnice.

The biggest change in this version is the full support for the recently published RFC 5766 TURN standard (UDP and TCP) as well as the addition of MS Office Communicator compatibility. The API/ABI break introduced in the StunTimer usage is to allow specifying the timeout of STUN retransmissions. The timeout for the STUN and TURN discovery during the candidate gathering phase has also been lowered to 3 seconds now instead of the 9 second timeout that we had before, which should make for a quicker candidate gathering phase and a more responsive UI.

Another interesting change is the addition of the nice_agent_set_port_range API that allows you to specify a range of ports that you want a component to listen to for host candidates. This should help those who use port forwarding with symmetric NATs.

The stun_usage_timer configurable timeout as well as the nice_agent_set_port_range addition were suggested by Tom Kaminski.
The MSOC support was added by Jakub Adam.
The RFC 5766 TURN support was added by Marcus Lundblad and myself.
Other small fixes that were reported on the libnice mailing list were also fixed and included in this version.
Thanks to everyone who contributed in this release and thanks to Collabora and Nokia for sponsoring that work!

A new version of Farsight2 has also been released today (0.0.23) which should work with the new API of this Libnice release.

You can download this new version of Libnice from the usual place.

Enjoy!

Youness.

Release libnice 0.0.13

Hello,

Libnice 0.0.13 has just been released..  It’s a small release that fixes a few bugs, cleans the code a bit and makes coverity happy!

Also, this release adds support for IPv6 which now makes the library a bit more universal!

Another important fix was the ‘crc32’ function used internally in libnice which was conflicting with the same symbol in libz.so. After a user reported a crash in libnice when he used it with his application (which was linking to libz.so as well), I realized the conflict and have now renamed the function from ‘crc32’ into ‘stun_crc32’, which now makes libnice safer to use. Hopefully, there won’t be any more similar problem.

If you find issues or bugs with libnice, please report them and we’ll try to fix them for the next release!

As discussed in my previous post, TURN support still isn’t complete for now, and I’m still waiting for some charitable mind to send me a patch for upgrading TURN support in libnice to its latest RFC. Otherwise, you’ll have to be patient until I get some free time!

KaKaRoTo

Release libnice 0.0.12

Hello,

Libnice 0.0.12 has just been released.. It’s not a very important release as it doesn’t add any substantial feature, but it does fix a few nasty bugs, so it’s recommended to update.

The important thing to note is that recently ICE has been standardized and is now known as RFC 5245! This is great news as it means that the spec will stop changing (it actually became stable at draft 19, so we were already safe).

The same thing happened to TURN, which has been standardized as RFC 5766. TURN has been changing a lot lately, so having it as a finalized standard is very good news.

In this release, libnice  has now a NICE_COMPATIBILITY_RFC5245 which should be used instead of the compatibility mode NICE_COMPATIBILITY_DRAFT19. Although the old code should still work since I kept the DRAFT19 symbol for legacy reasons.

The problem now is with TURN.  I never had time to upgrade TURN from the last draft that I implemented (draft 9) and since the specs of TURN kept changing, I didn’t want (nor had time) to keep updating it to meet the spec changes. So the new libnice is compatible with RFC5245 but it doesn’t support the TURN 5766 draft yet. Hopefully, the next release will be compatible with TURN RFC 5766.

If someone wants to contribute to libnice, then implementing the changes to TURN to upgrade it from draft 9 to RFC 5766 would be the first step! Let me know if you want to help.

KaKaRoTo

libnice 0.0.11 Released

Hi,

Today, I’ve released a new version of libnice : 0.0.11.

This is an important milestone for libnice because this is the first version that has support for a reliable transport.

As I explained in my previous post, this version uses a TCP over UDP implementation that is compatible with libjingle’s pseudotcp (it’s actually a copy of it).

The change is very minimal, all you need to do is call nice_agent_new_reliable instead of nice_agent_new and libnice will take care of making your components reliable. You will also need to pay close attention to the return value of the nice_agent_send as well as the reliable-transport-writable signal. But everything else should stay the same.

If you’re interested in the TCPoUDP implementation, you can also use it directly in your application, outside of libnice, as it is now provided as its own class.

The documentation has now been updated, and you can read more about it here.

Let me know if you will be using this much requested feature!

Adding reliability to libnice

Hey all,

First news I’d like to share is about libnice!

I’ve been working lately on adding reliability to libnice. This means that you could be using libnice as a reliable socket.. This is accomplished using some form of TCP over UDP, which is compatible with google’s libjingle implementation.

The API doesn’t change much, you only need to call nice_agent_new_reliable, and there’s a new signal ‘reliable-transport-writable’ in case you fill in the internal buffer and nice_agent_send starts returning -1. That’s all!

I know a lot of people were waiting for a reliable transport with libnice. I’ve discussed with many people during GCDS and most of them said that they’d like to see some kind of TCP over UDP in libnice, so I’m happy to say that I finally got around to doing it.

I also decided to make this TCPoUDP algo into its own GObject and make it available through libnice, which means that you could use the TCPoUDP implementation directly yourself, outside of libnice, in your own applications, if you ever wanted to!

Expect this new exciting feature to become available to you in the next release of libnice!

KaKaRoTo