]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/network/netconfig.h
Remove global variables; replace by stack passing.
[citadel.git] / citadel / modules / network / netconfig.h
index 0c959fd3f49b5db563dd553d52984016321e96c0..37e1e0c3e874bb8f48d370c72b5ea9242a99ea70 100644 (file)
@@ -1,11 +1,13 @@
+typedef struct NetMap NetMap;
 
-NetMap *the_netmap;
-int netmap_changed;
-char *working_ignetcfg;
+struct  NetMap {
+       NetMap *next;
+       char nodename[SIZ];
+       time_t lastcontact;
+       char nexthop[SIZ];
+};
 
-void load_working_ignetcfg(void);
-void read_network_map(void);
-FilterList *load_filter_list(void);
-void write_network_map(void);
-void free_filter_list(FilterList *fl);
-int is_valid_node(char *nexthop, char *secret, char *node);
+char* load_working_ignetcfg(void);
+NetMap *read_network_map(void);
+void write_network_map(NetMap *the_netmap, int netmap_changed);
+int is_valid_node(char *nexthop, char *secret, char *node, char *working_ignetcfg, NetMap *the_netmap);