[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tinc/src conf.c,1.9.4.62,1.9.4.63 conf.h,1.6.4.36,1.6.4.37 connection.c,1.1.2.37,1.1.2.38 connection.h,1.1.2.31,1.1.2.32 edge.c,1.1.2.19,1.1.2.20 edge.h,1.1.2.11,1.1.2.12 event.c,1.1.4.6,1.1.4.7 event.h,1.1.4.4,1.1.4.5 logger.c,1.1.2.1,1.1.2.2 net.c,1.35.4.188,1.35.4.189 net.h,1.9.4.59,1.9.4.60 net_packet.c,1.1.2.31,1.1.2.32 node.c,1.1.2.20,1.1.2.21 node.h,1.1.2.22,1.1.2.23 process.c,1.1.2.51,1.1.2.52 process.h,1.1.2.13,1.1.2.14 protocol.c,1.28.4.138,1.28.4.139 protocol.h,1.5.4.37,1.5.4.38 protocol_auth.c,1.1.4.21,1.1.4.22 protocol_misc.c,1.1.4.8,1.1.4.9 route.c,1.1.2.54,1.1.2.55 subnet.c,1.1.2.44,1.1.2.45 subnet.h,1.1.2.20,1.1.2.21 tincd.c,1.10.4.70,1.10.4.71



Update of /home/CVS/tinc/src
In directory humbolt:/tmp/cvs-serv20250/src

Modified Files:
      Tag: CABAL
	conf.c conf.h connection.c connection.h edge.c edge.h event.c 
	event.h logger.c net.c net.h net_packet.c node.c node.h 
	process.c process.h protocol.c protocol.h protocol_auth.c 
	protocol_misc.c route.c subnet.c subnet.h tincd.c 
Log Message:
Sprinkling the source with static and attributes.


Index: conf.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/conf.c,v
retrieving revision 1.9.4.62
retrieving revision 1.9.4.63
diff -u -r1.9.4.62 -r1.9.4.63
--- conf.c	2003/07/06 22:11:31	1.9.4.62
+++ conf.c	2003/07/06 23:16:28	1.9.4.63
@@ -51,7 +51,7 @@
 char *confbase = NULL;			/* directory in which all config files are */
 char *netname = NULL;			/* name of the vpn network */
 
-int config_compare(config_t *a, config_t *b)
+static int config_compare(config_t *a, config_t *b)
 {
 	int result;
 
@@ -270,7 +270,7 @@
   given, and buf needs to be expanded, the var pointed to by buflen
   will be increased.
 */
-char *readline(FILE * fp, char **buf, size_t *buflen)
+static char *readline(FILE * fp, char **buf, size_t *buflen)
 {
 	char *newline = NULL;
 	char *p;
@@ -429,7 +429,7 @@
 	return x;
 }
 
-int isadir(const char *f)
+static int isadir(const char *f)
 {
 	struct stat s;
 

Index: conf.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/conf.h,v
retrieving revision 1.6.4.36
retrieving revision 1.6.4.37
diff -u -r1.6.4.36 -r1.6.4.37
--- conf.h	2003/07/06 22:11:31	1.6.4.36
+++ conf.h	2003/07/06 23:16:28	1.6.4.37
@@ -48,7 +48,7 @@
 
 extern void init_configuration(avl_tree_t **);
 extern void exit_configuration(avl_tree_t **);
-extern config_t *new_config(void);
+extern config_t *new_config(void) __attribute__ ((malloc));
 extern void free_config(config_t *);
 extern void config_add(avl_tree_t *, config_t *);
 extern config_t *lookup_config(avl_tree_t *, char *);

Index: connection.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/connection.c,v
retrieving revision 1.1.2.37
retrieving revision 1.1.2.38
diff -u -r1.1.2.37 -r1.1.2.38
--- connection.c	2003/07/06 22:11:31	1.1.2.37
+++ connection.c	2003/07/06 23:16:28	1.1.2.38
@@ -42,7 +42,7 @@
 avl_tree_t *connection_tree;	/* Meta connections */
 connection_t *broadcast;
 
-int connection_compare(connection_t *a, connection_t *b)
+static int connection_compare(connection_t *a, connection_t *b)
 {
 	return (void *)a - (void *)b;
 }

Index: connection.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/connection.h,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -u -r1.1.2.31 -r1.1.2.32
--- connection.h	2002/09/09 21:24:31	1.1.2.31
+++ connection.h	2003/07/06 23:16:28	1.1.2.32
@@ -113,7 +113,7 @@
 
 extern void init_connections(void);
 extern void exit_connections(void);
-extern connection_t *new_connection(void);
+extern connection_t *new_connection(void) __attribute__ ((malloc));
 extern void free_connection(connection_t *);
 extern void connection_add(connection_t *);
 extern void connection_del(connection_t *);

Index: edge.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/edge.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -r1.1.2.19 -r1.1.2.20
--- edge.c	2003/07/06 22:11:31	1.1.2.19
+++ edge.c	2003/07/06 23:16:28	1.1.2.20
@@ -42,12 +42,12 @@
 
 avl_tree_t *edge_weight_tree;	/* Tree with all edges, sorted on weight */
 
-int edge_compare(edge_t *a, edge_t *b)
+static int edge_compare(edge_t *a, edge_t *b)
 {
 	return strcmp(a->to->name, b->to->name);
 }
 
-int edge_weight_compare(edge_t *a, edge_t *b)
+static int edge_weight_compare(edge_t *a, edge_t *b)
 {
 	int result;
 

Index: edge.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/edge.h,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- edge.h	2002/09/09 21:24:31	1.1.2.11
+++ edge.h	2003/07/06 23:16:28	1.1.2.12
@@ -45,9 +45,9 @@
 
 extern void init_edges(void);
 extern void exit_edges(void);
-extern edge_t *new_edge(void);
+extern edge_t *new_edge(void) __attribute__ ((malloc));
 extern void free_edge(edge_t *);
-extern avl_tree_t *new_edge_tree(void);
+extern avl_tree_t *new_edge_tree(void) __attribute__ ((malloc));
 extern void free_edge_tree(avl_tree_t *);
 extern void edge_add(edge_t *);
 extern void edge_del(edge_t *);

Index: event.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/event.c,v
retrieving revision 1.1.4.6
retrieving revision 1.1.4.7
diff -u -r1.1.4.6 -r1.1.4.7
--- event.c	2002/09/09 22:32:30	1.1.4.6
+++ event.c	2003/07/06 23:16:28	1.1.4.7
@@ -38,7 +38,7 @@
 
 int id;
 
-int event_compare(event_t *a, event_t *b)
+static int event_compare(event_t *a, event_t *b)
 {
 	if(a->time > b->time)
 		return 1;

Index: event.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/event.h,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -u -r1.1.4.4 -r1.1.4.5
--- event.h	2002/09/09 22:32:36	1.1.4.4
+++ event.h	2003/07/06 23:16:28	1.1.4.5
@@ -26,7 +26,7 @@
 #include <time.h>
 #include <avl_tree.h>
 
-avl_tree_t *event_tree;
+extern avl_tree_t *event_tree;
 
 typedef void (*event_handler_t)(void *);
 
@@ -39,7 +39,7 @@
 
 extern void init_events(void);
 extern void exit_events(void);
-extern event_t *new_event(void);
+extern event_t *new_event(void) __attribute__ ((malloc));
 extern void free_event(event_t *);
 extern void event_add(event_t *);
 extern void event_del(event_t *);

Index: logger.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/logger.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- logger.c	2003/07/06 22:11:31	1.1.2.1
+++ logger.c	2003/07/06 23:16:28	1.1.2.2
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <syslog.h>
+#include <unistd.h>
 
 #include "conf.h"
 #include "logger.h"
@@ -30,15 +31,13 @@
 #include "system.h"
 
 volatile int debug_level = DEBUG_NOTHING;
-int logmode = LOGMODE_STDERR;
-pid_t logpid;
+static int logmode = LOGMODE_STDERR;
+static pid_t logpid;
 extern char *logfilename;
-FILE *logfile = NULL;
-const char *logident = NULL;
+static FILE *logfile = NULL;
+static const char *logident = NULL;
 
 void openlogger(const char *ident, int mode) {
-	char *fname;
-
 	logident = ident;
 	logmode = mode;
 	
@@ -65,7 +64,7 @@
 			fprintf(stderr, "\n");
 			break;
 		case LOGMODE_FILE:
-			fprintf(logfile, "%d %s[%d]: ", time(NULL), logident, logpid);
+			fprintf(logfile, "%ld %s[%d]: ", time(NULL), logident, logpid);
 			vfprintf(logfile, format, ap);
 			fprintf(logfile, "\n");
 			break;

Index: net.c
===================================================================
RCS file: /home/CVS/tinc/src/net.c,v
retrieving revision 1.35.4.188
retrieving revision 1.35.4.189
diff -u -r1.35.4.188 -r1.35.4.189
--- net.c	2003/07/06 22:11:32	1.35.4.188
+++ net.c	2003/07/06 23:16:28	1.35.4.189
@@ -82,7 +82,7 @@
 
 /* Purge edges and subnets of unreachable nodes. Use carefully. */
 
-void purge(void)
+static void purge(void)
 {
 	avl_node_t *nnode, *nnext, *enode, *enext, *snode, *snext;
 	node_t *n;
@@ -124,7 +124,7 @@
   put all file descriptors in an fd_set array
   While we're at it, purge stuff that needs to be removed.
 */
-int build_fdset(fd_set * fs)
+static int build_fdset(fd_set * fs)
 {
 	avl_node_t *node, *next;
 	connection_t *c;
@@ -218,7 +218,7 @@
   end does not reply in time, we consider them dead
   and close the connection.
 */
-void check_dead_connections(void)
+static void check_dead_connections(void)
 {
 	avl_node_t *node, *next;
 	connection_t *c;
@@ -258,7 +258,7 @@
   check all connections to see if anything
   happened on their sockets
 */
-void check_network_activity(fd_set * f)
+static void check_network_activity(fd_set * f)
 {
 	connection_t *c;
 	avl_node_t *node;

Index: net.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/net.h,v
retrieving revision 1.9.4.59
retrieving revision 1.9.4.60
diff -u -r1.9.4.59 -r1.9.4.60
--- net.h	2003/07/06 17:15:25	1.9.4.59
+++ net.h	2003/07/06 23:16:28	1.9.4.60
@@ -121,9 +121,6 @@
 extern int seconds_till_retry;
 extern int addressfamily;
 
-extern char *request_name[];
-extern char *status_text[];
-
 #include "connection.h"			/* Yes, very strange placement indeed, but otherwise the typedefs get all tangled up */
 
 extern listen_socket_t listen_socket[MAXSOCKETS];
@@ -144,7 +141,6 @@
 extern int setup_listen_socket(sockaddr_t *);
 extern int setup_vpn_in_socket(sockaddr_t *);
 extern void send_packet(struct node_t *, vpn_packet_t *);
-extern void receive_packet(struct node_t *, vpn_packet_t *);
 extern void receive_tcppacket(struct connection_t *, char *, int);
 extern void broadcast_packet(struct node_t *, vpn_packet_t *);
 extern int setup_network_connections(void);

Index: net_packet.c
===================================================================
RCS file: /home/CVS/tinc/src/net_packet.c,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -u -r1.1.2.31 -r1.1.2.32
--- net_packet.c	2003/07/06 22:11:32	1.1.2.31
+++ net_packet.c	2003/07/06 23:16:28	1.1.2.32
@@ -82,12 +82,12 @@
 int keylifetime = 0;
 int keyexpires = 0;
 EVP_CIPHER_CTX packet_ctx;
-char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
+static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
 
 
 #define MAX_SEQNO 1073741824
 
-length_t compress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level)
+static length_t compress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level)
 {
 	if(level == 10) {
 		lzo_uint lzolen = MAXSIZE;
@@ -108,7 +108,7 @@
 	return -1;
 }
 
-length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level)
+static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level)
 {
 	if(level > 9) {
 		lzo_uint lzolen = MAXSIZE;
@@ -129,7 +129,17 @@
 
 /* VPN packet I/O */
 
-void receive_udppacket(node_t *n, vpn_packet_t *inpkt)
+static void receive_packet(node_t *n, vpn_packet_t *packet)
+{
+	cp();
+
+	logger(DEBUG_TRAFFIC, LOG_DEBUG, _("Received packet of %d bytes from %s (%s)"),
+			   packet->len, n->name, n->hostname);
+
+	route_incoming(n, packet);
+}
+
+static void receive_udppacket(node_t *n, vpn_packet_t *inpkt)
 {
 	vpn_packet_t pkt1, pkt2;
 	vpn_packet_t *pkt[] = { &pkt1, &pkt2, &pkt1, &pkt2 };
@@ -227,17 +237,7 @@
 	receive_packet(c->node, &outpkt);
 }
 
-void receive_packet(node_t *n, vpn_packet_t *packet)
-{
-	cp();
-
-	logger(DEBUG_TRAFFIC, LOG_DEBUG, _("Received packet of %d bytes from %s (%s)"),
-			   packet->len, n->name, n->hostname);
-
-	route_incoming(n, packet);
-}
-
-void send_udppacket(node_t *n, vpn_packet_t *inpkt)
+static void send_udppacket(node_t *n, vpn_packet_t *inpkt)
 {
 	vpn_packet_t pkt1, pkt2;
 	vpn_packet_t *pkt[] = { &pkt1, &pkt2, &pkt1, &pkt2 };

Index: node.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/node.c,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -u -r1.1.2.20 -r1.1.2.21
--- node.c	2003/07/06 22:11:32	1.1.2.20
+++ node.c	2003/07/06 23:16:28	1.1.2.21
@@ -40,12 +40,12 @@
 
 node_t *myself;
 
-int node_compare(node_t *a, node_t *b)
+static int node_compare(node_t *a, node_t *b)
 {
 	return strcmp(a->name, b->name);
 }
 
-int node_udp_compare(node_t *a, node_t *b)
+static int node_udp_compare(node_t *a, node_t *b)
 {
 	int result;
 

Index: node.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/node.h,v
retrieving revision 1.1.2.22
retrieving revision 1.1.2.23
diff -u -r1.1.2.22 -r1.1.2.23
--- node.h	2003/05/06 21:13:18	1.1.2.22
+++ node.h	2003/07/06 23:16:28	1.1.2.23
@@ -83,7 +83,7 @@
 
 extern void init_nodes(void);
 extern void exit_nodes(void);
-extern node_t *new_node(void);
+extern node_t *new_node(void) __attribute__ ((malloc));
 extern void free_node(node_t *);
 extern void node_add(node_t *);
 extern void node_del(node_t *);

Index: process.c
===================================================================
RCS file: /home/CVS/tinc/src/process.c,v
retrieving revision 1.1.2.51
retrieving revision 1.1.2.52
diff -u -r1.1.2.51 -r1.1.2.52
--- process.c	2003/07/06 22:11:32	1.1.2.51
+++ process.c	2003/07/06 23:16:28	1.1.2.52
@@ -65,7 +65,7 @@
 extern int sigalrm;
 extern int do_purge;
 
-void memory_full(int size)
+static void memory_full(int size)
 {
 	logger(DEBUG_ALWAYS, LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exitting."), size);
 	cp_trace();
@@ -75,7 +75,7 @@
 /* Some functions the less gifted operating systems might lack... */
 
 #ifndef HAVE_FCLOSEALL
-int fcloseall(void)
+static int fcloseall(void)
 {
 	fflush(stdin);
 	fflush(stdout);
@@ -108,7 +108,7 @@
 /*
   check for an existing tinc for this net, and write pid to pidfile
 */
-int write_pidfile(void)
+static int write_pidfile(void)
 {
 	int pid;
 
@@ -213,9 +213,9 @@
 /*
   Execute the program name, with sane environment.
 */
-void _execute_script(const char *scriptname, char **envp)
+static void _execute_script(const char *scriptname, char **envp)
 	__attribute__ ((noreturn));
-void _execute_script(const char *scriptname, char **envp)
+static void _execute_script(const char *scriptname, char **envp)
 {
 	cp();
 
@@ -304,20 +304,20 @@
   Signal handlers.
 */
 
-RETSIGTYPE sigterm_handler(int a)
+static RETSIGTYPE sigterm_handler(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_NOTICE, _("Got TERM signal"));
 
 	cleanup_and_exit(0);
 }
 
-RETSIGTYPE sigquit_handler(int a)
+static RETSIGTYPE sigquit_handler(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_NOTICE, _("Got QUIT signal"));
 	cleanup_and_exit(0);
 }
 
-RETSIGTYPE fatal_signal_square(int a)
+static RETSIGTYPE fatal_signal_square(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_ERR, _("Got another fatal signal %d (%s): not restarting."), a,
 		   strsignal(a));
@@ -325,7 +325,7 @@
 	exit(1);
 }
 
-RETSIGTYPE fatal_signal_handler(int a)
+static RETSIGTYPE fatal_signal_handler(int a)
 {
 	struct sigaction act;
 	logger(DEBUG_ALWAYS, LOG_ERR, _("Got fatal signal %d (%s)"), a, strsignal(a));
@@ -349,13 +349,13 @@
 	}
 }
 
-RETSIGTYPE sighup_handler(int a)
+static RETSIGTYPE sighup_handler(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_NOTICE, _("Got HUP signal"));
 	sighup = 1;
 }
 
-RETSIGTYPE sigint_handler(int a)
+static RETSIGTYPE sigint_handler(int a)
 {
 	if(saved_debug_level != -1) {
 		logger(DEBUG_ALWAYS, LOG_NOTICE, _("Reverting to old debug level (%d)"),
@@ -371,18 +371,18 @@
 	}
 }
 
-RETSIGTYPE sigalrm_handler(int a)
+static RETSIGTYPE sigalrm_handler(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_NOTICE, _("Got ALRM signal"));
 	sigalrm = 1;
 }
 
-RETSIGTYPE sigusr1_handler(int a)
+static RETSIGTYPE sigusr1_handler(int a)
 {
 	dump_connections();
 }
 
-RETSIGTYPE sigusr2_handler(int a)
+static RETSIGTYPE sigusr2_handler(int a)
 {
 	dump_device_stats();
 	dump_nodes();
@@ -390,24 +390,24 @@
 	dump_subnets();
 }
 
-RETSIGTYPE sigwinch_handler(int a)
+static RETSIGTYPE sigwinch_handler(int a)
 {
 	extern int do_purge;
 	do_purge = 1;
 }
 
-RETSIGTYPE unexpected_signal_handler(int a)
+static RETSIGTYPE unexpected_signal_handler(int a)
 {
 	logger(DEBUG_ALWAYS, LOG_WARNING, _("Got unexpected signal %d (%s)"), a, strsignal(a));
 	cp_trace();
 }
 
-RETSIGTYPE ignore_signal_handler(int a)
+static RETSIGTYPE ignore_signal_handler(int a)
 {
 	logger(DEBUG_SCARY_THINGS, LOG_DEBUG, _("Ignored signal %d (%s)"), a, strsignal(a));
 }
 
-struct {
+static struct {
 	int signal;
 	void (*handler)(int);
 } sighandlers[] = {

Index: process.h
===================================================================
RCS file: /home/CVS/tinc/src/process.h,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- process.h	2002/09/09 21:24:41	1.1.2.13
+++ process.h	2003/07/06 23:16:28	1.1.2.14
@@ -31,6 +31,6 @@
 extern int execute_script(const char *, char **);
 extern int detach(void);
 extern int kill_other(int);
-extern void cleanup_and_exit(int);
+extern void cleanup_and_exit(int) __attribute__ ((noreturn));
 
 #endif							/* __TINC_PROCESS_H__ */

Index: protocol.c
===================================================================
RCS file: /home/CVS/tinc/src/protocol.c,v
retrieving revision 1.28.4.138
retrieving revision 1.28.4.139
diff -u -r1.28.4.138 -r1.28.4.139
--- protocol.c	2003/07/06 22:11:32	1.28.4.138
+++ protocol.c	2003/07/06 23:16:28	1.28.4.139
@@ -41,7 +41,28 @@
 
 #include "system.h"
 
-avl_tree_t *past_request_tree;
+/* Jumptable for the request handlers */
+
+static int (*request_handlers[])(connection_t *) = {
+		id_h, metakey_h, challenge_h, chal_reply_h, ack_h,
+		status_h, error_h, termreq_h,
+		ping_h, pong_h,
+		add_subnet_h, del_subnet_h,
+		add_edge_h, del_edge_h,
+		key_changed_h, req_key_h, ans_key_h, tcppacket_h,
+};
+
+/* Request names */
+
+static char (*request_name[]) = {
+		"ID", "METAKEY", "CHALLENGE", "CHAL_REPLY", "ACK",
+		"STATUS", "ERROR", "TERMREQ",
+		"PING", "PONG",
+		"ADD_SUBNET", "DEL_SUBNET",
+		"ADD_EDGE", "DEL_EDGE", "KEY_CHANGED", "REQ_KEY", "ANS_KEY", "PACKET",
+};
+
+static avl_tree_t *past_request_tree;
 
 int check_id(char *id)
 {
@@ -170,12 +191,12 @@
 	return 0;
 }
 
-int past_request_compare(past_request_t *a, past_request_t *b)
+static int past_request_compare(past_request_t *a, past_request_t *b)
 {
 	return strcmp(a->request, b->request);
 }
 
-void free_past_request(past_request_t *r)
+static void free_past_request(past_request_t *r)
 {
 	cp();
 
@@ -241,24 +262,3 @@
 		logger(DEBUG_SCARY_THINGS, LOG_DEBUG, _("Aging past requests: deleted %d, left %d\n"),
 			   deleted, left);
 }
-
-/* Jumptable for the request handlers */
-
-int (*request_handlers[])(connection_t *) = {
-		id_h, metakey_h, challenge_h, chal_reply_h, ack_h,
-		status_h, error_h, termreq_h,
-		ping_h, pong_h,
-		add_subnet_h, del_subnet_h,
-		add_edge_h, del_edge_h,
-		key_changed_h, req_key_h, ans_key_h, tcppacket_h,
-};
-
-/* Request names */
-
-char (*request_name[]) = {
-		"ID", "METAKEY", "CHALLENGE", "CHAL_REPLY", "ACK",
-		"STATUS", "ERROR", "TERMREQ",
-		"PING", "PONG",
-		"ADD_SUBNET", "DEL_SUBNET",
-		"ADD_EDGE", "DEL_EDGE", "KEY_CHANGED", "REQ_KEY", "ANS_KEY", "PACKET",
-};

Index: protocol.h
===================================================================
RCS file: /home/CVS/tinc/src/protocol.h,v
retrieving revision 1.5.4.37
retrieving revision 1.5.4.38
diff -u -r1.5.4.37 -r1.5.4.38
--- protocol.h	2002/09/09 22:41:56	1.5.4.37
+++ protocol.h	2003/07/06 23:16:28	1.5.4.38
@@ -93,8 +93,6 @@
 
 /* Request handlers  */
 
-extern int (*request_handlers[])(connection_t *);
-
 extern int id_h(connection_t *);
 extern int metakey_h(connection_t *);
 extern int challenge_h(connection_t *);

Index: protocol_auth.c
===================================================================
RCS file: /home/CVS/tinc/src/protocol_auth.c,v
retrieving revision 1.1.4.21
retrieving revision 1.1.4.22
diff -u -r1.1.4.21 -r1.1.4.22
--- protocol_auth.c	2003/07/06 22:11:32	1.1.4.21
+++ protocol_auth.c	2003/07/06 23:16:29	1.1.4.22
@@ -481,7 +481,7 @@
 	return x;
 }
 
-void send_everything(connection_t *c)
+static void send_everything(connection_t *c)
 {
 	avl_node_t *node, *node2;
 	node_t *n;

Index: protocol_misc.c
===================================================================
RCS file: /home/CVS/tinc/src/protocol_misc.c,v
retrieving revision 1.1.4.8
retrieving revision 1.1.4.9
diff -u -r1.1.4.8 -r1.1.4.9
--- protocol_misc.c	2003/07/06 22:11:33	1.1.4.8
+++ protocol_misc.c	2003/07/06 23:16:29	1.1.4.9
@@ -40,6 +40,18 @@
 
 #include "system.h"
 
+/* Status strings */
+
+static char (*status_text[]) = {
+	"Warning",
+};
+
+/* Error strings */
+
+static char (*error_text[]) = {
+	"Error",
+};
+
 /* Status and error notification routines */
 
 int send_status(connection_t *c, int statusno, char *statusstring)
@@ -192,15 +204,3 @@
 
 	return 0;
 }
-
-/* Status strings */
-
-char (*status_text[]) = {
-	"Warning",
-};
-
-/* Error strings */
-
-char (*error_text[]) = {
-	"Error",
-};

Index: route.c
===================================================================
RCS file: /home/CVS/tinc/src/route.c,v
retrieving revision 1.1.2.54
retrieving revision 1.1.2.55
diff -u -r1.1.2.54 -r1.1.2.55
--- route.c	2003/07/06 22:11:33	1.1.2.54
+++ route.c	2003/07/06 23:16:29	1.1.2.55
@@ -84,11 +84,11 @@
 int priorityinheritance = 0;
 int macexpire = 600;
 int overwrite_mac = 0;
-mac_t mymac = {{0xFE, 0xFD, 0, 0, 0, 0}};
+static mac_t mymac = {{0xFE, 0xFD, 0, 0, 0, 0}};
 
 /* RFC 1071 */
 
-uint16_t inet_checksum(void *data, int len, uint16_t prevsum)
+static uint16_t inet_checksum(void *data, int len, uint16_t prevsum)
 {
 	uint16_t *p = data;
 	uint32_t checksum = prevsum ^ 0xFFFF;
@@ -107,7 +107,7 @@
 	return ~checksum;
 }
 
-int ratelimit(void) {
+static int ratelimit(void) {
 	static time_t lasttime = 0;
 	
 	if(lasttime == now)
@@ -117,7 +117,7 @@
 	return 0;
 }
 	
-void learn_mac(mac_t *address)
+static void learn_mac(mac_t *address)
 {
 	subnet_t *subnet;
 	avl_node_t *node;
@@ -179,7 +179,7 @@
 	}
 }
 
-node_t *route_mac(vpn_packet_t *packet)
+static node_t *route_mac(vpn_packet_t *packet)
 {
 	subnet_t *subnet;
 
@@ -201,7 +201,7 @@
 
 /* RFC 792 */
 
-void route_ipv4_unreachable(vpn_packet_t *packet, uint8_t code)
+static void route_ipv4_unreachable(vpn_packet_t *packet, uint8_t code)
 {
 	struct ip *hdr;
 	struct icmp *icmp;
@@ -260,7 +260,7 @@
 	write_packet(packet);
 }
 
-node_t *route_ipv4(vpn_packet_t *packet)
+static node_t *route_ipv4(vpn_packet_t *packet)
 {
 	subnet_t *subnet;
 
@@ -290,7 +290,7 @@
 
 /* RFC 2463 */
 
-void route_ipv6_unreachable(vpn_packet_t *packet, uint8_t code)
+static void route_ipv6_unreachable(vpn_packet_t *packet, uint8_t code)
 {
 	struct ip6_hdr *hdr;
 	struct icmp6_hdr *icmp;
@@ -358,7 +358,7 @@
 
 #endif
 
-node_t *route_ipv6(vpn_packet_t *packet)
+static node_t *route_ipv6(vpn_packet_t *packet)
 {
 	subnet_t *subnet;
 
@@ -395,7 +395,7 @@
 
 /* RFC 2461 */
 
-void route_neighborsol(vpn_packet_t *packet)
+static void route_neighborsol(vpn_packet_t *packet)
 {
 	struct ip6_hdr *hdr;
 	struct nd_neighbor_solicit *ns;
@@ -508,7 +508,7 @@
 
 /* RFC 826 */
 
-void route_arp(vpn_packet_t *packet)
+static void route_arp(vpn_packet_t *packet)
 {
 	struct ether_arp *arp;
 	subnet_t *subnet;

Index: subnet.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/subnet.c,v
retrieving revision 1.1.2.44
retrieving revision 1.1.2.45
diff -u -r1.1.2.44 -r1.1.2.45
--- subnet.c	2003/07/06 22:11:33	1.1.2.44
+++ subnet.c	2003/07/06 23:16:29	1.1.2.45
@@ -48,7 +48,7 @@
 
 /* Subnet comparison */
 
-int subnet_compare_mac(subnet_t *a, subnet_t *b)
+static int subnet_compare_mac(subnet_t *a, subnet_t *b)
 {
 	int result;
 
@@ -60,7 +60,7 @@
 	return strcmp(a->owner->name, b->owner->name);
 }
 
-int subnet_compare_ipv4(subnet_t *a, subnet_t *b)
+static int subnet_compare_ipv4(subnet_t *a, subnet_t *b)
 {
 	int result;
 
@@ -77,7 +77,7 @@
 	return strcmp(a->owner->name, b->owner->name);
 }
 
-int subnet_compare_ipv6(subnet_t *a, subnet_t *b)
+static int subnet_compare_ipv6(subnet_t *a, subnet_t *b)
 {
 	int result;
 
@@ -94,7 +94,7 @@
 	return strcmp(a->owner->name, b->owner->name);
 }
 
-int subnet_compare(subnet_t *a, subnet_t *b)
+static int subnet_compare(subnet_t *a, subnet_t *b)
 {
 	int result;
 

Index: subnet.h
===================================================================
RCS file: /home/CVS/tinc/src/Attic/subnet.h,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -u -r1.1.2.20 -r1.1.2.21
--- subnet.h	2002/09/09 21:25:16	1.1.2.20
+++ subnet.h	2003/07/06 23:16:29	1.1.2.21
@@ -64,11 +64,11 @@
 	} net;
 } subnet_t;
 
-extern subnet_t *new_subnet(void);
+extern subnet_t *new_subnet(void) __attribute__ ((malloc));
 extern void free_subnet(subnet_t *);
 extern void init_subnets(void);
 extern void exit_subnets(void);
-extern avl_tree_t *new_subnet_tree(void);
+extern avl_tree_t *new_subnet_tree(void) __attribute__ ((malloc));
 extern void free_subnet_tree(avl_tree_t *);
 extern void subnet_add(struct node_t *, subnet_t *);
 extern void subnet_del(struct node_t *, subnet_t *);

Index: tincd.c
===================================================================
RCS file: /home/CVS/tinc/src/tincd.c,v
retrieving revision 1.10.4.70
retrieving revision 1.10.4.71
diff -u -r1.10.4.70 -r1.10.4.71
--- tincd.c	2003/07/06 22:11:33	1.10.4.70
+++ tincd.c	2003/07/06 23:16:29	1.10.4.71
@@ -133,7 +133,7 @@
 	exit(status);
 }
 
-void parse_options(int argc, char **argv, char **envp)
+static void parse_options(int argc, char **argv, char **envp)
 {
 	int r;
 	int option_index = 0;
@@ -230,7 +230,7 @@
 
 /* This function prettyprints the key generation process */
 
-void indicator(int a, int b, void *p)
+static void indicator(int a, int b, void *p)
 {
 	switch (a) {
 		case 0:
@@ -269,7 +269,7 @@
   Generate a public/private RSA keypair, and ask for a file to store
   them in.
 */
-int keygen(int bits)
+static int keygen(int bits)
 {
 	RSA *rsa_key;
 	FILE *f;
@@ -323,7 +323,7 @@
 /*
   Set all files and paths according to netname
 */
-void make_names(void)
+static void make_names(void)
 {
 	if(netname) {
 		if(!pidfilename)

--
Tinc-cvs:     CVS changelog list for the tinc VPN daemon
Archive:      http://mail.nl.linux.org/tinc-cvs/
Tinc site:    http://tinc.nl.linux.org/