Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2010 13:34:55 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r214339 - in stable/8/sys: conf modules/krpc netinet nlm rpc
Message-ID:  <201010251334.o9PDYtK0066681@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Mon Oct 25 13:34:55 2010
New Revision: 214339
URL: http://svn.freebsd.org/changeset/base/214339

Log:
  MFC r213103:
  Make the RPC specific __rpc_inet_ntop() and __rpc_inet_pton() general
  in the kernel.
  
  Sponsored by: Sandvine Incorporated

Deleted:
  stable/8/sys/rpc/inet_ntop.c
  stable/8/sys/rpc/inet_pton.c
Modified:
  stable/8/sys/conf/files
  stable/8/sys/modules/krpc/Makefile
  stable/8/sys/netinet/in.h
  stable/8/sys/nlm/nlm_prot_impl.c
  stable/8/sys/rpc/rpc_com.h
  stable/8/sys/rpc/rpc_generic.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/conf/files	Mon Oct 25 13:34:55 2010	(r214339)
@@ -2283,6 +2283,8 @@ libkern/iconv_xlat16.c		optional libicon
 libkern/index.c			standard
 libkern/inet_aton.c		standard
 libkern/inet_ntoa.c		standard
+libkern/inet_ntop.c		standard
+libkern/inet_pton.c		standard
 libkern/mcount.c		optional profiling-routine
 libkern/memcmp.c		standard
 libkern/qsort.c			standard
@@ -2689,8 +2691,6 @@ rpc/clnt_dg.c			optional krpc | nfslockd
 rpc/clnt_rc.c			optional krpc | nfslockd | nfsclient | nfscl | nfsd
 rpc/clnt_vc.c			optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
 rpc/getnetconfig.c		optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
-rpc/inet_ntop.c			optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
-rpc/inet_pton.c			optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
 rpc/replay.c			optional krpc | nfslockd | nfsserver | nfscl | nfsd
 rpc/rpc_callmsg.c		optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
 rpc/rpc_generic.c		optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd

Modified: stable/8/sys/modules/krpc/Makefile
==============================================================================
--- stable/8/sys/modules/krpc/Makefile	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/modules/krpc/Makefile	Mon Oct 25 13:34:55 2010	(r214339)
@@ -9,8 +9,6 @@ SRCS=	auth_none.c \
 	clnt_rc.c \
 	clnt_vc.c \
 	getnetconfig.c \
-	inet_ntop.c \
-	inet_pton.c \
 	rpc_callmsg.c \
 	rpc_generic.c \
 	rpc_prot.c \

Modified: stable/8/sys/netinet/in.h
==============================================================================
--- stable/8/sys/netinet/in.h	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/netinet/in.h	Mon Oct 25 13:34:55 2010	(r214339)
@@ -744,6 +744,8 @@ int	 in_localip(struct in_addr);
 int	 inet_aton(const char *, struct in_addr *); /* in libkern */
 char	*inet_ntoa(struct in_addr); /* in libkern */
 char	*inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
+char	*inet_ntop(int, const void *, char *, socklen_t); /* in libkern */
+int	 inet_pton(int af, const char *, void *); /* in libkern */
 void	 in_ifdetach(struct ifnet *);
 
 #define	in_hosteq(s, t)	((s).s_addr == (t).s_addr)

Modified: stable/8/sys/nlm/nlm_prot_impl.c
==============================================================================
--- stable/8/sys/nlm/nlm_prot_impl.c	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/nlm/nlm_prot_impl.c	Mon Oct 25 13:34:55 2010	(r214339)
@@ -1003,13 +1003,13 @@ nlm_find_host_by_addr(const struct socka
 
 	switch (addr->sa_family) {
 	case AF_INET:
-		__rpc_inet_ntop(AF_INET,
+		inet_ntop(AF_INET,
 		    &((const struct sockaddr_in *) addr)->sin_addr,
 		    tmp, sizeof tmp);
 		break;
 #ifdef INET6
 	case AF_INET6:
-		__rpc_inet_ntop(AF_INET6,
+		inet_ntop(AF_INET6,
 		    &((const struct sockaddr_in6 *) addr)->sin6_addr,
 		    tmp, sizeof tmp);
 		break;

Modified: stable/8/sys/rpc/rpc_com.h
==============================================================================
--- stable/8/sys/rpc/rpc_com.h	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/rpc/rpc_com.h	Mon Oct 25 13:34:55 2010	(r214339)
@@ -111,10 +111,6 @@ extern struct netbuf *__rpc_uaddr2taddr_
 extern int __rpc_seman2socktype(int);
 extern int __rpc_socktype2seman(int);
 extern int __rpc_sockisbound(struct socket*);
-extern const char *__rpc_inet_ntop(int af, const void * __restrict src,
-    char * __restrict dst, socklen_t size);
-extern int __rpc_inet_pton(int af, const char * __restrict src,
-    void * __restrict dst);
 extern int bindresvport(struct socket *so, struct sockaddr *sa);
 
 struct xucred;

Modified: stable/8/sys/rpc/rpc_generic.c
==============================================================================
--- stable/8/sys/rpc/rpc_generic.c	Mon Oct 25 13:16:11 2010	(r214338)
+++ stable/8/sys/rpc/rpc_generic.c	Mon Oct 25 13:34:55 2010	(r214339)
@@ -306,7 +306,7 @@ __rpc_taddr2uaddr_af(int af, const struc
 	switch (af) {
 	case AF_INET:
 		sin = nbuf->buf;
-		if (__rpc_inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
+		if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
 		    == NULL)
 			return NULL;
 		port = ntohs(sin->sin_port);
@@ -318,7 +318,7 @@ __rpc_taddr2uaddr_af(int af, const struc
 #ifdef INET6
 	case AF_INET6:
 		sin6 = nbuf->buf;
-		if (__rpc_inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
+		if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
 		    == NULL)
 			return NULL;
 		port = ntohs(sin6->sin6_port);
@@ -396,7 +396,7 @@ __rpc_uaddr2taddr_af(int af, const char 
 		memset(sin, 0, sizeof *sin);
 		sin->sin_family = AF_INET;
 		sin->sin_port = htons(port);
-		if (__rpc_inet_pton(AF_INET, addrstr, &sin->sin_addr) <= 0) {
+		if (inet_pton(AF_INET, addrstr, &sin->sin_addr) <= 0) {
 			free(sin, M_RPC);
 			free(ret, M_RPC);
 			ret = NULL;
@@ -414,7 +414,7 @@ __rpc_uaddr2taddr_af(int af, const char 
 		memset(sin6, 0, sizeof *sin6);
 		sin6->sin6_family = AF_INET6;
 		sin6->sin6_port = htons(port);
-		if (__rpc_inet_pton(AF_INET6, addrstr, &sin6->sin6_addr) <= 0) {
+		if (inet_pton(AF_INET6, addrstr, &sin6->sin6_addr) <= 0) {
 			free(sin6, M_RPC);
 			free(ret, M_RPC);
 			ret = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010251334.o9PDYtK0066681>