API for helper library to parse DNS packets. More...
Go to the source code of this file.
Data Structures | |
struct | GNUNET_DNSPARSER_Query |
A DNS query. More... | |
struct | GNUNET_DNSPARSER_MxRecord |
Information from MX records (RFC 1035). More... | |
struct | GNUNET_DNSPARSER_SrvRecord |
Information from SRV records (RFC 2782). More... | |
struct | GNUNET_DNSPARSER_UriRecord |
Information from URI records (RFC 7553). More... | |
struct | GNUNET_DNSPARSER_CertRecord |
Information from CERT records (RFC 4034). More... | |
struct | GNUNET_DNSPARSER_SoaRecord |
Information from SOA records (RFC 1035). More... | |
struct | GNUNET_DNSPARSER_CaaRecord |
Information from CAA records (RFC 6844). More... | |
struct | GNUNET_DNSPARSER_RawRecord |
Binary record information (unparsed). More... | |
struct | GNUNET_DNSPARSER_Record |
A DNS response record. More... | |
struct | GNUNET_DNSPARSER_Packet |
Easy-to-process, parsed version of a DNS packet. More... | |
Functions | |
int | GNUNET_DNSPARSER_check_label (const char *label) |
Check if a label in UTF-8 format can be coded into valid IDNA. More... | |
int | GNUNET_DNSPARSER_check_name (const char *name) |
Check if a hostname in UTF-8 format can be coded into valid IDNA. More... | |
struct GNUNET_DNSPARSER_Packet * | GNUNET_DNSPARSER_parse (const char *udp_payload, size_t udp_payload_length) |
Parse a UDP payload of a DNS packet in to a nice struct for further processing and manipulation. More... | |
void | GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) |
Free memory taken by a packet. More... | |
int | GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, uint16_t max, char **buf, size_t *buf_length) |
Given a DNS packet p, generate the corresponding UDP payload. More... | |
int | GNUNET_DNSPARSER_builder_add_name (char *dst, size_t dst_len, size_t *off, const char *name) |
Add a DNS name to the UDP packet at the given location, converting the name to IDNA notation as necessary. More... | |
int | GNUNET_DNSPARSER_builder_add_query (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_Query *query) |
Add a DNS query to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_builder_add_mx (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_MxRecord *mx) |
Add an MX record to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_builder_add_soa (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_SoaRecord *soa) |
Add an SOA record to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_builder_add_cert (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_CertRecord *cert) |
Add CERT record to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_builder_add_srv (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_SrvRecord *srv) |
Add an SRV record to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_builder_add_uri (char *dst, size_t dst_len, size_t *off, const struct GNUNET_DNSPARSER_UriRecord *uri) |
Add an URI record to the UDP packet at the given location. More... | |
int | GNUNET_DNSPARSER_parse_record (const char *udp_payload, size_t udp_payload_length, size_t *off, struct GNUNET_DNSPARSER_Record *r) |
Parse a DNS record entry. More... | |
char * | GNUNET_DNSPARSER_parse_name (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse name inside of a DNS query or record. More... | |
int | GNUNET_DNSPARSER_parse_query (const char *udp_payload, size_t udp_payload_length, size_t *off, struct GNUNET_DNSPARSER_Query *q) |
Parse a DNS query entry. More... | |
struct GNUNET_DNSPARSER_SoaRecord * | GNUNET_DNSPARSER_parse_soa (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse a DNS SOA record. More... | |
struct GNUNET_DNSPARSER_CertRecord * | GNUNET_DNSPARSER_parse_cert (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse a DNS CERT record. More... | |
struct GNUNET_DNSPARSER_MxRecord * | GNUNET_DNSPARSER_parse_mx (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse a DNS MX record. More... | |
struct GNUNET_DNSPARSER_SrvRecord * | GNUNET_DNSPARSER_parse_srv (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse a DNS SRV record. More... | |
struct GNUNET_DNSPARSER_UriRecord * | GNUNET_DNSPARSER_parse_uri (const char *udp_payload, size_t udp_payload_length, size_t *off) |
Parse a DNS URI record. More... | |
struct GNUNET_DNSPARSER_Record * | GNUNET_DNSPARSER_duplicate_record (const struct GNUNET_DNSPARSER_Record *r) |
Duplicate (deep-copy) the given DNS record. More... | |
struct GNUNET_DNSPARSER_SoaRecord * | GNUNET_DNSPARSER_duplicate_soa_record (const struct GNUNET_DNSPARSER_SoaRecord *r) |
Duplicate (deep-copy) the given DNS record. More... | |
struct GNUNET_DNSPARSER_CertRecord * | GNUNET_DNSPARSER_duplicate_cert_record (const struct GNUNET_DNSPARSER_CertRecord *r) |
Duplicate (deep-copy) the given DNS record. More... | |
struct GNUNET_DNSPARSER_MxRecord * | GNUNET_DNSPARSER_duplicate_mx_record (const struct GNUNET_DNSPARSER_MxRecord *r) |
Duplicate (deep-copy) the given DNS record. More... | |
struct GNUNET_DNSPARSER_SrvRecord * | GNUNET_DNSPARSER_duplicate_srv_record (const struct GNUNET_DNSPARSER_SrvRecord *r) |
Duplicate (deep-copy) the given DNS record. More... | |
struct GNUNET_DNSPARSER_UriRecord * | GNUNET_DNSPARSER_duplicate_uri_record (const struct GNUNET_DNSPARSER_UriRecord *r) |
Duplicate (deep-copy) the given DNS record. More... | |
void | GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) |
Free the given DNS record. More... | |
void | GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx) |
Free MX information record. More... | |
void | GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv) |
Free SRV information record. More... | |
void | GNUNET_DNSPARSER_free_uri (struct GNUNET_DNSPARSER_UriRecord *uri) |
Free URI information record. More... | |
void | GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa) |
Free SOA information record. More... | |
void | GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert) |
Free CERT information record. More... | |
char * | GNUNET_DNSPARSER_bin_to_hex (const void *data, size_t data_size) |
Convert a block of binary data to HEX. More... | |
size_t | GNUNET_DNSPARSER_hex_to_bin (const char *hex, void *data) |
Convert a HEX string to block of binary data. More... | |
API for helper library to parse DNS packets.
Definition in file gnunet_dnsparser_lib.h.