adjust naming convention and initial config support

This commit is contained in:
2025-04-24 17:24:13 +02:00
parent b4f71b0c53
commit dd9e2f557b
19 changed files with 217 additions and 263 deletions

View File

@@ -1,8 +1,12 @@
#include "utils/utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/colors.h"
void print_ips(const char *hostname, const char *port) {
void cws_utils_print_ips(const char *hostname, const char *port) {
struct addrinfo ai;
struct addrinfo *res;
@@ -35,7 +39,7 @@ void print_ips(const char *hostname, const char *port) {
freeaddrinfo(res);
}
void get_client_ip(struct sockaddr_storage *sa, char *ip) {
void cws_utils_get_client_ip(struct sockaddr_storage *sa, char *ip) {
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
inet_ntop(AF_INET, &sin->sin_addr, ip, INET_ADDRSTRLEN);