Add client_ctx_t

This commit is contained in:
2022-12-10 22:33:30 +01:00
parent 9ac67dbfd3
commit bfa9cf4fcd
7 changed files with 66 additions and 68 deletions

View File

@ -11,9 +11,20 @@
#include "lib/config.h"
#include "lib/sock.h"
#include "lib/geoip.h"
#include <arpa/inet.h>
typedef struct {
char *addr;
char *s_addr;
char cc[3];
char host[256];
char geoip[GEOIP_MAX_SIZE + 1];
char _c_addr[INET6_ADDRSTRLEN + 1];
char _s_addr[INET6_ADDRSTRLEN + 1];
} client_ctx_t;
host_config *get_host_config(const char *host);
int client_handler(sock *client, unsigned long client_num, struct sockaddr_in6 *client_addr);