refactor
This commit is contained in:
1 parent
b27ea97055
commit
9d0223d3fa
19 files changed
+87
-1496
No files matched your search
+6
-2
@@ -99,8 +99,12 @@ void debug_enable_file_output(const char* file_path, int truncate);
|
||||
void debug_disable_file_output(void);
|
||||
void debug_enable_console(int enable);
|
||||
|
||||
// вывод struct sockaddr_storage как текст
|
||||
size_t addr_to_string(const struct sockaddr_storage *addr, char *buf, size_t buflen);
|
||||
// IP address to string (static buffer, single-threaded)
|
||||
typedef struct {
|
||||
char str[48]; // INET6_ADDRSTRLEN(45) + \0
|
||||
} ip_str_t;
|
||||
|
||||
ip_str_t ip_to_str(const void *addr, int family);
|
||||
|
||||
// hex dump в лог
|
||||
void log_dump(const char* prefix, const uint8_t* data, size_t len);
|
||||
|
||||
Reference in new issue
Block a user