diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-05-20 21:29:45 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-05-20 21:29:45 +0200 |
commit | d4c41cc1c9195d5843d3ff1519636f4519e33fa9 (patch) | |
tree | 93592ae872efb0878ad597ba2f55d97ac5e374c9 /src/server.h | |
parent | 57e6cf6b01e981ce159d472f3e3ed92f893ad443 (diff) | |
download | dns-d4c41cc1c9195d5843d3ff1519636f4519e33fa9.tar.gz |
reworked server logic, handles responses properly now
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server.h b/src/server.h index 1751fae..d4ecf49 100644 --- a/src/server.h +++ b/src/server.h @@ -20,6 +20,8 @@ #include <signal.h> +#include <sys/select.h> + #include "dns.h" #include "log.h" #include "database.h" @@ -37,13 +39,8 @@ static int sock_server; void server_start ( server_config_t* _config ); -int server_get_socket ( char* _bind_ip, uint16_t _bind_port ); +void server_handle_connection ( int _socket, database_t* _zone_db ); -int handle_connection ( int _socket, - struct sockaddr_in *sockaddr_client, - socklen_t sockaddr_client_len, - char* _buffer, - int _bufflen, - database_t* _zone_db ); +int server_get_socket ( char* _bind_ip, uint16_t _bind_port ); void signal_term ( ); |