Libnjaim HOWTO

Xin Li

2006-03-28

Revision History
Revision 0.12006-03-28Revised by: LX
first draft
Revision 0.22006-04-18Revised by: LX
add unishutdown

This HOWTO explains the usage of libnjaim.


Table of Contents
1. Introduction
1.1. Copyright and License
1.2. Disclaimer
1.3. Credits / Contributors
1.4. Feedback
2. Requirements
3. Compilation
3.1. Link against libnjaim
3.2. Run test program
4. Message Formats
5. Interface
6. TODOs

1. Introduction

Libnjaim is a library for NAT traversal written in C. Clients separated by different NATs cannot create direct TCP connection. While communication through relaying is too expensive, we provide this library in the hope of solving the problem in some cases.

When establishing direct TCP connection is impossible or hard, libnjaim will establish reliable UDP connection instead. The caller is presented with a uniform interface simulating the standard socket functions, without the need to care about actual protocol for connection.

This document should be understood easily by anyone with programming experience in C.

1.1. Copyright and License

This document, Libnjaim HOWTO, is copyrighted (c) 2006 by Lixin. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 2 or any later version published by the Free Software Foundation.

1.2. Disclaimer

No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility.

All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.

1.3. Credits / Contributors

In this document, I have the pleasure of acknowledging (unordered):

1.4. Feedback

Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address : .