Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jan 2016 00:36:20 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r293024 - stable/9/lib/libc/net
Message-ID:  <201601010036.u010aKNp012222@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Fri Jan  1 00:36:20 2016
New Revision: 293024
URL: https://svnweb.freebsd.org/changeset/base/293024

Log:
  MFC r292719:
    Remove _gethostbynisname() and _gethostbynisaddr().  These functions
    used to be called from getipnodebyname().

Modified:
  stable/9/lib/libc/net/gethostbynis.c
  stable/9/lib/libc/net/netdb_private.h
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/net/gethostbynis.c
==============================================================================
--- stable/9/lib/libc/net/gethostbynis.c	Fri Jan  1 00:35:06 2016	(r293023)
+++ stable/9/lib/libc/net/gethostbynis.c	Fri Jan  1 00:36:20 2016	(r293024)
@@ -198,61 +198,6 @@ _gethostbynisaddr_r(const void *addr, so
 }
 #endif /* YP */
 
-/* XXX _gethostbynisname/_gethostbynisaddr only used by getipnodeby*() */
-struct hostent *
-_gethostbynisname(const char *name, int af)
-{
-#ifdef YP
-	struct hostent *he;
-	struct hostent_data *hed;
-	u_long oresopt;
-	int error;
-	res_state statp;
-
-	statp = __res_state();
-	if ((he = __hostent_init()) == NULL ||
-	    (hed = __hostent_data_init()) == NULL) {
-		RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
-		return (NULL);
-	}
-
-	oresopt = statp->options;
-	statp->options &= ~RES_USE_INET6;
-	error = _gethostbynisname_r(name, af, he, hed);
-	statp->options = oresopt;
-	return (error == 0) ? he : NULL;
-#else
-	return (NULL);
-#endif
-}
-
-struct hostent *
-_gethostbynisaddr(const void *addr, socklen_t len, int af)
-{
-#ifdef YP
-	struct hostent *he;
-	struct hostent_data *hed;
-	u_long oresopt;
-	int error;
-	res_state statp;
-
-	statp = __res_state();
-	if ((he = __hostent_init()) == NULL ||
-	    (hed = __hostent_data_init()) == NULL) {
-		RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
-		return (NULL);
-	}
-
-	oresopt = statp->options;
-	statp->options &= ~RES_USE_INET6;
-	error = _gethostbynisaddr_r(addr, len, af, he, hed);
-	statp->options = oresopt;
-	return (error == 0) ? he : NULL;
-#else
-	return (NULL);
-#endif
-}
-
 int
 _nis_gethostbyname(void *rval, void *cb_data, va_list ap)
 {

Modified: stable/9/lib/libc/net/netdb_private.h
==============================================================================
--- stable/9/lib/libc/net/netdb_private.h	Fri Jan  1 00:35:06 2016	(r293023)
+++ stable/9/lib/libc/net/netdb_private.h	Fri Jan  1 00:36:20 2016	(r293024)
@@ -133,8 +133,6 @@ void _endhostdnsent(void);
 void _endhosthtent(struct hostent_data *);
 void _endnetdnsent(void);
 void _endnethtent(struct netent_data *);
-struct hostent *_gethostbynisaddr(const void *, socklen_t, int);
-struct hostent *_gethostbynisname(const char *, int);
 void _map_v4v6_address(const char *, char *);
 void _map_v4v6_hostent(struct hostent *, char **, char *);
 void _sethostdnsent(int);



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