1 #include <libmeshlink.h>
3 int main(int argc , char **argv){
5 char *confbase = "/tmp/meshlink/";
8 tincremotehost* remotenode = malloc(sizeof(tincremotehost));
9 char *remotename = "nameofremotenode";
11 //TODO: change this, calling a function that returns tincremotehost
12 remotenode->name = remotename;
13 remotenode->publickey = NULL;
15 tinc_setup(confbase, name);
19 //sample data to send out
22 strcpy(mydata,"Hello World!");
25 tinc_send_packet(remotenode,mydata,sizeof(mydata));
26 sleep(10); //give time to this thread to finish before we exit