summaryrefslogtreecommitdiff
path: root/lib/networking
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-05-09 13:45:44 +0200
committerHiFiPhile <[email protected]>2024-05-09 13:45:44 +0200
commitfd1cde9b894e5312e6c6f9da63cfea5aa05d83d2 (patch)
tree5f43ffeecb05d80788cbe0bbc43913202a922a2a /lib/networking
parentd0bff6fd3ec9fc133032dea84732451d93d202b4 (diff)
parent74e57499baac36c4cccf76549259905162031e41 (diff)
Merge branch 'master' into pr/2181
Diffstat (limited to 'lib/networking')
-rw-r--r--lib/networking/dhserver.h6
-rw-r--r--lib/networking/dnserver.c2
-rw-r--r--lib/networking/dnserver.h6
3 files changed, 13 insertions, 1 deletions
diff --git a/lib/networking/dhserver.h b/lib/networking/dhserver.h
index b3642459a..b0d57ac4e 100644
--- a/lib/networking/dhserver.h
+++ b/lib/networking/dhserver.h
@@ -56,7 +56,13 @@ typedef struct dhcp_config
dhcp_entry_t *entries;
} dhcp_config_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
err_t dhserv_init(const dhcp_config_t *config);
void dhserv_free(void);
+#ifdef __cplusplus
+}
+#endif
#endif /* DHSERVER_H */
diff --git a/lib/networking/dnserver.c b/lib/networking/dnserver.c
index 6d15fee02..25bbf4875 100644
--- a/lib/networking/dnserver.c
+++ b/lib/networking/dnserver.c
@@ -192,7 +192,7 @@ err_t dnserv_init(const ip_addr_t *bind, uint16_t port, dns_query_proc_t qp)
return ERR_OK;
}
-void dnserv_free()
+void dnserv_free(void)
{
if (pcb == NULL) return;
udp_remove(pcb);
diff --git a/lib/networking/dnserver.h b/lib/networking/dnserver.h
index 50b29be89..a7a7f9acb 100644
--- a/lib/networking/dnserver.h
+++ b/lib/networking/dnserver.h
@@ -41,7 +41,13 @@
typedef bool (*dns_query_proc_t)(const char *name, ip4_addr_t *addr);
+#ifdef __cplusplus
+extern "C" {
+#endif
err_t dnserv_init(const ip_addr_t *bind, uint16_t port, dns_query_proc_t query_proc);
void dnserv_free(void);
+#ifdef __cplusplus
+}
+#endif
#endif