1
This commit is contained in:
1 parent
1a171d5a24
commit
8bad15b7bb
7 files changed
+91
-19
No files matched your search
+2
-1
@@ -111,10 +111,11 @@ void debug_enable_console(int enable);
|
||||
|
||||
// IP address to string (static buffer, single-threaded)
|
||||
typedef struct {
|
||||
char str[48]; // INET6_ADDRSTRLEN(45) + \0
|
||||
char str[54]; // INET6_ADDRSTRLEN(45) + 6chars (:port) + \0
|
||||
} ip_str_t;
|
||||
|
||||
ip_str_t ip_to_str(const void *addr, int family);// big endian addr
|
||||
ip_str_t sockaddr_storage_to_str(const struct sockaddr_storage *addr);// автоопределение v4 или v6
|
||||
|
||||
// hex dump в лог
|
||||
void log_dump(const char* prefix, const uint8_t* data, size_t len);
|
||||
|
||||
Reference in new issue
Block a user