From d6ea66438d89c7708a10e464013491655f5361b0 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 14 Jan 2010 12:23:23 -0500 Subject: statd: add nsm_present_address() API Add an API to convert a socket address to a presentation address string. This is used for displaying error messages and the like. We prefer getnameinfo(3) over inet_?to?(3) as it supports IPv6 scope IDs. Since statd has to continue to build correctly on systems whose glibc does not have getnameinfo(3), an inet_?to?(3) version is also provided. Signed-off-by: Chuck Lever --- utils/statd/statd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/statd/statd.h') diff --git a/utils/statd/statd.h b/utils/statd/statd.h index fd6a084..c2d5956 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -23,6 +23,8 @@ * Function prototypes. */ extern _Bool statd_matchhostname(const char *hostname1, const char *hostname2); +extern _Bool statd_present_address(const struct sockaddr *sap, char *buf, + const size_t buflen); extern void my_svc_run(void); extern void notify_hosts(void); -- cgit