11#define TIMESTAMP_LENGTH 20
12#define BUFFER_SIZE 8096
16char*
strndup(
const char* src,
size_t size);
17char*
strtok(
char* str,
const char* delimiters);
20void usleep(
unsigned int usec);
25FILE*
popen(
const char* command,
const char* type);
75void log_to_file(
const char* filename,
const char* format, ...);
83uint64_t
ntohll(uint64_t value);
uint64_t ntohll(uint64_t value)
Convert a 64-bit integer from host byte order to network byte order.
struct tm * localtime_r(const time_t *timer, struct tm *buf)
void log_to_file(const char *filename, const char *format,...)
Log to file function.
FILE * popen(const char *command, const char *type)
int fileno(FILE *__stream)
void get_formatted_timestamp(char *buffer, size_t buffer_size)
Get the formatted timestamp.
void flockfile(FILE *filehandle)
char * strdup(const char *str1)
size_t read_var_int(const unsigned char *data, uint64_t *value)
Convert a 64-bit integer from network byte order to host byte order.
void clear_cli()
Clear the CLI window.
int is_valid_ipv4(const char *ip_str)
Check if the IP address is valid.
void get_timestamp(char *buffer, size_t buffer_size)
Get the timestamp.
void funlockfile(FILE *file)
void guarded_print_line(const char *format,...)
Guarded print line function.
void usleep(unsigned int usec)
char * strndup(const char *src, size_t size)
void guarded_print(const char *format,...)
Guarded print function.
int init_config_dir()
Initialize the configuration directory.
char * strtok(char *str, const char *delimiters)