-extern void main_loop(void);
-extern void terminate_connection(connection_t *, int);
-extern void flush_queue(struct node_t *);
-extern int read_rsa_public_key(struct connection_t *);
+extern int main_loop(void);
+extern void terminate_connection(struct connection_t *, bool);
+extern bool node_read_ecdsa_public_key(struct node_t *);
+extern bool read_ecdsa_public_key(struct connection_t *);
+extern bool read_rsa_public_key(struct connection_t *);
+extern void send_mtu_probe(struct node_t *);
+extern void handle_device_data(int, short, void *);
+extern void handle_meta_connection_data(int, short, void *);
+extern void regenerate_key(void);
+extern void purge(void);
+extern void retry(void);
+extern int reload_configuration(void);
+extern void load_all_subnets(void);
+extern void load_all_nodes(void);
+
+#ifndef HAVE_MINGW
+#define closesocket(s) close(s)
+#else
+extern CRITICAL_SECTION mutex;
+#endif