Traversity is a GObject based library to help with NAT traversal.
It is currently a work in progress, but we are looking to support UPnP, NAT-PMP, and STUN at the least.
The API is highly volatile, and you need to bother looking unless you're going to contribute.