initial hashmap code

This commit is contained in:
2024-11-09 19:58:58 +01:00
parent 2f39ca6fc1
commit 51a309e55f
16 changed files with 172 additions and 87 deletions

16
include/hashmap.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef __HASHMAP_C__
#define __HASHMAP_C__
#include <sys/socket.h>
#define HASHMAP_MAX_ITEMS 10000
struct hashmap {
int sockfd;
struct sockaddr_storage sas;
};
int hash(int sockfd);
void hm_insert(struct hashmap *map, int sockfd, struct sockaddr_storage *sas);
#endif