diff options
Diffstat (limited to 'util/net_help.h')
-rw-r--r-- | util/net_help.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/net_help.h b/util/net_help.h index b92dd40e85d9..54f4c9c0e7cd 100644 --- a/util/net_help.h +++ b/util/net_help.h @@ -157,6 +157,16 @@ void log_name_addr(enum verbosity_value v, const char* str, uint8_t* zone, struct sockaddr_storage* addr, socklen_t addrlen); /** + * Log errno and addr. + * @param str: descriptive string printed with it. + * @param err: errno string to print, i.e. strerror(errno). + * @param addr: the sockaddr to print. Can be ip4 or ip6. + * @param addrlen: length of addr. + */ +void log_err_addr(const char* str, const char* err, + struct sockaddr_storage* addr, socklen_t addrlen); + +/** * Convert address string, with "@port" appendix, to sockaddr. * Uses DNS port by default. * @param str: the string |