diff --git a/tools/n2n-route.c b/tools/n2n-route.c index 18cd7fc..d19f329 100644 --- a/tools/n2n-route.c +++ b/tools/n2n-route.c @@ -17,10 +17,38 @@ */ +#include // for errno +#include // for getopt_long, optind, optarg +#include // for signal, SIGINT, SIGPIPE, SIGTERM, SIG_IGN +#include // for uint8_t, uint16_t, uint32_t +#include // for snprintf, printf, sscanf +#include // for calloc, free, atoi, EXIT_FAILURE, exit +#include // for memset, NULL, memcmp, strchr, strcmp +#include // for timeval +#include // for time, time_t +#include // for getpid, STDIN_FILENO, _exit, geteuid #include "json.h" // for _jsonpair, json_object_t, _jsonvalue #include "n2n.h" // for inaddrtoa, traceEvent, TRACE_WARNING #include "random_numbers.h" // for n2n_rand, n2n_seed, n2n_srand +#include "uthash.h" // for UT_hash_handle, HASH_ADD, HASH_DEL +#ifdef __linux__ +#include // for nlmsghdr, NLMSG_OK, NETLINK_ROUTE, NLM... +#include // for RTA_DATA, rtmsg, RTA_GATEWAY, RTA_NEXT +#endif + +#ifdef WIN32 +#include +#include +#else +#include // for inet_pton +#include // for if_indextoname +#include // for rtentry, RTF_GATEWAY, RTF_UP +#include // for in_addr, sockaddr_in, htonl, htons, ntohl +#include // for ioctl, SIOCADDRT, SIOCDELRT +#include // for select, FD_ISSET, FD_SET, FD_ZERO, fd_set +#include // for send, socket, AF_INET, recv, connect +#endif #if defined (__linux__) || defined(WIN32) /* currently, Linux and Windows only */