X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Flibmeshlink.h;h=7cbd6374e303fd76b44721ced426ccb17a593a8e;hb=2956559f7d12caa9779207525419801e0e9ab3e3;hp=df1fc8d764be6df525b1b644d24d1a5ebfe6c178;hpb=c53b009f21e97379cad24c811c8033e647cb2bb9;p=meshlink diff --git a/src/libmeshlink.h b/src/libmeshlink.h index df1fc8d7..7cbd6374 100644 --- a/src/libmeshlink.h +++ b/src/libmeshlink.h @@ -1,6 +1,6 @@ /* libmeshlink.h -- Tincd Library - Copyright (C) 2014 Guus Sliepen Saverio Proto + Copyright (C) 2014 Guus Sliepen Saverio Proto This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,6 @@ #include "system.h" #include "node.h" -#include "names.h" //#include "tincctl.h" #include "xalloc.h" #include "logger.h" @@ -42,22 +41,12 @@ bool tinc_start(const char* path); bool tinc_stop(); typedef struct tincpackethdr { - /* Use a standard Type-Length-Value (TLV) element */ - u_int8_t type; - u_int8_t len; - u_int16_t reserved; /* Always 0 */ - u_int32_t destination; - u_int32_t source; + 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(tincremotehost *receiver, const char* buf, unsigned int len); +bool tinc_send_packet(node_t *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));