"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "edns.h" between
nsd-4.3.5.tar.gz and nsd-4.3.6.tar.gz

About: NSD is an authoritative only, high performance, simple name server daemon.

edns.h  (nsd-4.3.5):edns.h  (nsd-4.3.6)
skipping to change at line 21 skipping to change at line 21
#define _EDNS_H_ #define _EDNS_H_
#include "buffer.h" #include "buffer.h"
struct nsd; struct nsd;
struct query; struct query;
#define OPT_LEN 9U /* Length of the NSD EDNS response recor d minus 2 */ #define OPT_LEN 9U /* Length of the NSD EDNS response recor d minus 2 */
#define OPT_RDATA 2 /* holds the rdata length comes after OP T_LEN */ #define OPT_RDATA 2 /* holds the rdata length comes after OP T_LEN */
#define OPT_HDR 4U /* NSID opt header length */ #define OPT_HDR 4U /* NSID opt header length */
#define NSID_CODE 3 /* nsid option code */ #define NSID_CODE 3 /* nsid option code */
#define EDE_CODE 15 /* Extended DNS Errors option code */
#define DNSSEC_OK_MASK 0x8000U /* do bit mask */ #define DNSSEC_OK_MASK 0x8000U /* do bit mask */
struct edns_data struct edns_data
{ {
char ok[OPT_LEN]; char ok[OPT_LEN];
char error[OPT_LEN]; char error[OPT_LEN];
char rdata_none[OPT_RDATA]; char rdata_none[OPT_RDATA];
char rdata_nsid[OPT_RDATA]; char rdata_nsid[OPT_RDATA];
char nsid[OPT_HDR]; char nsid[OPT_HDR];
}; };
skipping to change at line 47 skipping to change at line 48
/* EDNS states may be extended in the future */ /* EDNS states may be extended in the future */
EDNS_ERROR EDNS_ERROR
}; };
typedef enum edns_status edns_status_type; typedef enum edns_status edns_status_type;
struct edns_record struct edns_record
{ {
edns_status_type status; edns_status_type status;
size_t position; size_t position;
size_t maxlen; size_t maxlen;
size_t opt_reserved_space; size_t opt_reserved_space;
int dnssec_ok; int dnssec_ok;
int nsid; int nsid;
int ede; /* RFC 8914 - Extended DNS Errors */
char* ede_text; /* RFC 8914 - Extended DNS Errors text*/
uint16_t ede_text_len;
}; };
typedef struct edns_record edns_record_type; typedef struct edns_record edns_record_type;
/* The Extended DNS Error codes (RFC8914) we use */
#define EDE_OTHER 0
#define EDE_NOT_READY 14
#define EDE_PROHIBITED 18
#define EDE_NOT_AUTHORITATIVE 20
#define EDE_NOT_SUPPORTED 21
#define EDE_INVALID_DATA 24
/* ASSIGN_EDE_CODE_AND_STRING_LITERAL may only be used with string literals.
* This is guaranteed by concatenating and empty string to LITERAL, which
* will make compilation fail if this macro is used with variables.
*/
#define ASSIGN_EDE_CODE_AND_STRING_LITERAL(EDE, CODE, LITERAL) \
do { \
EDE = (CODE); \
EDE ## _text = (LITERAL ""); \
EDE ## _text_len = sizeof(LITERAL) - 1; \
} while (0)
void edns_init_data(edns_data_type *data, uint16_t max_length); void edns_init_data(edns_data_type *data, uint16_t max_length);
void edns_init_record(edns_record_type *data); void edns_init_record(edns_record_type *data);
int edns_parse_record(edns_record_type *data, buffer_type *packet, int edns_parse_record(edns_record_type *data, buffer_type *packet,
struct query* q, struct nsd* nsd); struct query* q, struct nsd* nsd);
/* /*
* The amount of space to reserve in the response for the EDNS data * The amount of space to reserve in the response for the EDNS data
* (if required). * (if required).
*/ */
size_t edns_reserved_space(edns_record_type *data); size_t edns_reserved_space(edns_record_type *data);
 End of changes. 4 change blocks. 
1 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)