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

NAME

6       ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new,
7       ldns_pkt_query_new_frm_str, ldns_pkt_reply_type - ldns_pkt creation,
8       destruction and printing
9
10

SYNOPSIS

12       #include <stdint.h>
13       #include <stdbool.h>
14
15       #include <ldns/ldns.h>
16
17       ldns_pkt* ldns_pkt_new(void);
18
19       void ldns_pkt_free(ldns_pkt *packet);
20
21       void ldns_pkt_print(FILE *output, const ldns_pkt *pkt);
22
23       ldns_pkt* ldns_pkt_query_new(ldns_rdf *rr_name, ldns_rr_type rr_type,
24       ldns_rr_class rr_class, uint16_t flags);
25
26       ldns_status ldns_pkt_query_new_frm_str(ldns_pkt **p, const char
27       *rr_name, ldns_rr_type rr_type, ldns_rr_class rr_class , uint16_t
28       flags);
29
30       ldns_pkt_type ldns_pkt_reply_type(const ldns_pkt *p);
31

DESCRIPTION

33       ldns_pkt_new() allocates and initializes a ldns_pkt structure.
34              Returns pointer to the new packet
35
36       ldns_pkt_free() frees the packet structure and all data that it con‐
37              tains.
38              packet: The packet structure to free
39              Returns void
40
41       ldns_pkt_print() Prints the data in the DNS packet to the given file
42              stream (in presentation format)
43
44              output: the file stream to print to
45              pkt: the packet to print
46              Returns void
47
48       ldns_pkt_query_new() creates a packet with a query in it for the given
49              name, type and class.
50              rr_name: the name to query for (not copied).  The returned
51              packet will take ownership of rr_name, so the caller should not
52              free it.
53              rr_type: the type to query for
54              rr_class: the class to query for
55              flags: packet flags
56              Returns ldns_pkt* a pointer to the new pkt
57
58       ldns_pkt_query_new_frm_str() creates a query packet for the given name,
59              type, class.
60              p: the packet to be returned
61              rr_name: the name to query for (as string)
62              rr_type: the type to query for
63              rr_class: the class to query for
64              flags: packet flags
65              Returns LDNS_STATUS_OK or a ldns_status mesg with the error
66
67       ldns_pkt_reply_type() looks inside the packet to determine what kind of
68              packet it is, AUTH, NXDOMAIN, REFERRAL, etc.
69              p: the packet to examine
70              Returns the type of packet
71

AUTHOR

73       The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
74       Miek Gieben.
75
76

REPORTING BUGS

78       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
79       http://www.nlnetlabs.nl/bugs/index.html
80
81
83       Copyright (c) 2004 - 2006 NLnet Labs.
84
85       Licensed under the BSD License. There is NO warranty; not even for MER‐
86       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
87
88

SEE ALSO

90       ldns_pkt.  And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
91       and RFC4035.
92

REMARKS

94       This manpage was automatically generated from the ldns source code by
95       use of Doxygen and some perl.
96
97
98
99                                  30 May 2006                          ldns(3)
Impressum