-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 handle_device_data(void *, int);
+extern void handle_meta_connection_data(struct connection_t *);
+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);
+extern void try_tx(struct node_t *n, bool);
+
+#ifndef HAVE_MINGW
+#define closesocket(s) close(s)
+#endif