+++ /dev/null
-LibDNS - API
-
- LibDNS (or lDNS) is modelled after the Net::DNS perl library. It has
- been shown that Net::DNS can be used very efficiently for
- programming DNS aware applications.
-
- The current [need to look at bind lwres_ XXX] C library implementations
- of DNS a rarely more than a wrapper for getaddrinfo(). Especially the
- handling of Resource Records and RRsets is missing from those libraries.
- This is the gap lDNS wants to fill.
-
- The lDNS API consist of two layers. The top-layer, this is
- what is actually exported to the application via the library. And the
- bottom-layer, this is what lDNS needs to compile and function.
-
-Bottom Layer
- lDNS is currently only dependent on libc and uses only 4 system calls:
- send/recvfrom (for udp) and sendto/recv (for tcp) [XXX Not checked if
- this is correct, i.e. is sendto for tcp?]
-
- Furhter more, it is to be expected that lDNS is going to depend on
- a cryptographic library. Probably openSSL.
-
- And some netdb-functions. [Jelte plz extend]
-
-Top Layer
- As said, lDNS is modelled after Net::DNS, therefor its API looks very
- much like the one used for Net::DNS. Some modification are made
- ofcourse, because not all functionality of Perl can be caught in C.
-
- The following API details are a rewrite of 'perldoc Net::DNS:XXX' where
- XXX is the actual manpage. At the top of each section it will state from
- which Perl manual page it has been converted.
-
-API
- From Net::DNS - Perl interface to the DNS resolver
-
- Resolver Structures [ldns_resolver]
- ldns_resolver* ldns_resolver_new(void)
-
- A program can have multiple resolver structurs, each maintaining its own
- state information such as the nameservers to be queried, whether
- recursion is desired, etc.
-
- Packet Structures [ldns_pkt]
- ldns_pkt* ldns_pkt_new(void)
-
- ldns_resolver queries return ldns_pkt structures. A ldns_pkt structure
- have five sections:
-
- * The header section, a ldns_hdr structure.
-
- * The question section, a ldns_rr_list structure.
-
- * The answer section, a ldns_rr_list structure.
-
- * The authority section, a ldns_rr_list structure.
-
- * The additional section, a ldns_rr_list structure.
-
- Update Objects [NOT IMPL]
- [NOT IMPL]
-
- Header Structures [ldns_hdr]
- ldns_hdr represents the header section of a DNS packet.
-
- Question Section [no special type is used]
- ldns_rr_list structure. A list of RRs in the Question section of a DNS
- packet.
-
- Answer Section [no special type is used]
- ldns_rr_list structure. A list of RRs in the Question section of a DNS
- packet.
-
- Authority Section [no special type is used]
- ldns_rr_list structure. A list of RRs in the Question section of a DNS
- packet.
-
- Additional Section [no special type is used]
- ldns_rr_list structure. A list of RRs in the Question section of a DNS
- packet.
-
- RR List Structure [ldns_rr_list]
- An array containing Resource Records (RR).
-
- RR Structures [ldns_rr]
- A single Resource Record.
-
-
-Function on ldns_resolver
-
- ldns_version(resolver *res)
- Returns the version of lDNS.
-
- ldns_mx(ldns_resolver *res, char *dname)
- Returns a ldns_rr_list representing the MX records
- for the specified name; the list will be sorted by preference. Returns
- an empty list if the query failed or no MX records were found.
-
- This method does not look up A records -- it only performs MX queries.
-
---- FROM HERE IT ONLY TALKS ABOUT DYNAMIC UPDATES - WHAT TO DO WITH THAT -
-
- yxrrset [NOT IMPL]
- Use this method to add an "RRset exists" prerequisite to a dynamic
- update packet. There are two forms, value-independent and
- value-dependent:
-
- # RRset exists (value-independent)
- $update->push(pre => yxrrset("host.example.com A"));
-
- nxrrset [NOT IMPL]
- Use this method to add an "RRset does not exist" prerequisite to a
- dynamic update packet.
-
- $packet->push(pre => nxrrset("host.example.com A"));
-
- Meaning: No RRs with the specified name and type can exist.
-
- Returns a "Net::DNS::RR" object or "undef" if the object couldn't be
- created.
-
- yxdomain [NOT IMPL]
- Use this method to add a "name is in use" prerequisite to a dynamic
- update packet.
-
- $packet->push(pre => yxdomain("host.example.com"));
-
- Meaning: At least one RR with the specified name must exist.
-
- Returns a "Net::DNS::RR" object or "undef" if the object couldn't be
- created.
-
- ldns_nxdomain [NOT IMPL]
- Use this method to add a "name is not in use" prerequisite to a dynamic
- update packet.
-
- $packet->push(pre => nxdomain("host.example.com"));
-
- Meaning: No RR with the specified name can exist.
-
- Returns a "Net::DNS::RR" object or "undef" if the object couldn't be
- created.
-
- ldns_rr_add(ldns_resolver *res, ldns_rr *r) [NOT IMPL]
- Use this method to add RRs to a zone.
-
- $packet->push(update => rr_add("host.example.com A 10.1.2.3"));
-
- Meaning: Add this RR to the zone.
-
- RR objects created by this method should be added to the "update"
- section of a dynamic update packet. The TTL defaults to 86400 seconds
- (24 hours) if not specified.
-
- Returns a "Net::DNS::RR" object or "undef" if the object couldn't be
- created.
-
- ldns_rr_del(ldns_resolver *res, ldns_rr *r) [NOT IMPL]
- Use this method to delete RRs from a zone. There are three forms: delete
- an RRset, delete all RRsets, and delete an RR.
-
- # Delete an RRset.
- $packet->push(update => rr_del("host.example.com A"));
-
- Meaning: Delete all RRs having the specified name and type.
-
- # Delete all RRsets.
- $packet->push(update => rr_del("host.example.com"));
-
- Meaning: Delete all RRs having the specified name.
-
- # Delete an RR.
- $packet->push(update => rr_del("host.example.com A 10.1.2.3"));
-
- Meaning: Delete all RRs having the specified name, type, and data.
-
- RR objects created by this method should be added to the "update"
- section of a dynamic update packet.
-
- Returns a "Net::DNS::RR" object or "undef" if the object couldn't be
- created.
+++ /dev/null
-Structure and function of ldns_pkt
-
-
-API
- From Net::DNS::Packet - DNS packet object class
-
- ldns_pkt * ldns_pkt_new()
- Creates a new empty packet.
-
- ldns_buffer* ldns_pkt_data(ldns_pkt *pkt)
- Returns the packet data in binary format, suitable for sending to a
- nameserver. [XXX, suitable for sending to a NS?]
-
- ldns_hdr *ldns_header(ldn_pkt *pkt)
- Returns a ldns_hdr structure representing the header section of
- the packet.
-
-[Again here we have all the dynamic update stuff. NOT IMPL, for now]
-
- ldns_rr_list *ldns_question(ldns_pkt *pkt)
- Returns a pointer to a ldns_rr_list representing the question section
- of the packet.
-
- [XXX] In dynamic update packets, this section is known as "zone" and specifies
- the zone to be updated.
-
- ldns_rr_list *ldns_answer(ldns_pkt *pkt)
- Returns a pointer to a ldns_rr_list representing the answer section of
- the packet.
-
- [XXX] In dynamic update packets, this section is known as "pre" or
- "prerequisite" and specifies the RRs or RRsets which must or must not
- preexist.
-
- ldns_rr_list *ldns_authority(ldns_pkt *pkt)
- Returns a pointer to a ldns_rr_list representing the authority section
- of the packet.
-
- [XXX] In dynamic update packets, this section is known as "update" and
- specifies the RRs or RRsets to be added or delted.
-
- ldns_rr_list *ldns_additional(ldns_pkt *pkt)
- Returns a pointer to a ldns_rr_list of representing the additional
- section of the packet.
-
- void ldsn_pkt_print(ldns_pkt *pkt)
- Prints the packet data on the standard output in an ASCII format similar
- to that used in DNS zone files. See RFC1035.
-
- ldns_buffer *ldns_pkt_string(ldns_pkt *pkt)
- Returns a ldns_buffer containing the string representation of the packet.
-
- <return type unknown> ldns_pkt_answerfrom(ldns_pkt *pkt)
- Returns the IP address from which we received this packet. User-created
- packets will return NULL.
-
- uint16_t ldns_pkt_answersize(ldns_pkt *pkt)
- Returns the size of the packet in bytes as it was received from a
- nameserver. User-created packets will return 0. [XXX user-created??]
-
- ldns_status ldns_push(ldns_pkt *pkt, ldns_pkt_section section, ldns_rr *rr)
- Adds *rr to the specified section of the packet. Return LDNS_STATUS_OK
- on success, LDNS_STATUS_ERR otherwise.
-
- ldns_status ldns_unique_push(ldns_pkt *pkt, ldns_pkt_section section, ldns_rr *rr)
- Adds *rr to the specified section of the packet provided that the RR
- does not already exist in the packet. Return LDNS_STATUS_OK
- on success, LDNS_STATUS_ERR otherwise.
-
- ldns_rr *ldns_pop(ldns_pkt, ldns_pkt_section)
- Removes a RR from the specified section of the packet. Returns NULL if
- no RR's could be popped.
-
- <NEW, not in Net::DNS>
- ldns_rr_list *ldns_pkt_rrset(ldns_pkt *pkt, ....
-
--- STUFF BELOW IS TODO ---
-
- dn_comp [TODO]
- $compname = $packet->dn_comp("foo.example.com", $offset);
-
- Returns a domain name compressed for a particular packet object, to be
- stored beginning at the given offset within the packet data. The name
- will be added to a running list of compressed domain names for future
- use.
-
- dn_expand [TODO]
- use Net::DNS::Packet qw(dn_expand);
- ($name, $nextoffset) = dn_expand(\$data, $offset);
-
- ($name, $nextoffset) = Net::DNS::Packet::dn_expand(\$data, $offset);
-
- Expands the domain name stored at a particular location in a DNS packet.
- The first argument is a reference to a scalar containing the packet
- data. The second argument is the offset within the packet where the
- (possibly compressed) domain name is stored.
-
- Returns the domain name and the offset of the next location in the
- packet.
-
- sign_tsig
- $key_name = "tsig-key";
- $key = "awwLOtRfpGE+rRKF2+DEiw==";
-
- $update = Net::DNS::Update->new("example.com");
- $update->push("update", rr_add("foo.example.com A 10.1.2.3"));
-
- $update->sign_tsig($key_name, $key);
-
- $response = $res->send($update);
-
- Signs a packet with a TSIG resource record (see RFC 2845). Uses the
- following defaults:
-
- algorithm = HMAC-MD5.SIG-ALG.REG.INT
- time_signed = current time
- fudge = 300 seconds
-
- If you wish to customize the TSIG record, you'll have to create it
- yourself and call the appropriate Net::DNS::RR::TSIG methods. The
- following example creates a TSIG record and sets the fudge to 60
- seconds:
-
- $key_name = "tsig-key";
- $key = "awwLOtRfpGE+rRKF2+DEiw==";
-
- $tsig = Net::DNS::RR->new("$key_name TSIG $key");
- $tsig->fudge(60);
-
- $query = Net::DNS::Packet->new("www.example.com");
- $query->sign_tsig($tsig);
-
- $response = $res->send($query);
-
- You shouldn't modify a packet after signing it; otherwise authentication
- will probably fail.
-
- sign_sig0
- SIG0 support is provided through the Net::DNS::RR::SIG class. This class
- is not part of the default Net::DNS distribution but resides in the
- Net::DNS::SEC distribution.
-
- $update = Net::DNS::Update->new("example.com");
- $update->push("update", rr_add("foo.example.com A 10.1.2.3"));
- $update->sign_sig0("Kexample.com+003+25317.private");
-
- SIG0 support is experimental see Net::DNS::RR::SIG for details.
+++ /dev/null
-Structure and function of ldns_rr
-
-API
- From Net::DNS::RR - DNS Resource Record class
-
- ldns_rr is the base structure for DNS Recorce Records.
- [ See also the manual pages for each RR type. - TODO??]
-
-
- ldns_rr *ldns_rr_new(void)
- Returns a pointer to a newly created ldns_rr structure.
-
- [TODO: do we want the stuff descibed below?]
- ldns_rr_new (from string)
- $a = Net::DNS::RR->new("foo.example.com. 86400 A 10.1.2.3");
- $mx = Net::DNS::RR->new("example.com. 7200 MX 10 mailhost.example.com.");
- $cname = Net::DNS::RR->new("www.example.com 300 IN CNAME www1.example.com");
- $txt = Net::DNS::RR->new("baz.example.com 3600 HS TXT 'text record'");
-
- Returns a "Net::DNS::RR" object of the appropriate type and initialized
- from the string passed by the user. The format of the string is that
- used in zone files, and is compatible with the string returned by
- "Net::DNS::RR->string".
-
- The name and RR type are required; all other information is optional. If
- omitted, the TTL defaults to 0 and the RR class defaults to IN. Omitting
- the optional fields is useful for creating the empty RDATA sections
- required for certain dynamic update operations. See the
- "Net::DNS::Update" manual page for additional examples.
-
- All names must be fully qualified. The trailing dot (.) is optional.
-
- void ldns_rr_print(ldns_rr *r)
- Prints the record to the standard output.
-
- ldns_buffer *ldns_rr_string(ldns_rr *r)
- Returns a ldns_buffer with the string representation of the RR. Calls the rdatastr method to
- get the RR-specific data.
-
- ldns_buffer ldns_rr_rdatastr(ldns_rr *r)
- Returns a pointer to a ldns_buffer containing with string containing
- RR-specific data.
-
- ldns_rdf *ldns_rr_name(ldns_rr *r)
- Returns the record's domain name as a ldns_rdf type. [XXX how should we
- return stuff like this? ldns_rdf, uint8_t, ldns_buffer?
-
- ldns_rdf_type ldns_rr_get_type(ldns_rr *r)
- Returns the record's type.
-
- ldns_rr_class ldns_rr_get_class(ldns_rr *r)
- Returns the record's class.
-
- uint32_t ldns_rr_get_ttl(ldns_rr *r)
- Returns the record's time-to-live (TTL).
-
- [TODO nodig??] rdlength
- $rdlength = $rr->rdlength;
-
- Returns the length of the record's data section.
-
- [TODO nodig??] rdata
- $rdata = $rr->rdata
-
- Returns the record's data section as binary data.
#include <ldns/buffer.h>
#include <ctype.h>
-ldns_status ldns_conv_int8(ldns_rdf **, const uint8_t *);
-ldns_status ldns_conv_int16(ldns_rdf **, const uint8_t *);
-ldns_status ldns_conv_int32(ldns_rdf **, const uint8_t *);
-ldns_status ldns_conv_time(ldns_rdf **, const uint8_t *);
-ldns_status ldns_conv_none(ldns_rdf **, const uint8_t* );
-ldns_status ldns_conv_dname(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_a(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_aaaa(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_str(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_apl(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_b64(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_hex(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_nsec(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_type(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_class(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_cert(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_alg(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_unknown(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_tsigtime(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_service(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_loc(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_wks(ldns_rdf **, const uint8_t*);
-ldns_status ldns_conv_nsap(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_int8(ldns_rdf **, const uint8_t *);
+ldns_status ldns_str2rdf_int16(ldns_rdf **, const uint8_t *);
+ldns_status ldns_str2rdf_int32(ldns_rdf **, const uint8_t *);
+ldns_status ldns_str2rdf_time(ldns_rdf **, const uint8_t *);
+ldns_status ldns_str2rdf_dname(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_a(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_aaaa(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_str(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_apl(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_b64(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_hex(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_nsec(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_type(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_class(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_cert(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_alg(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_unknown(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_tsigtime(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_service(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_loc(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_wks(ldns_rdf **, const uint8_t*);
+ldns_status ldns_str2rdf_nsap(ldns_rdf **, const uint8_t*);
#endif
switch(t) {
case LDNS_RDF_TYPE_NONE:
- stat = ldns_conv_none(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_DNAME:
- stat = ldns_conv_dname(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_dname(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_INT8:
- stat = ldns_conv_int8(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_int8(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_INT16:
- stat = ldns_conv_int16(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_int16(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_INT32:
- stat = ldns_conv_int32(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_int32(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_A:
- stat = ldns_conv_a(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_a(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_AAAA:
- stat = ldns_conv_aaaa(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_aaaa(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_STR:
- stat = ldns_conv_str(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_str(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_APL:
- stat = ldns_conv_apl(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_apl(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_B64:
- stat = ldns_conv_b64(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_b64(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_HEX:
- stat = ldns_conv_hex(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_hex(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_NSEC:
- stat = ldns_conv_nsec(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_nsec(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_TYPE:
- stat = ldns_conv_type(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_type(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_CLASS:
- stat = ldns_conv_class(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_class(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_CERT:
- stat = ldns_conv_cert(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_cert(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_ALG:
- stat = ldns_conv_alg(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_alg(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_UNKNOWN:
- stat = ldns_conv_unknown(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_unknown(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_TIME:
- stat = ldns_conv_time(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_time(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_TSIGTIME:
- stat = ldns_conv_tsigtime(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_tsigtime(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_SERVICE:
- stat = ldns_conv_service(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_service(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_LOC:
- stat = ldns_conv_loc(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_loc(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_WKS:
- stat = ldns_conv_wks(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_wks(&rd, (const uint8_t*) str);
break;
case LDNS_RDF_TYPE_NSAP:
- stat = ldns_conv_nsap(&rd, (const uint8_t*) str);
+ stat = ldns_str2rdf_nsap(&rd, (const uint8_t*) str);
break;
default:
/* default default ??? */
}
printf("Setting 15242\n");
- if (ldns_conv_int16(&rdata, "15242") != LDNS_STATUS_OK) {
+ if (ldns_str2rdf_int16(&rdata, "15242") != LDNS_STATUS_OK) {
printf("_short: ah man, shit hit the fan\n");
}
main(void)
{
ldns_rdf *bla;
- if (ldns_conv_int16(&bla, "15242") != LDNS_STATUS_OK) {
+ if (ldns_str2rdf_int16(&bla, "15242") != LDNS_STATUS_OK) {
printf("_int16: ah man, shit hit the fan\n");
}
/* %Y%m%d%H%M%S */
- if (ldns_conv_time(&bla, "20041222134100") != LDNS_STATUS_OK) {
+ if (ldns_str2rdf_time(&bla, "20041222134100") != LDNS_STATUS_OK) {
printf("_time: ah man, shit hit the fan\n");
}
* \return ldns_status
*/
ldns_status
-ldns_conv_int16(ldns_rdf **rd, const uint8_t *shortstr)
+ldns_str2rdf_int16(ldns_rdf **rd, const uint8_t *shortstr)
{
char *end = NULL;
uint16_t *r;
* \return ldns_status
*/
ldns_status
-ldns_conv_time(ldns_rdf **rd, const uint8_t *time)
+ldns_str2rdf_time(ldns_rdf **rd, const uint8_t *time)
{
/* convert a time YYHM to wireformat */
uint16_t *r = NULL;
* \return ldns_status
*/
ldns_status
-ldns_conv_int32(ldns_rdf **rd, const uint8_t *longstr)
+ldns_str2rdf_int32(ldns_rdf **rd, const uint8_t *longstr)
{
char *end;
uint16_t *r = NULL;
* \return ldns_status
*/
ldns_status
-ldns_conv_int8(ldns_rdf **rd, const uint8_t *bytestr)
+ldns_str2rdf_int8(ldns_rdf **rd, const uint8_t *bytestr)
{
char *end;
uint8_t *r = NULL;
}
}
-/**
- * convert .... into wireformat
- * \param[in] rd the rdf where to put the data
- * \param[in] str the string to be converted
- * \return ldns_status
- */
-ldns_status
-ldns_conv_none(ldns_rdf **rd, const uint8_t* str)
-{
- return LDNS_STATUS_OK;
-}
-
/**
* convert .... into wireformat
* \param[in] rd the rdf where to put the data
* \return ldns_status
*/
ldns_status
-ldns_conv_dname(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_dname(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_a(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_a(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_aaaa(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_aaaa(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_str(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_str(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_apl(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_apl(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_b64(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_b64(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_hex(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_hex(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_nsec(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_nsec(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_type(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_type(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_class(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_class(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_cert(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_cert(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_alg(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_alg(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_unknown(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_unknown(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_tsigtime(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_tsigtime(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_service(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_service(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_loc(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_loc(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_wks(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_wks(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* \return ldns_status
*/
ldns_status
-ldns_conv_nsap(ldns_rdf **rd, const uint8_t* str)
+ldns_str2rdf_nsap(ldns_rdf **rd, const uint8_t* str)
{
return LDNS_STATUS_OK;
}
* convert a hex value to wireformat
*/
ldns_status
-zparser_conv_hex(ldns_rdf *rd, const char *hex)
+zparser_str2rdf_hex(ldns_rdf *rd, const char *hex)
{
uint16_t *rd = NULL;
uint8_t *t;