mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
[master] expand the flags field in dns_master_style
4550. [cleanup] Increased the number of available master file output style flags from 32 to 64. [RT #44043]
This commit is contained in:
parent
86b7ae6b77
commit
2e703d7b61
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
4550. [cleanup] Increased the number of available master file
|
||||||
|
output style flags from 32 to 64. [RT #44043]
|
||||||
|
|
||||||
4549. [func] Added support for the EDNS TCP Keepalive option
|
4549. [func] Added support for the EDNS TCP Keepalive option
|
||||||
(RFC 7828). [RT #42126]
|
(RFC 7828). [RT #42126]
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ typedef struct dns_master_style dns_master_style_t;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*% Omit the owner name when possible. */
|
/*% Omit the owner name when possible. */
|
||||||
#define DNS_STYLEFLAG_OMIT_OWNER 0x00010000U
|
#define DNS_STYLEFLAG_OMIT_OWNER 0x000010000ULL
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Omit the TTL when possible. If DNS_STYLEFLAG_TTL is
|
* Omit the TTL when possible. If DNS_STYLEFLAG_TTL is
|
||||||
@ -58,53 +58,56 @@ typedef struct dns_master_style dns_master_style_t;
|
|||||||
* versions of BIND which use the SOA MINTTL as a
|
* versions of BIND which use the SOA MINTTL as a
|
||||||
* default TTL value.
|
* default TTL value.
|
||||||
*/
|
*/
|
||||||
#define DNS_STYLEFLAG_OMIT_TTL 0x00020000U
|
#define DNS_STYLEFLAG_OMIT_TTL 0x000020000ULL
|
||||||
|
|
||||||
/*% Omit the class when possible. */
|
/*% Omit the class when possible. */
|
||||||
#define DNS_STYLEFLAG_OMIT_CLASS 0x00040000U
|
#define DNS_STYLEFLAG_OMIT_CLASS 0x000040000ULL
|
||||||
|
|
||||||
/*% Output $TTL directives. */
|
/*% Output $TTL directives. */
|
||||||
#define DNS_STYLEFLAG_TTL 0x00080000U
|
#define DNS_STYLEFLAG_TTL 0x000080000ULL
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Output $ORIGIN directives and print owner names relative to
|
* Output $ORIGIN directives and print owner names relative to
|
||||||
* the origin when possible.
|
* the origin when possible.
|
||||||
*/
|
*/
|
||||||
#define DNS_STYLEFLAG_REL_OWNER 0x00100000U
|
#define DNS_STYLEFLAG_REL_OWNER 0x000100000ULL
|
||||||
|
|
||||||
/*% Print domain names in RR data in relative form when possible.
|
/*% Print domain names in RR data in relative form when possible.
|
||||||
For this to take effect, DNS_STYLEFLAG_REL_OWNER must also be set. */
|
For this to take effect, DNS_STYLEFLAG_REL_OWNER must also be set. */
|
||||||
#define DNS_STYLEFLAG_REL_DATA 0x00200000U
|
#define DNS_STYLEFLAG_REL_DATA 0x000200000ULL
|
||||||
|
|
||||||
/*% Print the trust level of each rdataset. */
|
/*% Print the trust level of each rdataset. */
|
||||||
#define DNS_STYLEFLAG_TRUST 0x00400000U
|
#define DNS_STYLEFLAG_TRUST 0x000400000ULL
|
||||||
|
|
||||||
/*% Print negative caching entries. */
|
/*% Print negative caching entries. */
|
||||||
#define DNS_STYLEFLAG_NCACHE 0x00800000U
|
#define DNS_STYLEFLAG_NCACHE 0x000800000ULL
|
||||||
|
|
||||||
/*% Never print the TTL. */
|
/*% Never print the TTL. */
|
||||||
#define DNS_STYLEFLAG_NO_TTL 0x01000000U
|
#define DNS_STYLEFLAG_NO_TTL 0x001000000ULL
|
||||||
|
|
||||||
/*% Never print the CLASS. */
|
/*% Never print the CLASS. */
|
||||||
#define DNS_STYLEFLAG_NO_CLASS 0x02000000U
|
#define DNS_STYLEFLAG_NO_CLASS 0x002000000ULL
|
||||||
|
|
||||||
/*% Report re-signing time. */
|
/*% Report re-signing time. */
|
||||||
#define DNS_STYLEFLAG_RESIGN 0x04000000U
|
#define DNS_STYLEFLAG_RESIGN 0x004000000ULL
|
||||||
|
|
||||||
/*% Don't printout the cryptographic parts of DNSSEC records. */
|
/*% Don't printout the cryptographic parts of DNSSEC records. */
|
||||||
#define DNS_STYLEFLAG_NOCRYPTO 0x08000000U
|
#define DNS_STYLEFLAG_NOCRYPTO 0x008000000ULL
|
||||||
|
|
||||||
/*% Comment out data by prepending with ";" */
|
/*% Comment out data by prepending with ";" */
|
||||||
#define DNS_STYLEFLAG_COMMENTDATA 0x10000000U
|
#define DNS_STYLEFLAG_COMMENTDATA 0x010000000ULL
|
||||||
|
|
||||||
/*% Print TTL with human-readable units. */
|
/*% Print TTL with human-readable units. */
|
||||||
#define DNS_STYLEFLAG_TTL_UNITS 0x20000000U
|
#define DNS_STYLEFLAG_TTL_UNITS 0x020000000ULL
|
||||||
|
|
||||||
/*% Indent output. */
|
/*% Indent output. */
|
||||||
#define DNS_STYLEFLAG_INDENT 0x40000000U
|
#define DNS_STYLEFLAG_INDENT 0x040000000ULL
|
||||||
|
|
||||||
/*% Output in YAML style. */
|
/*% Output in YAML style. */
|
||||||
#define DNS_STYLEFLAG_YAML 0x80000000U
|
#define DNS_STYLEFLAG_YAML 0x080000000ULL
|
||||||
|
|
||||||
|
/*% Print ECS cache entries as comments (reserved for future use). */
|
||||||
|
#define DNS_STYLEFLAG_ECSCACHE 0x100000000ULL
|
||||||
|
|
||||||
ISC_LANG_BEGINDECLS
|
ISC_LANG_BEGINDECLS
|
||||||
|
|
||||||
@ -399,7 +402,7 @@ dns_master_dumpnode(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||||||
dns_dbnode_t *node, const dns_name_t *name,
|
dns_dbnode_t *node, const dns_name_t *name,
|
||||||
const dns_master_style_t *style, const char *filename);
|
const dns_master_style_t *style, const char *filename);
|
||||||
|
|
||||||
unsigned int
|
dns_masterstyle_flags_t
|
||||||
dns_master_styleflags(const dns_master_style_t *style);
|
dns_master_styleflags(const dns_master_style_t *style);
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
|
@ -156,17 +156,17 @@ struct dns_rdata {
|
|||||||
|
|
||||||
/*% Split the rdata into multiple lines to try to keep it
|
/*% Split the rdata into multiple lines to try to keep it
|
||||||
within the "width". */
|
within the "width". */
|
||||||
#define DNS_STYLEFLAG_MULTILINE 0x00000001U
|
#define DNS_STYLEFLAG_MULTILINE 0x00000001ULL
|
||||||
|
|
||||||
/*% Output explanatory comments. */
|
/*% Output explanatory comments. */
|
||||||
#define DNS_STYLEFLAG_COMMENT 0x00000002U
|
#define DNS_STYLEFLAG_COMMENT 0x00000002ULL
|
||||||
#define DNS_STYLEFLAG_RRCOMMENT 0x00000004U
|
#define DNS_STYLEFLAG_RRCOMMENT 0x00000004ULL
|
||||||
|
|
||||||
/*% Output KEYDATA in human readable format. */
|
/*% Output KEYDATA in human readable format. */
|
||||||
#define DNS_STYLEFLAG_KEYDATA 0x00000008U
|
#define DNS_STYLEFLAG_KEYDATA 0x00000008ULL
|
||||||
|
|
||||||
/*% Output textual RR type and RDATA in RFC 3597 unknown format */
|
/*% Output textual RR type and RDATA in RFC 3597 unknown format */
|
||||||
#define DNS_STYLEFLAG_UNKNOWNFORMAT 0x00000010U
|
#define DNS_STYLEFLAG_UNKNOWNFORMAT 0x00000010ULL
|
||||||
|
|
||||||
#define DNS_RDATA_DOWNCASE DNS_NAME_DOWNCASE
|
#define DNS_RDATA_DOWNCASE DNS_NAME_DOWNCASE
|
||||||
#define DNS_RDATA_CHECKNAMES DNS_NAME_CHECKNAMES
|
#define DNS_RDATA_CHECKNAMES DNS_NAME_CHECKNAMES
|
||||||
|
@ -95,6 +95,7 @@ typedef isc_uint16_t dns_keytag_t;
|
|||||||
typedef struct dns_loadctx dns_loadctx_t;
|
typedef struct dns_loadctx dns_loadctx_t;
|
||||||
typedef struct dns_loadmgr dns_loadmgr_t;
|
typedef struct dns_loadmgr dns_loadmgr_t;
|
||||||
typedef struct dns_masterrawheader dns_masterrawheader_t;
|
typedef struct dns_masterrawheader dns_masterrawheader_t;
|
||||||
|
typedef isc_uint64_t dns_masterstyle_flags_t;
|
||||||
typedef struct dns_message dns_message_t;
|
typedef struct dns_message dns_message_t;
|
||||||
typedef isc_uint16_t dns_messageid_t;
|
typedef isc_uint16_t dns_messageid_t;
|
||||||
typedef isc_region_t dns_label_t;
|
typedef isc_region_t dns_label_t;
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/task.h>
|
#include <isc/task.h>
|
||||||
#include <isc/time.h>
|
#include <isc/time.h>
|
||||||
|
#include <isc/types.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
#include <dns/db.h>
|
#include <dns/db.h>
|
||||||
@ -57,7 +58,7 @@
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
struct dns_master_style {
|
struct dns_master_style {
|
||||||
unsigned int flags; /* DNS_STYLEFLAG_* */
|
dns_masterstyle_flags_t flags; /* DNS_STYLEFLAG_* */
|
||||||
unsigned int ttl_column;
|
unsigned int ttl_column;
|
||||||
unsigned int class_column;
|
unsigned int class_column;
|
||||||
unsigned int type_column;
|
unsigned int type_column;
|
||||||
@ -2067,7 +2068,7 @@ dns_master_dumpnode(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
dns_masterstyle_flags_t
|
||||||
dns_master_styleflags(const dns_master_style_t *style) {
|
dns_master_styleflags(const dns_master_style_t *style) {
|
||||||
REQUIRE(style != NULL);
|
REQUIRE(style != NULL);
|
||||||
return (style->flags);
|
return (style->flags);
|
||||||
|
@ -3299,7 +3299,8 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section,
|
|||||||
dns_rdataset_t *rdataset;
|
dns_rdataset_t *rdataset;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
isc_boolean_t seensoa = ISC_FALSE;
|
isc_boolean_t seensoa = ISC_FALSE;
|
||||||
unsigned int sflags, saveindent;
|
unsigned int saveindent;
|
||||||
|
dns_masterstyle_flags_t sflags;
|
||||||
|
|
||||||
REQUIRE(DNS_MESSAGE_VALID(msg));
|
REQUIRE(DNS_MESSAGE_VALID(msg));
|
||||||
REQUIRE(target != NULL);
|
REQUIRE(target != NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user