summary refs log tree commit diff
path: root/resolv/res_send.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-19 07:55:27 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-19 07:56:21 +0200
commit17d0407a5cac70652f3544e59505c1712b36fd1a (patch)
tree8fb380267716dd07e56f4419bc67a8398e9d3dc4 /resolv/res_send.c
parent9515126f905d9322fc6d2b1a3d95539a0a499f48 (diff)
downloadglibc-17d0407a5cac70652f3544e59505c1712b36fd1a.tar.gz
glibc-17d0407a5cac70652f3544e59505c1712b36fd1a.tar.xz
glibc-17d0407a5cac70652f3544e59505c1712b36fd1a.zip
resolv: Move res_isourserver to its own file and reformat to GNU style
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r--resolv/res_send.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 78f564ee85..915fc6d2c6 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -194,57 +194,6 @@ static int		sock_eq(struct sockaddr_in6 *, struct sockaddr_in6 *);
 /* Public. */
 
 /* int
- * res_isourserver(ina)
- *	looks up "ina" in _res.ns_addr_list[]
- * returns:
- *	0  : not found
- *	>0 : found
- * author:
- *	paul vixie, 29may94
- */
-int
-res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp)
-{
-	int ns;
-
-	if (inp->sin6_family == AF_INET) {
-	    struct sockaddr_in *in4p = (struct sockaddr_in *) inp;
-	    in_port_t port = in4p->sin_port;
-	    in_addr_t addr = in4p->sin_addr.s_addr;
-
-	    for (ns = 0;  ns < statp->nscount;  ns++) {
-		const struct sockaddr_in *srv =
-		    (struct sockaddr_in *) __res_get_nsaddr (statp, ns);
-
-		if ((srv->sin_family == AF_INET) &&
-		    (srv->sin_port == port) &&
-		    (srv->sin_addr.s_addr == INADDR_ANY ||
-		     srv->sin_addr.s_addr == addr))
-		    return (1);
-	    }
-	} else if (inp->sin6_family == AF_INET6) {
-	    for (ns = 0;  ns < statp->nscount;  ns++) {
-		const struct sockaddr_in6 *srv
-		  = (struct sockaddr_in6 *) __res_get_nsaddr (statp, ns);
-		if ((srv->sin6_family == AF_INET6) &&
-		    (srv->sin6_port == inp->sin6_port) &&
-		    !(memcmp(&srv->sin6_addr, &in6addr_any,
-			     sizeof (struct in6_addr)) &&
-		      memcmp(&srv->sin6_addr, &inp->sin6_addr,
-			     sizeof (struct in6_addr))))
-		    return (1);
-	    }
-	}
-	return (0);
-}
-
-int
-res_isourserver (const struct sockaddr_in *inp)
-{
-  return res_ourserver_p (&_res, (const struct sockaddr_in6 *) inp);
-}
-
-/* int
  * res_nameinquery(name, type, class, buf, eom)
  *	look for (name,type,class) in the query section of packet (buf,eom)
  * requires: