--[[ This file is generated by ./kres-gen.sh ]] ffi.cdef[[
-
typedef struct knot_dump_style knot_dump_style_t;
extern const knot_dump_style_t KNOT_DUMP_STYLE_DEFAULT;
-
typedef struct knot_mm {
void *ctx, *alloc, *free;
} knot_mm_t;
typedef void *(*map_alloc_f)(void *, size_t);
typedef void (*map_free_f)(void *baton, void *ptr);
-
typedef enum {KNOT_ANSWER, KNOT_AUTHORITY, KNOT_ADDITIONAL} knot_section_t;
typedef struct {
uint16_t pos;
struct knot_rdataset {
uint16_t rr_count;
knot_rdata_t *data;
-}
-;
+};
typedef struct knot_rrset knot_rrset_t;
typedef struct {
struct knot_pkt *pkt;
knot_rrinfo_t *rr_info;
knot_rrset_t *rr;
knot_mm_t mm;
-}
-;
+};
typedef struct knot_pkt knot_pkt_t;
typedef struct {
void *root;
struct kr_zonecut *parent;
map_t nsset;
knot_mm_t *pool;
-}
-;
+};
typedef struct {
struct kr_query **at;
size_t len;
kr_qarray_t resolved;
struct kr_request *request;
knot_mm_t *pool;
-}
-;
+};
struct kr_request {
struct kr_context *ctx;
knot_pkt_t *answer;
struct kr_rplan rplan;
int has_tls;
knot_mm_t pool;
-}
-;
+};
struct knot_rrset {
knot_dname_t *_owner;
uint16_t type;
uint16_t rclass;
knot_rdataset_t rrs;
void *additional;
-}
-;
+};
struct kr_query {
struct kr_query *parent;
knot_dname_t *sname;
struct kr_zonecut root_hints;
char _stub[];
};
-struct query_flag {static const int NO_MINIMIZE = 1; static const int NO_THROTTLE = 2; static const int NO_IPV6 = 4; static const int NO_IPV4 = 8;
- static const int TCP = 16; static const int RESOLVED = 32; static const int AWAIT_IPV4 = 64; static const int AWAIT_IPV6 = 128; static const int AWAIT_CUT = 256;
- static const int SAFEMODE = 512; static const int CACHED = 1024; static const int NO_CACHE = 2048; static const int EXPIRING = 4096;
- static const int ALLOW_LOCAL = 8192; static const int DNSSEC_WANT = 16384; static const int DNSSEC_BOGUS = 32768;
- static const int DNSSEC_INSECURE = 65536; static const int STUB = 131072; static const int ALWAYS_CUT = 262144;
- static const int DNSSEC_WEXPAND = 524288; static const int PERMISSIVE = 1048576; static const int STRICT = 2097152;
- static const int BADCOOKIE_AGAIN = 4194304; static const int CNAME = 8388608; static const int REORDER_RR = 16777216;}
-;
+struct query_flag {static const int NO_MINIMIZE = 1; static const int NO_THROTTLE = 2; static const int NO_IPV6 = 4; static const int NO_IPV4 = 8; static const int TCP = 16; static const int RESOLVED = 32; static const int AWAIT_IPV4 = 64; static const int AWAIT_IPV6 = 128; static const int AWAIT_CUT = 256; static const int SAFEMODE = 512; static const int CACHED = 1024; static const int NO_CACHE = 2048; static const int EXPIRING = 4096; static const int ALLOW_LOCAL = 8192; static const int DNSSEC_WANT = 16384; static const int DNSSEC_BOGUS = 32768; static const int DNSSEC_INSECURE = 65536; static const int STUB = 131072; static const int ALWAYS_CUT = 262144; static const int DNSSEC_WEXPAND = 524288; static const int PERMISSIVE = 1048576; static const int STRICT = 2097152; static const int BADCOOKIE_AGAIN = 4194304; static const int CNAME = 8388608; static const int REORDER_RR = 16777216;};
int knot_dname_size(const knot_dname_t *);
knot_dname_t *knot_dname_from_str(uint8_t *, const char *, size_t);
char *knot_dname_to_str(char *, const knot_dname_t *, size_t);
uint8_t *knot_rdata_data(const knot_rdata_t *);
knot_rdata_t *knot_rdataset_at(const knot_rdataset_t *, size_t);
uint32_t knot_rrset_ttl(const knot_rrset_t *);
-int knot_rrset_txt_dump_data(const knot_rrset_t *, const size_t, char *, const size_t,
- const knot_dump_style_t *);
+int knot_rrset_txt_dump_data(const knot_rrset_t *, const size_t, char *, const size_t, const knot_dump_style_t *);
int knot_rrset_txt_dump(const knot_rrset_t *, char *, const size_t, const knot_dump_style_t *);
const knot_dname_t *knot_pkt_qname(const knot_pkt_t *);
uint16_t knot_pkt_qtype(const knot_pkt_t *);