]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
removed ldns_udp_server_connect()
authorMiek Gieben <miekg@NLnetLabs.nl>
Thu, 26 Jan 2006 13:02:31 +0000 (13:02 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Thu, 26 Jan 2006 13:02:31 +0000 (13:02 +0000)
Changelog
TODO
ldns/net.h
net.c

index c4bdae7d44afe6e17ae38a8e4ee7acd191a27281..f237368d99a8ed861bde9aa7c55c2a58b24b9f75 100644 (file)
--- a/Changelog
+++ b/Changelog
        * ldns_zone_sort: Sort a zone
        * ldns_bgsend(): background send, returns a socket.
        Removed:
-       * ldns_resolver_bgsend(): was not used in 1.0.0.
+       * ldns_resolver_bgsend(): was not used in 1.0.0 and is not used
+         now
+       * ldns_udp_server_connect(): was faulty and isn't really part of
+         the core ldns idea any how.
 
 
 18 Oct 2005: 1.0.0: ldns-team
diff --git a/TODO b/TODO
index 5b08dfe201ebd324cdc5a3e9fd842fc93ac9264c..eb536ec5f3162948981c5e4082c82741d55e3f50 100644 (file)
--- a/TODO
+++ b/TODO
@@ -23,7 +23,6 @@ Post 1.0 Stuff:
 
 1.1.0:
 ----
-        o server stuff yes/no
         o sorting/sorting ord - removed ord - need to check current sort
           order
         o secure tracing drill
index 0b1007ebf526f3115d2138c2d0149a95557a2abf..de35bb1f39a9a8462d83ba768bbfe957d6a02f0b 100644 (file)
@@ -101,16 +101,7 @@ int ldns_tcp_connect(const struct sockaddr_storage *to, socklen_t tolen, struct
 int ldns_udp_connect(const struct sockaddr_storage *to, struct timeval timeout);
 
 /**
- * Create a udp socket to the specified address and bind it too (making it
- * a server socket)
- * \param[in] to ip and family
- * \param[in] timeout timeout for the socket
- * \return a socket descriptor
- */
-int ldns_udp_server_connect(const struct sockaddr_storage *to, struct timeval timeout);
-
-/**
- * send a query via tcp to a server. Don;t want for the answer
+ * send a query via tcp to a server. Don't want for the answer
  *
  * \param[in] qbin the buffer to send
  * \param[in] sockfd the socket to use
diff --git a/net.c b/net.c
index 53f9c88696c482f9eeaf92c295913172d28a2c17..50b4a47fb1417aef6b3a154208e8486f9a2895ad 100644 (file)
--- a/net.c
+++ b/net.c
@@ -238,33 +238,6 @@ ldns_udp_bgsend(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t
        return sockfd;
 }
 
-/* 
- * ldns_tcp_server_connect
- */
-int
-ldns_udp_server_connect(const struct sockaddr_storage *to, struct timeval timeout)
-{
-       int sockfd;
-       
-       if ((sockfd = socket((int)((struct sockaddr*)to)->sa_family, SOCK_DGRAM, IPPROTO_UDP)) 
-                       == -1) {
-                return 0;
-        }
-       if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout,
-                               (socklen_t) sizeof(timeout))) {
-               perror("setsockopt");
-               close(sockfd);
-               return 0;
-        }
-
-       if (bind(sockfd, (struct sockaddr*)to, (socklen_t)sizeof(*to)) == -1) {
-               perror("bind");
-               close(sockfd);
-               return 0;
-       }
-       return sockfd;
-}
-
 int
 ldns_udp_connect(const struct sockaddr_storage *to, struct timeval timeout)
 {
@@ -502,10 +475,6 @@ ldns_tcp_bgsend(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t
        return sockfd;
 }
 
-/* Move other function that use sockaddr to here, so that 
- * all networking code is contained in one file
- */
-
 /* code from rdata.c */
 struct sockaddr_storage *
 ldns_rdf2native_sockaddr_storage(const ldns_rdf *rd, uint16_t port, size_t *size)