- 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:
Wouter Wijngaards
2014-04-10 14:40:20 +00:00
parent eb5e9a89c4
commit c19f818c52
7 changed files with 79 additions and 49 deletions
+10
View File
@@ -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.