#include "subnet.h"
#include "utils.h"
#include "xalloc.h"
+#include "graph.h"
/* Implementation of Kruskal's algorithm.
Running time: O(E)
Running time: O(N^2)
*/
-void sssp_dijkstra(void) {
+static void sssp_dijkstra(void) {
splay_node_t *node, *to;
edge_t *e;
node_t *n, *m;
list_free(todo_list);
}
-void check_reachability() {
+static void check_reachability() {
splay_node_t *node, *next;
node_t *n;
char *name;
#include "route.h"
#include "utils.h"
#include "xalloc.h"
+#include "device.h"
typedef enum device_type_t {
DEVICE_TYPE_ETHERTAP,
#include "xalloc.h"
int keylifetime = 0;
-int keyexpires = 0;
+static int keyexpires = 0;
#ifdef HAVE_LZO
static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
#endif
send_mtu_probe_handler(0, 0, n);
}
-void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
+static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
ifdebug(TRAFFIC) logger(LOG_INFO, "Got MTU probe length %d from %s (%s)", packet->len, n->name, n->hostname);
if(!packet->data[0]) {
return result;
}
-bool read_rsa_private_key() {
+static bool read_rsa_private_key(void) {
FILE *fp;
char *fname;
char *n, *d;
/*
Configure node_t myself and set up the local sockets (listen only)
*/
-bool setup_myself(void) {
+static bool setup_myself(void) {
config_t *cfg;
subnet_t *subnet;
char *name, *hostname, *mode, *afname, *cipher, *digest;
return;
}
-void handle_meta_write(int sock, short events, void *data) {
+static void handle_meta_write(int sock, short events, void *data) {
ifdebug(META) logger(LOG_DEBUG, "handle_meta_write() called");
connection_t *c = data;
event_del(&c->outevent);
}
-void handle_meta_connection_error(struct bufferevent *event, short what, void *data) {
+static void handle_meta_connection_error(struct bufferevent *event, short what, void *data) {
connection_t *c = data;
logger(LOG_ERR, "handle_meta_connection_error() called: %d: %s", what, strerror(errno));
terminate_connection(c, c->status.active);
send_id(c);
}
-void free_outgoing(outgoing_t *outgoing) {
+static void free_outgoing(outgoing_t *outgoing) {
if(outgoing->ai)
freeaddrinfo(outgoing->ai);
extern bool use_logfile;
#ifndef HAVE_MINGW
-sigset_t emptysigset;
+static sigset_t emptysigset;
#endif
static void memory_full(int size) {
}
}
-void age_past_requests(int fd, short events, void *data) {
+static void age_past_requests(int fd, short events, void *data) {
splay_node_t *node, *next;
past_request_t *p;
int left = 0, deleted = 0;
#include "top.h"
/* The name this program was run with. */
-char *program_name = NULL;
+static char *program_name = NULL;
/* If nonzero, display usage information and exit. */
-bool show_help = false;
+static bool show_help = false;
/* If nonzero, print the version on standard output and exit. */
-bool show_version = false;
+static bool show_version = false;
/* If nonzero, it will attempt to kill a running tincd and exit. */
-int kill_tincd = 0;
+static int kill_tincd = 0;
/* If nonzero, generate public/private keypair for this host/net. */
-int generate_keys = 0;
+static int generate_keys = 0;
static char *name = NULL;
static char *identname = NULL; /* program name for syslog */
#include "xalloc.h"
/* The name this program was run with. */
-char *program_name = NULL;
+static char *program_name = NULL;
/* If nonzero, display usage information and exit. */
-bool show_help = false;
+static bool show_help = false;
/* If nonzero, print the version on standard output and exit. */
-bool show_version = false;
+static bool show_version = false;
/* If nonzero, use null ciphers and skip all key exchanges. */
bool bypass_security = false;
/* If nonzero, disable swapping for this process. */
-bool do_mlock = false;
+static bool do_mlock = false;
/* If nonzero, chroot to netdir after startup. */
static bool do_chroot = false;
bool known;
} nodestats_t;
-const char *const sortname[] = {
+static const char *const sortname[] = {
"name",
"in pkts",
"in bytes",
"tot bytes",
};
-int sortmode = 0;
-bool cumulative = false;
+static int sortmode = 0;
+static bool cumulative = false;
static list_t node_list;
static struct timeval now, prev, diff;
#include "../src/logger.h"
#include "utils.h"
-const char hexadecimals[] = "0123456789ABCDEF";
+static const char hexadecimals[] = "0123456789ABCDEF";
-int charhex2bin(char c) {
+static int charhex2bin(char c) {
if(isdigit(c))
return c - '0';
else