1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-17 13:09:02 +00:00

Add get_localaddr_string.

This commit is contained in:
david
2013-04-27 16:22:07 +00:00
parent d6d2a832db
commit 21077a93e1
2 changed files with 8 additions and 0 deletions

View File

@@ -188,3 +188,8 @@ static char *get_addr_string(const struct sockaddr_storage *ss, size_t sslen) {
char *get_peeraddr_string(const msiod *iod) { char *get_peeraddr_string(const msiod *iod) {
return get_addr_string(&iod->peer, iod->peerlen); return get_addr_string(&iod->peer, iod->peerlen);
} }
/* Get the local bind address string. */
char *get_localaddr_string(const msiod *iod) {
return get_addr_string(&iod->local, iod->locallen);
}

View File

@@ -94,5 +94,8 @@ const char *get_unixsock_path(const struct sockaddr_storage *addr);
* "<address>:<port>". */ * "<address>:<port>". */
char *get_peeraddr_string(const msiod *iod); char *get_peeraddr_string(const msiod *iod);
/* Get the local bind address string. */
char *get_localaddr_string(const msiod *iod);
#endif /* NETUTILS_H */ #endif /* NETUTILS_H */