adjust naming convention and initial config support
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user