diff --git a/src/example_edge_embed.c b/src/example_edge_embed.c index 5c91683..ac809d5 100644 --- a/src/example_edge_embed.c +++ b/src/example_edge_embed.c @@ -1,3 +1,21 @@ +/** + * (C) 2007-20 - ntop.org and contributors + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not see see + * + */ + #include "n2n.h" static int keep_running; @@ -54,4 +72,4 @@ int main() tuntap_close(&tuntap); return rc; -} \ No newline at end of file +} diff --git a/src/example_sn_embed.c b/src/example_sn_embed.c index 4b8aaf3..4428e69 100644 --- a/src/example_sn_embed.c +++ b/src/example_sn_embed.c @@ -1,3 +1,21 @@ +/** + * (C) 2007-20 - ntop.org and contributors + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not see see + * + */ + #include "n2n.h" static int keep_running; @@ -29,4 +47,4 @@ int main() sn_term(&sss_node); return rc; -} \ No newline at end of file +} diff --git a/src/sn.c b/src/sn.c index 203b122..08700ae 100644 --- a/src/sn.c +++ b/src/sn.c @@ -21,14 +21,8 @@ #include "n2n.h" #include "header_encryption.h" - - - - static n2n_sn_t sss_node; - - /** Load the list of allowed communities. Existing/previous ones will be removed * */ diff --git a/src/sn_utils.c b/src/sn_utils.c index 94b8056..56def7d 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -1,3 +1,21 @@ +/** + * (C) 2007-20 - ntop.org and contributors + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not see see + * + */ + #include "n2n.h" #define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out) @@ -418,7 +436,7 @@ static int process_mgmt(n2n_sn_t *sss, HASH_ITER(hh, sss->communities, community, tmp) { ressize += snprintf(resbuf + ressize, N2N_SN_PKTBUF_SIZE - ressize, "community: %s\n", community->community); - sendto_mgmt(sss, sender_sock, resbuf, ressize); + sendto_mgmt(sss, sender_sock, (const uint8_t *)resbuf, ressize); ressize = 0; num = 0; @@ -428,14 +446,14 @@ static int process_mgmt(n2n_sn_t *sss, ++num, macaddr_str(mac_buf, peer->mac_addr), sock_to_cstr(sockbuf, &(peer->sock)), now-peer->last_seen); - sendto_mgmt(sss, sender_sock, resbuf, ressize); + sendto_mgmt(sss, sender_sock, (const uint8_t *)resbuf, ressize); ressize = 0; } } ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize, "\n"); - sendto_mgmt(sss, sender_sock, resbuf, ressize); + sendto_mgmt(sss, sender_sock, (const uint8_t *)resbuf, ressize); return 0; }