]> git.meshlink.io Git - meshlink/blobdiff - src/libmeshlink.h
Be carefull there is a race condition. You need myself to be allocated or going to...
[meshlink] / src / libmeshlink.h
index 2541b5f2888ea2242c863769aa2a4b3851971bcf..ab7cdded06777410df9c7c87c89e2bfca51cdcda 100644 (file)
@@ -23,6 +23,7 @@
 //#include "tincctl.h"
 #include "xalloc.h"
 #include "logger.h"
+#include "route.h"
 
 extern char *hosts_dir;
 extern FILE *fopenmask(const char *filename, const char *mode, mode_t perms);
@@ -40,8 +41,19 @@ bool tinc_start(const char* path);
 
 bool tinc_stop();
 
+typedef struct tincpackethdr {
+  u_int8_t destination[16];
+  u_int8_t source[16];
+} __attribute__ ((__packed__)) tincpackethdr;
+
+typedef struct tincremotehost {
+  char *name;
+  char *publickey;
+
+} tincremotehost;
+
 // can be called from any thread
-bool tinc_send_packet(node_t *receiver, const char* buf, unsigned int len);
+bool tinc_send_packet(tincremotehost *receiver, const char* buf, unsigned int len);
 
 // handler runs in tinc thread and should return immediately
 bool tinc_set_packet_receive_handler(void (*handler)(const char* sender, const char* buf, unsigned int len));