Functions to send/receive dns packets.
More...
#include "dns.h"
#include "attrs.h"
Go to the source code of this file.
|
static bool | attr_valid (UNUSED fr_dict_t *dict, UNUSED fr_dict_attr_t const *parent, UNUSED char const *name, UNUSED int attr, fr_type_t type, fr_dict_attr_flags_t *flags) |
|
void | fr_dns_global_free (void) |
|
int | fr_dns_global_init (void) |
| Resolve/cache attributes in the DNS dictionary. More...
|
|
fr_dns_labels_t * | fr_dns_labels_get (uint8_t const *packet, size_t packet_len, bool init_mark) |
|
bool | fr_dns_packet_ok (uint8_t const *packet, size_t packet_len, bool query, fr_dns_decode_fail_t *reason) |
|
static bool | fr_dns_tlv_ok (uint8_t const *p, uint8_t const *end, fr_dns_decode_fail_t *reason) |
|
Functions to send/receive dns packets.
- Id
- 567634561b4b0574a3debb0b718d84ca6f943e07
- Copyright
- 2008 The FreeRADIUS server project
-
2021 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file base.c.
◆ dns_option_t
◆ DECODE_FAIL
#define DECODE_FAIL |
( |
|
_reason | ) |
if (reason) *reason = FR_DNS_DECODE_FAIL_ ## _reason |
◆ attr_valid()
◆ fr_dns_global_free()
void fr_dns_global_free |
( |
void |
| ) |
|
◆ fr_dns_global_init()
int fr_dns_global_init |
( |
void |
| ) |
|
Resolve/cache attributes in the DNS dictionary.
- Returns
- 0 on success.
- -1 on failure.
Definition at line 404 of file base.c.
◆ fr_dns_labels_get()
◆ fr_dns_packet_ok()
◆ fr_dns_tlv_ok()
◆ attr_dns_ar
◆ attr_dns_ns
◆ attr_dns_packet
◆ attr_dns_question
◆ attr_dns_rr
◆ dict_dns
◆ dns_dict
Initial value:= {
{ NULL }
}
fr_dict_t const * dict_dns
Definition at line 45 of file base.c.
◆ dns_dict_attr
Initial value:= {
{ NULL }
}
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
fr_dict_attr_t const * attr_dns_ns
fr_dict_attr_t const * attr_dns_packet
fr_dict_attr_t const * attr_dns_question
fr_dict_attr_t const * attr_dns_ar
fr_dict_attr_t const * attr_dns_rr
Definition at line 58 of file base.c.
◆ fr_dns_blocks
◆ fr_dns_labels
◆ fr_dns_marker
_Thread_local uint8_t fr_dns_marker[65536] |
|
static |
◆ fr_dns_packet_names
Initial value:= {
}
@ FR_DNS_STATEFUL_OPERATION
Definition at line 68 of file base.c.
◆ instance_count
◆ libfreeradius_dns_dict_protocol
Initial value:= {
.name = "dns",
.default_type_size = 2,
.default_type_length = 2,
}
int fr_dns_global_init(void)
Resolve/cache attributes in the DNS dictionary.
void fr_dns_global_free(void)
static bool attr_valid(UNUSED fr_dict_t *dict, UNUSED fr_dict_attr_t const *parent, UNUSED char const *name, UNUSED int attr, fr_type_t type, fr_dict_attr_flags_t *flags)
static fr_table_num_ordered_t const subtype_table[]
Definition at line 469 of file base.c.
◆ subtype_table
Initial value:= {
}
#define L(_str)
Helper for initialising arrays of string literals.
@ FLAG_ENCODE_DNS_LABEL
encode as DNS label
@ FLAG_ENCODE_DNS_LABEL_UNCOMPRESSED
encode as uncompressed DNS label
Definition at line 435 of file base.c.