aboutsummaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-02-28 23:23:54 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-02-28 23:23:54 +0100
commit233f169f507e31472b23a64269878557d6f0f9fe (patch)
tree666e3a2920a4936097f970c89819909e69ad5db6 /src/server.h
parent3cac8f89459317626d521904d85fcb8267671c78 (diff)
downloaddns-233f169f507e31472b23a64269878557d6f0f9fe.tar.gz
construct answer/question
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h
index 388dbae..d59eba6 100644
--- a/src/server.h
+++ b/src/server.h
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
+#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -24,9 +25,14 @@
#define UDP_BUFFER_LEN 512
+typedef struct server_config {
+ char* bind_ip;
+ uint16_t bind_port;
+} server_config_t;
+
static int sock_server;
-void run_dns_server ( void );
+void run_dns_server ( server_config_t* _config );
int handle_connection ( int _socket,
struct sockaddr_in *sockaddr_client,