diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-11-11 09:15:36 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-11-11 09:15:36 +0000 |
commit | 008162fc5772b17eb55b51289fe9ae44b5c5d62d (patch) | |
tree | 0558cf0b1dc36620d0fb8330346d37996f81f6b5 /sys/nfs/krpc_subr.c | |
parent | 4f2cab250b870ec4d2b3c1ddff37aa6feb1967bb (diff) |
Replace most of our formating functions to convert IPv4/6 addresses from
network to presentation format to inet_ntop().
The few remaining functions will be soon converted.
ok mikeb@, deraadt@ and moral support from henning@
Diffstat (limited to 'sys/nfs/krpc_subr.c')
-rw-r--r-- | sys/nfs/krpc_subr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c index fcc02581c5f..31714070965 100644 --- a/sys/nfs/krpc_subr.c +++ b/sys/nfs/krpc_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: krpc_subr.c,v 1.21 2013/08/27 03:32:12 deraadt Exp $ */ +/* $OpenBSD: krpc_subr.c,v 1.22 2013/11/11 09:15:35 mpi Exp $ */ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ /* @@ -215,6 +215,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, struct uio auio; int error, rcvflg, timo, secs, len; static u_int32_t xid = 0; + char addr[INET_ADDRSTRLEN]; int *ip; struct timeval tv; @@ -356,7 +357,8 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, timo++; else printf("RPC timeout for server %s (0x%x) prog %u\n", - inet_ntoa(sin->sin_addr), + inet_ntop(AF_INET, &sin->sin_addr, + addr, sizeof(addr)), ntohl(sin->sin_addr.s_addr), prog); /* |