1ldns(3)                    Library Functions Manual                    ldns(3)
2
3
4

NAME

6       ldns_tcp_send_query, ldns_tcp_read_wire, ldns_tcp_connect - tcp queries
7
8

SYNOPSIS

10       #include <stdint.h>
11       #include <stdbool.h>
12
13       #include <ldns/ldns.h>
14
15       ssize_t ldns_tcp_send_query(ldns_buffer *qbin, int sockfd, const struct
16       sockaddr_storage *to, socklen_t tolen);
17
18       uint8_t* ldns_tcp_read_wire(int sockfd, size_t *size);
19
20       int ldns_tcp_connect(const struct sockaddr_storage *to, socklen_t
21       tolen, struct timeval timeout);
22

DESCRIPTION

24       ldns_tcp_send_query() send a query via tcp to a server. Don't want for
25              the answer
26
27              qbin: the buffer to send
28              sockfd: the socket to use
29              to: which ip to send it
30              tolen: socketlen
31              Returns number of bytes sent
32
33       ldns_tcp_read_wire() This routine may block. Use
34              ldns_tcp_read_wire_timeout, it checks timeouts.  Gives back a
35              raw packet from the wire and reads the header data from the
36              given socket. Allocates the data (of size size) itself, so don't
37              forget to free
38
39              sockfd: the socket to read from
40              size: the number of bytes that are read
41              Returns the data read
42
43       ldns_tcp_connect() Create a tcp socket to the specified address
44              to: ip and family
45              tolen: length of to
46              timeout: timeout for the connect attempt
47              Returns a socket descriptor
48

AUTHOR

50       The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
51       Miek Gieben.
52
53

REPORTING BUGS

55       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
56       http://www.nlnetlabs.nl/bugs/index.html
57
58
60       Copyright (c) 2004 - 2006 NLnet Labs.
61
62       Licensed under the BSD License. There is NO warranty; not even for MER‐
63       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
64
65

SEE ALSO

67       ldns_send, ldns_pkt, ldns_resolver.  And perldoc Net::DNS, RFC1034,
68       RFC1035, RFC4033, RFC4034  and RFC4035.
69

REMARKS

71       This manpage was automatically generated from the ldns source code by
72       use of Doxygen and some perl.
73
74
75
76                                  30 May 2006                          ldns(3)
Impressum