rr_functions.h File Reference

Defines some extra convenience functions for ldns_rr structures. More...

Go to the source code of this file.

Functions

ldns_rdfldns_rr_a_address (const ldns_rr *r)
 returns the address of a LDNS_RR_TYPE_A rr
bool ldns_rr_a_set_address (ldns_rr *r, ldns_rdf *f)
 sets the address of a LDNS_RR_TYPE_A rr
ldns_rdfldns_rr_ns_nsdname (const ldns_rr *r)
 returns the name of a LDNS_RR_TYPE_NS rr
ldns_rdfldns_rr_mx_preference (const ldns_rr *r)
 returns the mx pref.
ldns_rdfldns_rr_mx_exchange (const ldns_rr *r)
 returns the mx host of a LDNS_RR_TYPE_MX rr
ldns_rdfldns_rr_rrsig_typecovered (const ldns_rr *r)
 returns the type covered of a LDNS_RR_TYPE_RRSIG rr
bool ldns_rr_rrsig_set_typecovered (ldns_rr *r, ldns_rdf *f)
 sets the typecovered of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_algorithm (const ldns_rr *r)
 returns the algorithm of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_algorithm (ldns_rr *r, ldns_rdf *f)
 sets the algorithm of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_labels (const ldns_rr *r)
 returns the number of labels of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_labels (ldns_rr *r, ldns_rdf *f)
 sets the number of labels of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_origttl (const ldns_rr *r)
 returns the original TTL of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_origttl (ldns_rr *r, ldns_rdf *f)
 sets the original TTL of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_expiration (const ldns_rr *r)
 returns the expiration time of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_expiration (ldns_rr *r, ldns_rdf *f)
 sets the expireation date of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_inception (const ldns_rr *r)
 returns the inception time of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_inception (ldns_rr *r, ldns_rdf *f)
 sets the inception date of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_keytag (const ldns_rr *r)
 returns the keytag of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_keytag (ldns_rr *r, ldns_rdf *f)
 sets the keytag of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_signame (const ldns_rr *r)
 returns the signers name of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_signame (ldns_rr *r, ldns_rdf *f)
 sets the signers name of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_rrsig_sig (const ldns_rr *r)
 returns the signature data of a LDNS_RR_TYPE_RRSIG RR
bool ldns_rr_rrsig_set_sig (ldns_rr *r, ldns_rdf *f)
 sets the signature data of a LDNS_RR_TYPE_RRSIG rr
ldns_rdfldns_rr_dnskey_flags (const ldns_rr *r)
 returns the flags of a LDNS_RR_TYPE_DNSKEY rr
bool ldns_rr_dnskey_set_flags (ldns_rr *r, ldns_rdf *f)
 sets the flags of a LDNS_RR_TYPE_DNSKEY rr
ldns_rdfldns_rr_dnskey_protocol (const ldns_rr *r)
 returns the protocol of a LDNS_RR_TYPE_DNSKEY rr
bool ldns_rr_dnskey_set_protocol (ldns_rr *r, ldns_rdf *f)
 sets the protocol of a LDNS_RR_TYPE_DNSKEY rr
ldns_rdfldns_rr_dnskey_algorithm (const ldns_rr *r)
 returns the algorithm of a LDNS_RR_TYPE_DNSKEY rr
bool ldns_rr_dnskey_set_algorithm (ldns_rr *r, ldns_rdf *f)
 sets the algorithm of a LDNS_RR_TYPE_DNSKEY rr
ldns_rdfldns_rr_dnskey_key (const ldns_rr *r)
 returns the key data of a LDNS_RR_TYPE_DNSKEY rr
bool ldns_rr_dnskey_set_key (ldns_rr *r, ldns_rdf *f)
 sets the key data of a LDNS_RR_TYPE_DNSKEY rr
uint16_t ldns_rr_dnskey_key_size (const ldns_rr *key)
 get the length of the keydata in bits


Detailed Description

Defines some extra convenience functions for ldns_rr structures.

Definition in file rr_functions.h.


Function Documentation

ldns_rdf* ldns_rr_a_address ( const ldns_rr r  ) 

returns the address of a LDNS_RR_TYPE_A rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the address or NULL on failure

Definition at line 65 of file rr_functions.c.

References ldns_rr_get_type(), ldns_rr_rdf(), LDNS_RR_TYPE_A, and LDNS_RR_TYPE_AAAA.

bool ldns_rr_a_set_address ( ldns_rr r,
ldns_rdf f 
)

sets the address of a LDNS_RR_TYPE_A rr

Parameters:
[in] r the rr to use
[in] f the address to set
Returns:
true on success, false otherwise

Definition at line 76 of file rr_functions.c.

References LDNS_FREE, ldns_rr_get_type(), ldns_rr_set_rdf(), LDNS_RR_TYPE_A, and LDNS_RR_TYPE_AAAA.

ldns_rdf* ldns_rr_ns_nsdname ( const ldns_rr r  ) 

returns the name of a LDNS_RR_TYPE_NS rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the name or NULL on failure

Definition at line 95 of file rr_functions.c.

References LDNS_RR_TYPE_NS.

ldns_rdf* ldns_rr_mx_preference ( const ldns_rr r  ) 

returns the mx pref.

of a LDNS_RR_TYPE_MX rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the preference or NULL on failure

Definition at line 102 of file rr_functions.c.

References LDNS_RR_TYPE_MX.

ldns_rdf* ldns_rr_mx_exchange ( const ldns_rr r  ) 

returns the mx host of a LDNS_RR_TYPE_MX rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the name of the MX host or NULL on failure

Definition at line 108 of file rr_functions.c.

References LDNS_RR_TYPE_MX.

ldns_rdf* ldns_rr_rrsig_typecovered ( const ldns_rr r  ) 

returns the type covered of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the type covered or NULL on failure

Definition at line 115 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_typecovered ( ldns_rr r,
ldns_rdf f 
)

sets the typecovered of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the typecovered to set
Returns:
true on success, false otherwise

Definition at line 121 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_algorithm ( const ldns_rr r  ) 

returns the algorithm of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the algorithm or NULL on failure

Definition at line 127 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_algorithm ( ldns_rr r,
ldns_rdf f 
)

sets the algorithm of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the algorithm to set
Returns:
true on success, false otherwise

Definition at line 133 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_labels ( const ldns_rr r  ) 

returns the number of labels of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the number of labels or NULL on failure

Definition at line 139 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_labels ( ldns_rr r,
ldns_rdf f 
)

sets the number of labels of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the number of labels to set
Returns:
true on success, false otherwise

Definition at line 145 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_origttl ( const ldns_rr r  ) 

returns the original TTL of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the original TTL or NULL on failure

Definition at line 151 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_origttl ( ldns_rr r,
ldns_rdf f 
)

sets the original TTL of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the original TTL to set
Returns:
true on success, false otherwise

Definition at line 157 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_expiration ( const ldns_rr r  ) 

returns the expiration time of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the expiration time or NULL on failure

Definition at line 163 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_expiration ( ldns_rr r,
ldns_rdf f 
)

sets the expireation date of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the expireation date to set
Returns:
true on success, false otherwise

Definition at line 169 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_inception ( const ldns_rr r  ) 

returns the inception time of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the inception time or NULL on failure

Definition at line 175 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_inception ( ldns_rr r,
ldns_rdf f 
)

sets the inception date of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the inception date to set
Returns:
true on success, false otherwise

Definition at line 181 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_keytag ( const ldns_rr r  ) 

returns the keytag of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the keytag or NULL on failure

Definition at line 187 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_keytag ( ldns_rr r,
ldns_rdf f 
)

sets the keytag of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the keytag to set
Returns:
true on success, false otherwise

Definition at line 193 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_signame ( const ldns_rr r  ) 

returns the signers name of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the signers name or NULL on failure

Definition at line 199 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_signame ( ldns_rr r,
ldns_rdf f 
)

sets the signers name of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the signers name to set
Returns:
true on success, false otherwise

Definition at line 205 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_rrsig_sig ( const ldns_rr r  ) 

returns the signature data of a LDNS_RR_TYPE_RRSIG RR

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the signature data or NULL on failure

Definition at line 211 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

bool ldns_rr_rrsig_set_sig ( ldns_rr r,
ldns_rdf f 
)

sets the signature data of a LDNS_RR_TYPE_RRSIG rr

Parameters:
[in] r the rr to use
[in] f the signature data to set
Returns:
true on success, false otherwise

Definition at line 217 of file rr_functions.c.

References LDNS_RR_TYPE_RRSIG.

ldns_rdf* ldns_rr_dnskey_flags ( const ldns_rr r  ) 

returns the flags of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the flags or NULL on failure

Definition at line 224 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

bool ldns_rr_dnskey_set_flags ( ldns_rr r,
ldns_rdf f 
)

sets the flags of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the rr to use
[in] f the flags to set
Returns:
true on success, false otherwise

Definition at line 230 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

ldns_rdf* ldns_rr_dnskey_protocol ( const ldns_rr r  ) 

returns the protocol of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the protocol or NULL on failure

Definition at line 236 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

bool ldns_rr_dnskey_set_protocol ( ldns_rr r,
ldns_rdf f 
)

sets the protocol of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the rr to use
[in] f the protocol to set
Returns:
true on success, false otherwise

Definition at line 242 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

ldns_rdf* ldns_rr_dnskey_algorithm ( const ldns_rr r  ) 

returns the algorithm of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the algorithm or NULL on failure

Definition at line 248 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

bool ldns_rr_dnskey_set_algorithm ( ldns_rr r,
ldns_rdf f 
)

sets the algorithm of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the rr to use
[in] f the algorithm to set
Returns:
true on success, false otherwise

Definition at line 254 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

ldns_rdf* ldns_rr_dnskey_key ( const ldns_rr r  ) 

returns the key data of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the resource record
Returns:
a ldns_rdf* with the key data or NULL on failure

Definition at line 260 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

bool ldns_rr_dnskey_set_key ( ldns_rr r,
ldns_rdf f 
)

sets the key data of a LDNS_RR_TYPE_DNSKEY rr

Parameters:
[in] r the rr to use
[in] f the key data to set
Returns:
true on success, false otherwise

Definition at line 266 of file rr_functions.c.

References LDNS_RR_TYPE_DNSKEY.

uint16_t ldns_rr_dnskey_key_size ( const ldns_rr key  ) 

get the length of the keydata in bits

Parameters:
[in] key the key rr to use
Returns:
the keysize in bits

Definition at line 272 of file rr_functions.c.

References ldns_rdf_size(), and ldns_rr_dnskey_key().


Generated on Sun Dec 2 07:36:03 2007 for ldns by  doxygen 1.4.7