mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-12 04:47:41 +02:00
- Fix #545: improved logging, the ip address of the error is printed
on the same log-line as the error. git-svn-id: file:///svn/unbound/trunk@3112 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -156,6 +156,16 @@ void log_addr(enum verbosity_value v, const char* str,
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user