Logo Search packages:      
Sourcecode: ldns version File versions  Download package

packet.h File Reference


Detailed Description

Contains the definition of ldns_pkt and its parts, as well as functions to manipulate those.

Definition in file packet.h.

#include <ldns/error.h>
#include <ldns/common.h>
#include <ldns/rr.h>
#include <sys/time.h>

Go to the source code of this file.

Classes

struct  ldns_struct_hdr
struct  ldns_struct_pkt

Defines

#define LDNS_AA   2
#define LDNS_AD   64
#define LDNS_CD   16
#define LDNS_MAX_PACKETLEN   65535
#define LDNS_QR   1
#define LDNS_RA   32
#define LDNS_RD   8
#define LDNS_TC   4

Typedefs

typedef struct ldns_struct_hdr ldns_hdr
typedef struct ldns_struct_pkt ldns_pkt
typedef enum ldns_enum_pkt_opcode ldns_pkt_opcode
typedef enum ldns_enum_pkt_rcode ldns_pkt_rcode
typedef enum ldns_enum_pkt_section ldns_pkt_section
typedef enum ldns_enum_pkt_type ldns_pkt_type

Enumerations

enum  ldns_enum_pkt_opcode {
  LDNS_PACKET_QUERY = 0, LDNS_PACKET_IQUERY = 1, LDNS_PACKET_STATUS = 2, LDNS_PACKET_NOTIFY = 4,
  LDNS_PACKET_UPDATE = 5
}
enum  ldns_enum_pkt_rcode {
  LDNS_RCODE_NOERROR = 0, LDNS_RCODE_FORMERR = 1, LDNS_RCODE_SERVFAIL = 2, LDNS_RCODE_NXDOMAIN = 3,
  LDNS_RCODE_NOTIMPL = 4, LDNS_RCODE_REFUSED = 5, LDNS_RCODE_YXDOMAIN = 6, LDNS_RCODE_YXRRSET = 7,
  LDNS_RCODE_NXRRSET = 8, LDNS_RCODE_NOTAUTH = 9, LDNS_RCODE_NOTZONE = 10
}
enum  ldns_enum_pkt_section {
  LDNS_SECTION_QUESTION = 0, LDNS_SECTION_ANSWER = 1, LDNS_SECTION_AUTHORITY = 2, LDNS_SECTION_ADDITIONAL = 3,
  LDNS_SECTION_ANY = 4, LDNS_SECTION_ANY_NOQUESTION = 5
}
enum  ldns_enum_pkt_type {
  LDNS_PACKET_QUESTION, LDNS_PACKET_REFERRAL, LDNS_PACKET_ANSWER, LDNS_PACKET_NXDOMAIN,
  LDNS_PACKET_NODATA, LDNS_PACKET_UNKNOWN
}

Functions

bool ldns_pkt_aa (const ldns_pkt *p)
bool ldns_pkt_ad (const ldns_pkt *p)
ldns_rr_listldns_pkt_additional (const ldns_pkt *p)
uint16_t ldns_pkt_ancount (const ldns_pkt *p)
ldns_rr_listldns_pkt_answer (const ldns_pkt *p)
ldns_rdfldns_pkt_answerfrom (const ldns_pkt *p)
uint16_t ldns_pkt_arcount (const ldns_pkt *p)
ldns_rr_listldns_pkt_authority (const ldns_pkt *p)
bool ldns_pkt_cd (const ldns_pkt *p)
ldns_pktldns_pkt_clone (ldns_pkt *pkt)
bool ldns_pkt_edns (const ldns_pkt *packet)
ldns_rdfldns_pkt_edns_data (const ldns_pkt *packet)
bool ldns_pkt_edns_do (const ldns_pkt *packet)
uint8_t ldns_pkt_edns_extended_rcode (const ldns_pkt *packet)
uint16_t ldns_pkt_edns_udp_size (const ldns_pkt *packet)
uint8_t ldns_pkt_edns_version (const ldns_pkt *packet)
uint16_t ldns_pkt_edns_z (const ldns_pkt *packet)
bool ldns_pkt_empty (ldns_pkt *p)
void ldns_pkt_free (ldns_pkt *packet)
ldns_pkt_opcode ldns_pkt_get_opcode (const ldns_pkt *p)
ldns_pkt_rcode ldns_pkt_get_rcode (const ldns_pkt *p)
ldns_rr_listldns_pkt_get_section_clone (ldns_pkt *p, ldns_pkt_section s)
uint16_t ldns_pkt_id (const ldns_pkt *p)
ldns_pktldns_pkt_new ()
uint16_t ldns_pkt_nscount (const ldns_pkt *p)
bool ldns_pkt_push_rr (ldns_pkt *packet, ldns_pkt_section section, ldns_rr *rr)
bool ldns_pkt_push_rr_list (ldns_pkt *packet, ldns_pkt_section section, ldns_rr_list *list)
uint16_t ldns_pkt_qdcount (const ldns_pkt *p)
bool ldns_pkt_qr (const ldns_pkt *p)
ldns_pktldns_pkt_query_new (ldns_rdf *rr_name, ldns_rr_type rr_type, ldns_rr_class rr_class, uint16_t flags)
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)
uint32_t ldns_pkt_querytime (const ldns_pkt *p)
ldns_rr_listldns_pkt_question (const ldns_pkt *p)
bool ldns_pkt_ra (const ldns_pkt *p)
bool ldns_pkt_rd (const ldns_pkt *p)
ldns_pkt_type ldns_pkt_reply_type (ldns_pkt *p)
bool ldns_pkt_rr (ldns_pkt *pkt, ldns_pkt_section sec, ldns_rr *rr)
ldns_rr_listldns_pkt_rr_list_by_name (ldns_pkt *p, ldns_rdf *r, ldns_pkt_section s)
ldns_rr_listldns_pkt_rr_list_by_name_and_type (ldns_pkt *packet, ldns_rdf *ownername, ldns_rr_type type, ldns_pkt_section sec)
ldns_rr_listldns_pkt_rr_list_by_type (ldns_pkt *p, ldns_rr_type t, ldns_pkt_section s)
bool ldns_pkt_safe_push_rr (ldns_pkt *pkt, ldns_pkt_section sec, ldns_rr *rr)
bool ldns_pkt_safe_push_rr_list (ldns_pkt *pkt, ldns_pkt_section sec, ldns_rr_list *list)
void ldns_pkt_set_aa (ldns_pkt *p, bool b)
void ldns_pkt_set_ad (ldns_pkt *p, bool b)
void ldns_pkt_set_additional (ldns_pkt *p, ldns_rr_list *rr)
void ldns_pkt_set_ancount (ldns_pkt *p, uint16_t c)
void ldns_pkt_set_answer (ldns_pkt *p, ldns_rr_list *rr)
void ldns_pkt_set_answerfrom (ldns_pkt *p, ldns_rdf *r)
void ldns_pkt_set_arcount (ldns_pkt *p, uint16_t c)
void ldns_pkt_set_authority (ldns_pkt *p, ldns_rr_list *rr)
void ldns_pkt_set_cd (ldns_pkt *p, bool b)
void ldns_pkt_set_edns_data (ldns_pkt *packet, ldns_rdf *data)
void ldns_pkt_set_edns_do (ldns_pkt *packet, bool value)
void ldns_pkt_set_edns_extended_rcode (ldns_pkt *packet, uint8_t c)
void ldns_pkt_set_edns_udp_size (ldns_pkt *packet, uint16_t s)
void ldns_pkt_set_edns_version (ldns_pkt *packet, uint8_t v)
void ldns_pkt_set_edns_z (ldns_pkt *packet, uint16_t z)
bool ldns_pkt_set_flags (ldns_pkt *pkt, uint16_t flags)
void ldns_pkt_set_id (ldns_pkt *p, uint16_t id)
void ldns_pkt_set_nscount (ldns_pkt *p, uint16_t c)
void ldns_pkt_set_opcode (ldns_pkt *p, ldns_pkt_opcode c)
void ldns_pkt_set_qdcount (ldns_pkt *p, uint16_t c)
void ldns_pkt_set_qr (ldns_pkt *p, bool b)
void ldns_pkt_set_querytime (ldns_pkt *p, uint32_t t)
void ldns_pkt_set_question (ldns_pkt *p, ldns_rr_list *rr)
void ldns_pkt_set_ra (ldns_pkt *p, bool b)
void ldns_pkt_set_random_id (ldns_pkt *p)
void ldns_pkt_set_rcode (ldns_pkt *p, uint8_t c)
void ldns_pkt_set_rd (ldns_pkt *p, bool b)
void ldns_pkt_set_section_count (ldns_pkt *p, ldns_pkt_section s, uint16_t x)
void ldns_pkt_set_size (ldns_pkt *p, size_t s)
void ldns_pkt_set_tc (ldns_pkt *p, bool b)
void ldns_pkt_set_timestamp (ldns_pkt *p, struct timeval)
void ldns_pkt_set_tsig (ldns_pkt *p, ldns_rr *t)
size_t ldns_pkt_size (const ldns_pkt *p)
bool ldns_pkt_tc (const ldns_pkt *p)
struct timeval ldns_pkt_timestamp (const ldns_pkt *p)
ldns_rrldns_pkt_tsig (const ldns_pkt *p)


Generated by  Doxygen 1.6.0   Back to index