.ad l .TH ldns 3 "30 May 2006" .SH NAME ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type \- ldns_pkt creation, destruction and printing .SH SYNOPSIS #include .br #include .br .PP #include .PP ldns_pkt* ldns_pkt_new(void); .PP void ldns_pkt_free(ldns_pkt *packet); .PP void ldns_pkt_print(FILE *output, const ldns_pkt *pkt); .PP ldns_pkt* ldns_pkt_query_new(ldns_rdf *rr_name, ldns_rr_type rr_type, ldns_rr_class rr_class, uint16_t flags); .PP ldns_status ldns_pkt_query_new_frm_str(ldns_pkt **p, const char *rr_name, ldns_rr_type rr_type, ldns_rr_class rr_class , uint16_t flags); .PP ldns_pkt_type ldns_pkt_reply_type(const ldns_pkt *p); .PP .SH DESCRIPTION .HP \fIldns_pkt_new\fR() allocates and initializes a ldns_pkt structure. \.br Returns pointer to the new packet .PP .HP \fIldns_pkt_free\fR() frees the packet structure and all data that it contains. \.br \fBpacket\fR: The packet structure to free \.br Returns void .PP .HP \fIldns_pkt_print\fR() Prints the data in the \%DNS packet to the given file stream (in presentation format) \.br \fBoutput\fR: the file stream to print to \.br \fBpkt\fR: the packet to print \.br Returns void .PP .HP \fIldns_pkt_query_new\fR() creates a packet with a query in it for the given name, type and class. \.br \fBrr_name\fR: the name to query for (not copied). The returned packet will take ownership of rr_name, so the caller should not free it. \.br \fBrr_type\fR: the type to query for \.br \fBrr_class\fR: the class to query for \.br \fBflags\fR: packet flags \.br Returns ldns_pkt* a pointer to the new pkt .PP .HP \fIldns_pkt_query_new_frm_str\fR() creates a query packet for the given name, type, class. \.br \fBp\fR: the packet to be returned \.br \fBrr_name\fR: the name to query for (as string) \.br \fBrr_type\fR: the type to query for \.br \fBrr_class\fR: the class to query for \.br \fBflags\fR: packet flags \.br Returns \%LDNS_STATUS_OK or a ldns_status mesg with the error .PP .HP \fIldns_pkt_reply_type\fR() looks inside the packet to determine what kind of packet it is, \%AUTH, \%NXDOMAIN, \%REFERRAL, etc. \.br \fBp\fR: the packet to examine \.br Returns the type of packet .PP .SH AUTHOR The ldns team at NLnet Labs. .SH REPORTING BUGS Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html .SH COPYRIGHT Copyright (c) 2004 - 2006 NLnet Labs. .PP Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO \fIldns_pkt\fR. And \fBperldoc Net::DNS\fR, \fBRFC1034\fR, \fBRFC1035\fR, \fBRFC4033\fR, \fBRFC4034\fR and \fBRFC4035\fR. .SH REMARKS This manpage was automatically generated from the ldns source code.