/* * LOKI * * client_db header file * * 1996/7 Guild Corporation Productions [daemon9] */ /* * Client info list. * MAX_CLIENT of these will be kept in a server-side array */ struct client_list { uint16_t client_id; /* client loki_id */ uint32_t client_ip; /* client IP address */ time_t touchtime; /* last time entry was hit */ uint32_t packets_sent; /* Packets sent to this client */ uint32_t bytes_sent; /* Bytes sent to this client */ unsigned int hits; /* Number of queries from client */ }; #define IS_GOOD_CLIENT(ldg)\ \ (c_id == client[i].client_id && \ ldg.iph.ip_src == client[i].client_ip) > \ (0) ? (1) : (0) \ void update_client(int, int, uint32_t); /* Update a client entry */ /* client info into supplied buffer */ int stat_client(int, uint8_t *, int, time_t); int add_client(uint8_t *); /* add a client entry */ int locate_client(int); /* find a client entry */ void age_client(void); /* age a client from the list */ uint16_t update_client_salt(int); /* update and return salt */ uint32_t check_client_ip(int, uint16_t *); /* return ip and id of target */