* 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
1.1.0:
----
- o server stuff yes/no
o sorting/sorting ord - removed ord - need to check current sort
order
o secure tracing drill
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
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)
{
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)