-* write better documentation
+TODO list for MeshLink
+----------------------
-* Adapt it to IPv6 - better yet, any protocol.
- * this would require to base routing on MAC addresses instead of IP
- addresses, as is done now. If this can be done, IPX is also
- supported.
- * let tinc assign a MAC address to the tap device, based on some
- whacky number
+Refactoring: getting rid of global variables. Ultimately, no global variables
+should be used by the library (if possible). Tinc uses quite a lot of global
+variables. Refactoring this should go into steps:
-* add a digital signature to each packet, using HMAC
+* Temporarily create a global meshlink_handle_t *mesh (done)
+* Move global variables to meshlink_handle_t (partially done)
+ - This means moving the declaration from the old .h file to meshlink_internal.h inside meshlink_handle_t
+ - Then doing sed 's/variable/mesh->&/g' *.c -i, and running make to check for any errors
-* enable encryption using other ciphers (IDEA)
- * the library is already included, but it cannot be used.
+After that is completed:
-* allow multiple outgoing links, or a list of them, so that if a host
- is not available, that we can select another from the list.
+* Add meshlink_handle_t *mesh as the first argument to functions that need it
-* support for multiple protocols; PPTP, IPSec, NIAS, L2TP,...
+Then:
+
+* Write code for all the functions in meshlink.c (some can be moved from libmeshlink.c)
+
+Other tasks:
+
+* Use snprintf() instead of xasprintf() when generating filenames
+ - Use char filename[PATH_MAX] on the stack. No more need to free().