Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/host2wire.h
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
* \return ldns_status | * \return ldns_status | ||||
*/ | */ | ||||
ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr); | ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr); | ||||
/** | /** | ||||
* Converts an rr's rdata to wireformat, while excluding | * Converts an rr's rdata to wireformat, while excluding | ||||
* the ownername and all the stuff before the rdata. | * the ownername and all the stuff before the rdata. | ||||
* This is needed in DNSSEC keytag calculation, the ds | * This is needed in DNSSEC keytag calculation, the ds | ||||
* calcalution from the key and maybe elsewhere. | * calculation from the key and maybe elsewhere. | ||||
* | * | ||||
* \param[out] *output buffer where to put the result | * \param[out] *output buffer where to put the result | ||||
* \param[in] *rr rr to operate on | * \param[in] *rr rr to operate on | ||||
* \return ldns_status | * \return ldns_status | ||||
*/ | */ | ||||
ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr); | ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr); | ||||
/** | /** | ||||
* Copies the packet data to the buffer in wire format | * Copies the packet data to the buffer in wire format | ||||
* \param[out] *output buffer to append the result to | * \param[out] *output buffer to append the result to | ||||
* \param[in] *pkt packet to convert | * \param[in] *pkt packet to convert | ||||
* \return ldns_status | * \return ldns_status | ||||
*/ | */ | ||||
ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt); | ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt); | ||||
/** | /** | ||||
* Copies the packet data to the buffer in wire format | |||||
* \param[out] *output buffer to append the result to | |||||
* \param[in] *pkt packet to convert | |||||
* \param[out] *compression_data data structure holding state for compression | |||||
* \return ldns_status | |||||
*/ | |||||
ldns_status ldns_pkt2buffer_wire_compress(ldns_buffer *output, const ldns_pkt *pkt, ldns_rbtree_t *compression_data); | |||||
/** | |||||
* Copies the rr_list data to the buffer in wire format | * Copies the rr_list data to the buffer in wire format | ||||
* \param[out] *output buffer to append the result to | * \param[out] *output buffer to append the result to | ||||
* \param[in] *rrlist rr_list to to convert | * \param[in] *rrlist rr_list to to convert | ||||
* \return ldns_status | * \return ldns_status | ||||
*/ | */ | ||||
ldns_status ldns_rr_list2buffer_wire(ldns_buffer *output, const ldns_rr_list *rrlist); | ldns_status ldns_rr_list2buffer_wire(ldns_buffer *output, const ldns_rr_list *rrlist); | ||||
/** | /** | ||||
Show All 24 Lines | |||||
*/ | */ | ||||
ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int section, size_t *size); | ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int section, size_t *size); | ||||
/** | /** | ||||
* Allocates an array of uint8_t at dest, and puts the wireformat of the | * Allocates an array of uint8_t at dest, and puts the wireformat of the | ||||
* given packet in that array. The result_size value contains the | * given packet in that array. The result_size value contains the | ||||
* length of the array, if it succeeds, and 0 otherwise (in which case | * length of the array, if it succeeds, and 0 otherwise (in which case | ||||
* the function also returns NULL) | * the function also returns NULL) | ||||
* | |||||
* \param[out] dest pointer to the array of bytes to be created | |||||
* \param[in] p the packet to convert | |||||
* \param[out] size the size of the converted result | |||||
*/ | */ | ||||
ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size); | ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif /* LDNS_HOST2WIRE_H */ | #endif /* LDNS_HOST2WIRE_H */ |