Lines Matching refs:DnsPacket
14 typedef struct DnsPacket DnsPacket; typedef
61 struct DnsPacket { struct
75 DnsPacket *more; argument
93 static inline uint8_t* DNS_PACKET_DATA(const DnsPacket *p) { in DNS_PACKET_DATA() argument
100 return ((uint8_t*) p) + ALIGN(sizeof(DnsPacket)); in DNS_PACKET_DATA()
116 static inline uint16_t DNS_PACKET_RCODE(DnsPacket *p) { in DNS_PACKET_RCODE()
127 static inline uint16_t DNS_PACKET_PAYLOAD_SIZE_MAX(DnsPacket *p) { in DNS_PACKET_PAYLOAD_SIZE_MAX()
140 static inline bool DNS_PACKET_DO(DnsPacket *p) { in DNS_PACKET_DO()
147 static inline bool DNS_PACKET_VERSION_SUPPORTED(DnsPacket *p) { in DNS_PACKET_VERSION_SUPPORTED()
157 static inline bool DNS_PACKET_IS_FRAGMENTED(DnsPacket *p) { in DNS_PACKET_IS_FRAGMENTED()
185 static inline unsigned DNS_PACKET_RRCOUNT(DnsPacket *p) { in DNS_PACKET_RRCOUNT()
192 int dns_packet_new(DnsPacket **p, DnsProtocol protocol, size_t min_alloc_dsize, size_t max_size);
193 int dns_packet_new_query(DnsPacket **p, DnsProtocol protocol, size_t min_alloc_dsize, bool dnssec_c…
195 int dns_packet_dup(DnsPacket **ret, DnsPacket *p);
197 void dns_packet_set_flags(DnsPacket *p, bool dnssec_checking_disabled, bool truncated);
199 DnsPacket *dns_packet_ref(DnsPacket *p);
200 DnsPacket *dns_packet_unref(DnsPacket *p);
202 DEFINE_TRIVIAL_CLEANUP_FUNC(DnsPacket*, dns_packet_unref);
212 int dns_packet_validate(DnsPacket *p);
213 int dns_packet_validate_reply(DnsPacket *p);
214 int dns_packet_validate_query(DnsPacket *p);
216 int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key);
218 int dns_packet_append_blob(DnsPacket *p, const void *d, size_t sz, size_t *start);
219 int dns_packet_append_uint8(DnsPacket *p, uint8_t v, size_t *start);
220 int dns_packet_append_uint16(DnsPacket *p, uint16_t v, size_t *start);
221 int dns_packet_append_uint32(DnsPacket *p, uint32_t v, size_t *start);
222 int dns_packet_append_string(DnsPacket *p, const char *s, size_t *start);
223 int dns_packet_append_raw_string(DnsPacket *p, const void *s, size_t size, size_t *start);
224 int dns_packet_append_label(DnsPacket *p, const char *s, size_t l, bool canonical_candidate, size_t…
225 int dns_packet_append_name(DnsPacket *p, const char *name, bool allow_compression, bool canonical_c…
226 int dns_packet_append_key(DnsPacket *p, const DnsResourceKey *key, const DnsAnswerFlags flags, size…
227 int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAnswerFlags flags, siz…
228 int dns_packet_append_opt(DnsPacket *p, uint16_t max_udp_size, bool edns0_do, bool include_rfc6975,…
229 int dns_packet_append_question(DnsPacket *p, DnsQuestion *q);
230 int dns_packet_append_answer(DnsPacket *p, DnsAnswer *a, unsigned *completed);
232 int dns_packet_patch_max_udp_size(DnsPacket *p, uint16_t max_udp_size);
233 int dns_packet_patch_ttls(DnsPacket *p, usec_t timestamp);
235 void dns_packet_truncate(DnsPacket *p, size_t sz);
236 int dns_packet_truncate_opt(DnsPacket *p);
238 int dns_packet_read(DnsPacket *p, size_t sz, const void **ret, size_t *start);
239 int dns_packet_read_blob(DnsPacket *p, void *d, size_t sz, size_t *start);
240 int dns_packet_read_uint8(DnsPacket *p, uint8_t *ret, size_t *start);
241 int dns_packet_read_uint16(DnsPacket *p, uint16_t *ret, size_t *start);
242 int dns_packet_read_uint32(DnsPacket *p, uint32_t *ret, size_t *start);
243 int dns_packet_read_string(DnsPacket *p, char **ret, size_t *start);
244 int dns_packet_read_raw_string(DnsPacket *p, const void **ret, size_t *size, size_t *start);
245 int dns_packet_read_name(DnsPacket *p, char **ret, bool allow_compression, size_t *start);
246 int dns_packet_read_key(DnsPacket *p, DnsResourceKey **ret, bool *ret_cache_flush_or_qu, size_t *st…
247 int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, bool *ret_cache_flush, size_t *start);
249 void dns_packet_rewind(DnsPacket *p, size_t idx);
251 int dns_packet_skip_question(DnsPacket *p);
252 int dns_packet_extract(DnsPacket *p);
254 bool dns_packet_equal(const DnsPacket *a, const DnsPacket *b);
256 int dns_packet_has_nsid_request(DnsPacket *p);
325 static inline size_t dns_packet_size_max(DnsPacket *p) { in dns_packet_size_max()
347 size_t dns_packet_size_unfragmented(DnsPacket *p);