From c9611b45736af157e2993c6ef852e55e8e24ca83 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 24 Jan 2013 14:20:48 -0800 Subject: [PATCH] [master] change "fast" to "map" 3475. [cleanup] Changed name of 'map' zone file format (previously 'fast'). [RT #32458] --- CHANGES | 7 ++++-- bin/check/named-checkzone.c | 8 +++---- bin/check/named-checkzone.docbook | 6 ++--- bin/dnssec/dnssec-signzone.c | 8 +++---- bin/dnssec/dnssec-signzone.docbook | 8 +++---- bin/named/named.conf.docbook | 6 ++--- bin/named/zoneconf.c | 12 +++++----- bin/tests/system/masterformat/clean.sh | 6 ++--- bin/tests/system/masterformat/ns1/compile.sh | 6 ++--- bin/tests/system/masterformat/ns3/named.conf | 8 +++---- bin/tests/system/masterformat/tests.sh | 24 ++++++++++---------- configure.in | 4 ++-- doc/arm/Bv9ARM-book.xml | 22 +++++++++--------- lib/dns/Makefile.in | 4 ++-- lib/dns/include/dns/callbacks.h | 2 +- lib/dns/include/dns/db.h | 4 ++-- lib/dns/include/dns/master.h | 2 +- lib/dns/include/dns/types.h | 2 +- lib/dns/include/dns/version.h | 2 +- lib/dns/{fastapi => mapapi} | 6 ++--- lib/dns/master.c | 22 +++++++++--------- lib/dns/masterdump.c | 14 ++++++------ lib/dns/rbt.c | 8 +++---- lib/dns/rbtdb.c | 4 ++-- lib/dns/version.c | 2 +- lib/export/dns/Makefile.in | 4 ++-- lib/isccfg/namedconf.c | 2 +- 27 files changed, 103 insertions(+), 100 deletions(-) rename lib/dns/{fastapi => mapapi} (82%) diff --git a/CHANGES b/CHANGES index 978a37ad0a..918ec5da91 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3475. [cleanup] Changed name of 'map' zone file format (previously + 'fast'). [RT #32458] + 3474. [bug] nsupdate could assert when the local and remote address families didn't match. [RT #22897] @@ -416,12 +419,12 @@ to ensure correctness of signatures and of NSEC/NSEC3 chains. [RT #23673] -3340. [func] Added new 'fast' zone file format, which is an image +3340. [func] Added new 'map' zone file format, which is an image of a zone database that can be loaded directly into memory via mmap(), allowing much faster zone loading. (Note: Because of pointer sizes and other considerations, this file format is platform-dependent; - 'fast' zone files cannot always be transferred from one + 'map' zone files cannot always be transferred from one server to another.) [RT #25419] 3339. [func] Allow the maximum supported rsa exponent size to be diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index 4abd7a8ca4..8d978569e3 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -429,8 +429,8 @@ main(int argc, char **argv) { inputformat = dns_masterformat_raw; fprintf(stderr, "WARNING: input format raw, version ignored\n"); - } else if (strcasecmp(inputformatstr, "fast") == 0) { - inputformat = dns_masterformat_fast; + } else if (strcasecmp(inputformatstr, "map") == 0) { + inputformat = dns_masterformat_map; } else { fprintf(stderr, "unknown file format: %s\n", inputformatstr); @@ -454,8 +454,8 @@ main(int argc, char **argv) { "unknown raw format version\n"); exit(1); } - } else if (strcasecmp(outputformatstr, "fast") == 0) { - outputformat = dns_masterformat_fast; + } else if (strcasecmp(outputformatstr, "map") == 0) { + outputformat = dns_masterformat_map; } else { fprintf(stderr, "unknown file format: %s\n", outputformatstr); diff --git a/bin/check/named-checkzone.docbook b/bin/check/named-checkzone.docbook index 9341550e5b..934993dfce 100644 --- a/bin/check/named-checkzone.docbook +++ b/bin/check/named-checkzone.docbook @@ -256,7 +256,7 @@ Specify the format of the zone file. Possible formats are "text" (default), - "raw", and "fast". + "raw", and "map". @@ -273,7 +273,7 @@ Possible formats are "text" (default), which is the standard textual representation of the zone, - and "fast", "raw", + and "map", "raw", and "raw=N", which store the zone in a binary format for rapid loading by named. "raw=N" specifies the format version of @@ -303,7 +303,7 @@ -L serial - When compiling a zone to "raw" or "fast" format, set the + When compiling a zone to "raw" or "map" format, set the "source serial" value in the header to the specified serial number. (This is expected to be used primarily for testing purposes.) diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index c3403ffcba..5be654d7e5 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -3404,8 +3404,8 @@ main(int argc, char *argv[]) { if (inputformatstr != NULL) { if (strcasecmp(inputformatstr, "text") == 0) inputformat = dns_masterformat_text; - else if (strcasecmp(inputformatstr, "fast") == 0) - inputformat = dns_masterformat_fast; + else if (strcasecmp(inputformatstr, "map") == 0) + inputformat = dns_masterformat_map; else if (strcasecmp(inputformatstr, "raw") == 0) inputformat = dns_masterformat_raw; else if (strncasecmp(inputformatstr, "raw=", 4) == 0) { @@ -3423,8 +3423,8 @@ main(int argc, char *argv[]) { } else if (strcasecmp(outputformatstr, "full") == 0) { outputformat = dns_masterformat_text; masterstyle = &dns_master_style_full; - } else if (strcasecmp(outputformatstr, "fast") == 0) { - outputformat = dns_masterformat_fast; + } else if (strcasecmp(outputformatstr, "map") == 0) { + outputformat = dns_masterformat_map; } else if (strcasecmp(outputformatstr, "raw") == 0) { outputformat = dns_masterformat_raw; } else if (strncasecmp(outputformatstr, "raw=", 4) == 0) { diff --git a/bin/dnssec/dnssec-signzone.docbook b/bin/dnssec/dnssec-signzone.docbook index 5e07467a47..c07fd457e6 100644 --- a/bin/dnssec/dnssec-signzone.docbook +++ b/bin/dnssec/dnssec-signzone.docbook @@ -168,7 +168,7 @@ included. The resulting file can be included in the original zone file with $INCLUDE. This option cannot be combined with , - , or serial number updating. + , or serial number updating. @@ -339,7 +339,7 @@ The format of the input zone file. Possible formats are "text" (default), - "raw", and "fast". + "raw", and "map". This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non-text format containing updates can be signed directly. @@ -377,7 +377,7 @@ -L serial - When writing a signed zone to "raw" or "fast" format, set the + When writing a signed zone to "raw" or "map" format, set the "source serial" value in the header to the specified serial number. (This is expected to be used primarily for testing purposes.) @@ -452,7 +452,7 @@ which is the standard textual representation of the zone; "full", which is text output in a format suitable for processing by external scripts; - and "fast", "raw", + and "map", "raw", and "raw=N", which store the zone in binary formats for rapid loading by named. "raw=N" specifies the format version of diff --git a/bin/named/named.conf.docbook b/bin/named/named.conf.docbook index 1063ddf2d5..fae10f2cee 100644 --- a/bin/named/named.conf.docbook +++ b/bin/named/named.conf.docbook @@ -320,7 +320,7 @@ options { update-check-ksk boolean; dnssec-dnskey-kskonly boolean; - masterfile-format ( text | raw | fast ); + masterfile-format ( text | raw | map ); notify notifytype; notify-source ( ipv4_address | * ) port ( integer | * ) ; notify-source-v6 ( ipv6_address | * ) port ( integer | * ) ; @@ -509,7 +509,7 @@ view string optional_class update-check-ksk boolean; dnssec-dnskey-kskonly boolean; - masterfile-format ( text | raw | fast ); + masterfile-format ( text | raw | map ); notify notifytype; notify-source ( ipv4_address | * ) port ( integer | * ) ; notify-source-v6 ( ipv6_address | * ) port ( integer | * ) ; @@ -606,7 +606,7 @@ zone string optional_class update-check-ksk boolean; dnssec-dnskey-kskonly boolean; - masterfile-format ( text | raw | fast ); + masterfile-format ( text | raw | map ); notify notifytype; notify-source ( ipv4_address | * ) port ( integer | * ) ; notify-source-v6 ( ipv6_address | * ) port ( integer | * ) ; diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 231d6ebb8d..7698c21db4 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -954,8 +954,8 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, masterformat = dns_masterformat_text; else if (strcasecmp(masterformatstr, "raw") == 0) masterformat = dns_masterformat_raw; - else if (strcasecmp(masterformatstr, "fast") == 0) - masterformat = dns_masterformat_fast; + else if (strcasecmp(masterformatstr, "map") == 0) + masterformat = dns_masterformat_map; else INSIST(0); } @@ -1395,12 +1395,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKWILDCARD, check); /* - * With fast files, the default is ignore duplicate + * With map files, the default is ignore duplicate * records. With other master formats, the default is * taken from the global configuration. */ obj = NULL; - if (masterformat != dns_masterformat_fast) { + if (masterformat != dns_masterformat_map) { result = ns_config_get(maps, "check-dup-records", &obj); INSIST(result == ISC_R_SUCCESS && obj != NULL); dupcheck = cfg_obj_asstring(obj); @@ -1441,12 +1441,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail); /* - * With fast files, the default is *not* to check + * With map files, the default is *not* to check * integrity. With other master formats, the default is * taken from the global configuration. */ obj = NULL; - if (masterformat != dns_masterformat_fast) { + if (masterformat != dns_masterformat_map) { result = ns_config_get(maps, "check-integrity", &obj); INSIST(result == ISC_R_SUCCESS && obj != NULL); dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKINTEGRITY, diff --git a/bin/tests/system/masterformat/clean.sh b/bin/tests/system/masterformat/clean.sh index 147add73b3..e88311a0bd 100755 --- a/bin/tests/system/masterformat/clean.sh +++ b/bin/tests/system/masterformat/clean.sh @@ -21,7 +21,7 @@ rm -f ns1/example.db.raw* rm -f ns1/example.db.compat rm -f ns1/example.db.serial.raw rm -f ns1/large.db ns1/large.db.raw -rm -f ns1/example.db.fast +rm -f ns1/example.db.map rm -f dig.out.* rm -f dig.out rm -f */named.memstats @@ -30,6 +30,6 @@ rm -f ns2/transfer.db.* rm -f ns2/formerly-text.db rm -f ns2/db-* rm -f ns2/large.bk -rm -f ns3/example.db.fast ns3/dynamic.db.fast -rm -f baseline.txt text.1 text.2 raw.1 raw.2 fast.1 fast.2 +rm -f ns3/example.db.map ns3/dynamic.db.map +rm -f baseline.txt text.1 text.2 raw.1 raw.2 map.1 map.2 diff --git a/bin/tests/system/masterformat/ns1/compile.sh b/bin/tests/system/masterformat/ns1/compile.sh index be5389e766..6581ca83fd 100755 --- a/bin/tests/system/masterformat/ns1/compile.sh +++ b/bin/tests/system/masterformat/ns1/compile.sh @@ -16,9 +16,9 @@ ../named-compilezone -D -F raw -o example.db.raw example \ example.db > /dev/null 2>&1 -../named-compilezone -D -F fast -o ../ns3/example.db.fast example \ +../named-compilezone -D -F map -o ../ns3/example.db.map example \ example.db > /dev/null 2>&1 -../named-compilezone -D -F fast -o ../ns3/dynamic.db.fast dynamic \ +../named-compilezone -D -F map -o ../ns3/dynamic.db.map dynamic \ example.db > /dev/null 2>&1 ../named-compilezone -D -F raw=1 -o example.db.raw1 example-explicit \ example.db > /dev/null 2>&1 @@ -27,6 +27,6 @@ ../named-compilezone -D -F raw -L 3333 -o example.db.serial.raw example \ example.db > /dev/null 2>&1 ../named-compilezone -D -F raw -o large.db.raw large large.db > /dev/null 2>&1 -../named-compilezone -D -F fast -o example.db.fast example-fast \ +../named-compilezone -D -F map -o example.db.map example-map \ example.db > /dev/null 2>&1 diff --git a/bin/tests/system/masterformat/ns3/named.conf b/bin/tests/system/masterformat/ns3/named.conf index e7e92aff7f..2ff13e7bee 100644 --- a/bin/tests/system/masterformat/ns3/named.conf +++ b/bin/tests/system/masterformat/ns3/named.conf @@ -41,14 +41,14 @@ controls { zone "example" { type master; - masterfile-format fast; - file "example.db.fast"; + masterfile-format map; + file "example.db.map"; }; zone "dynamic" { type master; - masterfile-format fast; - file "dynamic.db.fast"; + masterfile-format map; + file "dynamic.db.map"; allow-update { any; }; }; diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index bfd0c8249e..728cc2141f 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -19,7 +19,7 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -isfast () { +ismap () { perl -e 'binmode STDIN; read(STDIN, $input, 8); ($style, $version) = unpack("NN", $input); @@ -41,7 +41,7 @@ rawversion () { if (length($input) < 8) { print "not raw\n"; exit 0; }; ($style, $version) = unpack("NN", $input); print ($style == 2 || $style == 3 ? "$version\n" : - "not raw or fast\n");' < $1 + "not raw or map\n");' < $1 } sourceserial () { @@ -91,11 +91,11 @@ ret=0 israw ns1/example.db.raw || ret=1 israw ns1/example.db.raw1 || ret=1 israw ns1/example.db.compat || ret=1 -isfast ns1/example.db.fast || ret=1 +ismap ns1/example.db.map || ret=1 [ "`rawversion ns1/example.db.raw`" = 1 ] || ret=1 [ "`rawversion ns1/example.db.raw1`" = 1 ] || ret=1 [ "`rawversion ns1/example.db.compat`" = 0 ] || ret=1 -[ "`rawversion ns1/example.db.fast`" = 1 ] || ret=1 +[ "`rawversion ns1/example.db.map`" = 1 ] || ret=1 [ $ret -eq 0 ] || echo "I:failed" status=`expr $status + $ret` @@ -150,26 +150,26 @@ done sleep 1 done -echo "I:checking format transitions: text->raw->fast->text" +echo "I:checking format transitions: text->raw->map->text" ret=0 ./named-compilezone -D -f text -F text -o baseline.txt example.nil ns1/example.db > /dev/null ./named-compilezone -D -f text -F raw -o raw.1 example.nil baseline.txt > /dev/null -./named-compilezone -D -f raw -F fast -o fast.1 example.nil raw.1 > /dev/null -./named-compilezone -D -f fast -F text -o text.1 example.nil fast.1 > /dev/null +./named-compilezone -D -f raw -F map -o map.1 example.nil raw.1 > /dev/null +./named-compilezone -D -f map -F text -o text.1 example.nil map.1 > /dev/null cmp -s baseline.txt text.1 || ret=0 [ $ret -eq 0 ] || echo "I:failed" status=`expr $status + $ret` -echo "I:checking format transitions: text->fast->raw->text" +echo "I:checking format transitions: text->map->raw->text" ret=0 -./named-compilezone -D -f text -F fast -o fast.2 example.nil baseline.txt > /dev/null -./named-compilezone -D -f fast -F raw -o raw.2 example.nil fast.2 > /dev/null +./named-compilezone -D -f text -F map -o map.2 example.nil baseline.txt > /dev/null +./named-compilezone -D -f map -F raw -o raw.2 example.nil map.2 > /dev/null ./named-compilezone -D -f raw -F text -o text.2 example.nil raw.2 > /dev/null cmp -s baseline.txt text.2 || ret=0 [ $ret -eq 0 ] || echo "I:failed" status=`expr $status + $ret` -echo "I:checking fast format loading with journal file rollforward" +echo "I:checking map format loading with journal file rollforward" ret=0 $NSUPDATE < /dev/null || status=1 server 10.53.0.3 5300 @@ -197,7 +197,7 @@ grep "NXDOMAIN" dig.out.dynamic.3.4 > /dev/null 2>&1 || ret=1 [ $ret -eq 0 ] || echo "I:failed" status=`expr $status + $ret` -echo "I:checking fast format file dumps correctly" +echo "I:checking map format file dumps correctly" ret=0 $NSUPDATE < /dev/null || status=1 server 10.53.0.3 5300 diff --git a/configure.in b/configure.in index 964698151d..79e16221c6 100644 --- a/configure.in +++ b/configure.in @@ -3362,8 +3362,8 @@ LIBISCCFG_API=$srcdir/lib/isccfg/api AC_SUBST_FILE(LIBDNS_API) LIBDNS_API=$srcdir/lib/dns/api -AC_SUBST_FILE(LIBDNS_FASTAPI) -LIBDNS_FASTAPI=$srcdir/lib/dns/fastapi +AC_SUBST_FILE(LIBDNS_MAPAPI) +LIBDNS_MAPAPI=$srcdir/lib/dns/mapapi AC_SUBST_FILE(LIBBIND9_API) LIBBIND9_API=$srcdir/lib/bind9/api diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 47826a1b49..957831c0ef 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -5351,7 +5351,7 @@ badresp:1,adberr:0,findfail:0,valfail:0] clients-per-query number ; max-clients-per-query number ; masterfile-format - (text|raw|fast) ; + (text|raw|map) ; empty-server name ; empty-contact name ; empty-zones-enable yes_or_no ; @@ -9023,7 +9023,7 @@ avoid-v6-udp-ports { 40000; range 50000 60000; }; a zone file in the raw format must be generated with the same check level as that specified in the named configuration - file. Also, fast format files are + file. Also, map format files are loaded directly into memory via memory mapping, with only minimal checking. @@ -10525,7 +10525,7 @@ view "external" { check-integrity yes_or_no ; dialup dialup_option ; file string ; - masterfile-format (text|raw|fast) ; + masterfile-format (text|raw|map) ; journal string ; max-journal-size size_spec; forward (only|first) ; @@ -10580,7 +10580,7 @@ zone zone_name class check-names (warn|fail|ignore) ; dialup dialup_option ; file string ; - masterfile-format (text|raw|fast) ; + masterfile-format (text|raw|map) ; journal string ; max-journal-size size_spec; forward (only|first) ; @@ -10641,7 +10641,7 @@ zone zone_name class dialup dialup_option ; delegation-only yes_or_no ; file string ; - masterfile-format (text|raw|fast) ; + masterfile-format (text|raw|map) ; forward (only|first) ; forwarders { ip_addr port ip_port ; ... }; masters port ip_port { ( masters_list | ip_addr @@ -10684,7 +10684,7 @@ zone zone_name class"." class { type redirect; file string ; - masterfile-format (text|raw|fast) ; + masterfile-format (text|raw|map) ; allow-query { address_match_list }; }; @@ -13771,7 +13771,7 @@ HOST-127.EXAMPLE. MX 0 . parsing text, load time is significantly reduced. - An even faster alternative is the fast + An even faster alternative is the map format, which is an image of a BIND 9 in-memory zone database; it is capable of being loaded directly into memory via the mmap() @@ -13780,7 +13780,7 @@ HOST-127.EXAMPLE. MX 0 . For a primary server, a zone file in - raw or fast + raw or map format is expected to be generated from a textual zone file by the named-compilezone command. For a secondary server or for a dynamic zone, it is automatically @@ -13798,8 +13798,8 @@ HOST-127.EXAMPLE. MX 0 . named-compilezone command again. - Note that fast format is extremely - architecture-specific. A fast + Note that map format is extremely + architecture-specific. A map file cannot be used on a system with different pointer size, endianness or data alignment than the system on which it was generated, and should in @@ -13810,7 +13810,7 @@ HOST-127.EXAMPLE. MX 0 . possible, it is also primarily expected to be used inside the same single system. To export a zone file in either raw or - fast format, or make a + map format, or make a portable backup of such a file, conversion to text format is recommended. diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in index 3a893f47af..82e4844ebb 100644 --- a/lib/dns/Makefile.in +++ b/lib/dns/Makefile.in @@ -26,7 +26,7 @@ top_srcdir = @top_srcdir@ @BIND9_VERSION@ @BIND9_MAJOR@ -@LIBDNS_FASTAPI@ +@LIBDNS_MAPAPI@ @LIBDNS_API@ @@ -118,7 +118,7 @@ version.@O@: version.c ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ -DVERSION=\"${VERSION}\" \ -DMAJOR=\"${MAJOR}\" \ - -DFASTAPI=\"${FASTAPI}\" \ + -DMAPAPI=\"${MAPAPI}\" \ -DLIBINTERFACE=${LIBINTERFACE} \ -DLIBREVISION=${LIBREVISION} \ -DLIBAGE=${LIBAGE} \ diff --git a/lib/dns/include/dns/callbacks.h b/lib/dns/include/dns/callbacks.h index 2963cdb845..352d668de2 100644 --- a/lib/dns/include/dns/callbacks.h +++ b/lib/dns/include/dns/callbacks.h @@ -49,7 +49,7 @@ struct dns_rdatacallbacks { dns_addrdatasetfunc_t add; /*% - * This is called when reading in a database image from a 'fast' + * This is called when reading in a database image from a 'map' * format zone file. */ dns_deserializefunc_t deserialize; diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h index 3ad42ca6cf..b1a0396ff1 100644 --- a/lib/dns/include/dns/db.h +++ b/lib/dns/include/dns/db.h @@ -485,7 +485,7 @@ dns_db_beginload(dns_db_t *db, dns_rdatacallbacks_t *callbacks); * file. callbacks->add_private will be a valid DB load context * which should be used as 'arg' when callbacks->add is called. * callbacks->deserialize will be a valid dns_deserialize_func_t - * suitable for loading 'db' from a fast format zone file. + * suitable for loading 'db' from a map format zone file. * * Returns: * @@ -561,7 +561,7 @@ dns_db_load3(dns_db_t *db, const char *filename, dns_masterformat_t format, isc_result_t dns_db_serialize(dns_db_t *db, dns_dbversion_t *version, FILE *rbtfile); /*%< - * Dump version 'version' of 'db' to fast file 'filename'. + * Dump version 'version' of 'db' to map-format file 'filename'. * * Requires: * diff --git a/lib/dns/include/dns/master.h b/lib/dns/include/dns/master.h index 22a9a9c6ea..3244c54253 100644 --- a/lib/dns/include/dns/master.h +++ b/lib/dns/include/dns/master.h @@ -80,7 +80,7 @@ struct dns_masterrawheader { isc_uint32_t format; /* must be * dns_masterformat_raw * or - * dns_masterformat_fast */ + * dns_masterformat_map */ isc_uint32_t version; /* compatibility for future * extensions */ isc_uint32_t dumptime; /* timestamp on creation diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h index 2aa7459986..5eb8836110 100644 --- a/lib/dns/include/dns/types.h +++ b/lib/dns/include/dns/types.h @@ -193,7 +193,7 @@ typedef enum { dns_masterformat_none = 0, dns_masterformat_text = 1, dns_masterformat_raw = 2, - dns_masterformat_fast = 3 + dns_masterformat_map = 3 } dns_masterformat_t; typedef enum { diff --git a/lib/dns/include/dns/version.h b/lib/dns/include/dns/version.h index 6143ce2452..7c09d7991c 100644 --- a/lib/dns/include/dns/version.h +++ b/lib/dns/include/dns/version.h @@ -23,7 +23,7 @@ LIBDNS_EXTERNAL_DATA extern const char dns_version[]; LIBDNS_EXTERNAL_DATA extern const char dns_major[]; -LIBDNS_EXTERNAL_DATA extern const char dns_fastapi[]; +LIBDNS_EXTERNAL_DATA extern const char dns_mapapi[]; LIBDNS_EXTERNAL_DATA extern const unsigned int dns_libinterface; LIBDNS_EXTERNAL_DATA extern const unsigned int dns_librevision; diff --git a/lib/dns/fastapi b/lib/dns/mapapi similarity index 82% rename from lib/dns/fastapi rename to lib/dns/mapapi index 0d5cbe3763..90bf250095 100644 --- a/lib/dns/fastapi +++ b/lib/dns/mapapi @@ -1,5 +1,5 @@ # This value should be increased whenever changing the structure of -# any object that will appear in a type 'fast' master file (which +# any object that will appear in a type 'map' master file (which # contains a working memory image of an RBT database), as loading # an incorrect memory image produces an inconsistent and probably # nonfunctional database. These structures include but are not @@ -7,10 +7,10 @@ # rbt_file_header, dns_rbtdb, dns_rbt, dns_rbtnode, rdatasetheader. # # Err on the side of caution: if anything in the RBTDB is changed, -# bump the value. Making fast files unreadable protects the system +# bump the value. Making map files unreadable protects the system # from instability; it's a feature not a bug. # # Whenever releasing a new major release of BIND9, set this value # back to 1.0 when releasing the first alpha. Fast files are *never* # compatible across major releases. -FASTAPI=1.0 +MAPAPI=1.0 diff --git a/lib/dns/master.c b/lib/dns/master.c index 0c7ea103a2..caa5d2e994 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -184,10 +184,10 @@ static isc_result_t load_raw(dns_loadctx_t *lctx); static isc_result_t -openfile_fast(dns_loadctx_t *lctx, const char *master_file); +openfile_map(dns_loadctx_t *lctx, const char *master_file); static isc_result_t -load_fast(dns_loadctx_t *lctx); +load_map(dns_loadctx_t *lctx); static isc_result_t pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx); @@ -568,9 +568,9 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx, lctx->openfile = openfile_raw; lctx->load = load_raw; break; - case dns_masterformat_fast: - lctx->openfile = openfile_fast; - lctx->load = load_fast; + case dns_masterformat_map: + lctx->openfile = openfile_map; + lctx->load = load_map; break; } @@ -2107,7 +2107,7 @@ load_header(dns_loadctx_t *lctx) { REQUIRE(DNS_LCTX_VALID(lctx)); if (lctx->format != dns_masterformat_raw && - lctx->format != dns_masterformat_fast) + lctx->format != dns_masterformat_map) return (ISC_R_NOTIMPLEMENTED); callbacks = lctx->callbacks; @@ -2129,8 +2129,8 @@ load_header(dns_loadctx_t *lctx) { if (header.format != lctx->format) { (*callbacks->error)(callbacks, "dns_master_load: " "file format mismatch (not %s)", - lctx->format == dns_masterformat_fast - ? "fast" + lctx->format == dns_masterformat_map + ? "map" : "raw"); return (ISC_R_NOTIMPLEMENTED); } @@ -2174,7 +2174,7 @@ load_header(dns_loadctx_t *lctx) { } static isc_result_t -openfile_fast(dns_loadctx_t *lctx, const char *master_file) { +openfile_map(dns_loadctx_t *lctx, const char *master_file) { isc_result_t result; result = isc_stdio_open(master_file, "rb", &lctx->f); @@ -2188,10 +2188,10 @@ openfile_fast(dns_loadctx_t *lctx, const char *master_file) { } /* - * Load a fast format file, using mmap() to access RBT trees directly + * Load a map format file, using mmap() to access RBT trees directly */ static isc_result_t -load_fast(dns_loadctx_t *lctx) { +load_map(dns_loadctx_t *lctx) { isc_result_t result; dns_rdatacallbacks_t *callbacks; diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index e66b34dc22..309e6da559 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -1062,9 +1062,9 @@ dump_rdatasets_raw(isc_mem_t *mctx, dns_name_t *name, } static isc_result_t -dump_rdatasets_fast(isc_mem_t *mctx, dns_name_t *name, - dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx, - isc_buffer_t *buffer, FILE *f) +dump_rdatasets_map(isc_mem_t *mctx, dns_name_t *name, + dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx, + isc_buffer_t *buffer, FILE *f) { UNUSED(mctx); UNUSED(name); @@ -1318,8 +1318,8 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, case dns_masterformat_raw: dctx->dumpsets = dump_rdatasets_raw; break; - case dns_masterformat_fast: - dctx->dumpsets = dump_rdatasets_fast; + case dns_masterformat_map: + dctx->dumpsets = dump_rdatasets_map; break; default: INSIST(0); @@ -1404,7 +1404,7 @@ writeheader(dns_dumpctx_t *dctx) { } break; case dns_masterformat_raw: - case dns_masterformat_fast: + case dns_masterformat_map: r.base = (unsigned char *)&rawheader; r.length = sizeof(rawheader); isc_buffer_region(&buffer, &r); @@ -1485,7 +1485,7 @@ dumptostreaminc(dns_dumpctx_t *dctx) { * If the database is anything other than an rbtdb, * this should result in not implemented */ - if (dctx->format == dns_masterformat_fast) { + if (dctx->format == dns_masterformat_map) { result = dns_db_serialize(dctx->db, dctx->version, dctx->f); goto cleanup; diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index 059822f67b..f6926b8472 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -90,7 +90,7 @@ struct dns_rbt { #define BLACK 1 /* - * This is the header for fast-format RBT images. It is populated, + * This is the header for map-format RBT images. It is populated, * and then written, as the LAST thing done to the file before returning. * Writing this last (with zeros in the header area initially) will ensure * that the header is only valid when the RBT image is also valid. @@ -107,8 +107,8 @@ struct file_header { char version1[32]; isc_uint64_t first_node_offset; /* usually 1024 */ /* - * information about the system on which the fast file was generated - * will be used to tell if we can load the fast file or not + * information about the system on which the map file was generated + * will be used to tell if we can load the map file or not */ isc_uint32_t ptrsize; unsigned int bigendian:1; /* big or little endian system */ @@ -398,7 +398,7 @@ write_header(FILE *file, dns_rbt_t *rbt, isc_uint64_t first_node_offset) { if (FILE_VERSION[0] == '\0') { memset(FILE_VERSION, 0, sizeof(FILE_VERSION)); snprintf(FILE_VERSION, sizeof(FILE_VERSION), - "RBT Image %s %s", dns_major, dns_fastapi); + "RBT Image %s %s", dns_major, dns_mapapi); } memset(&header, 0, sizeof(file_header_t)); diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index b75372e4ca..1b2538b526 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -90,7 +90,7 @@ } while (0) /* - * This is the fast file header for RBTDB images. It is populated, and then + * This is the map file header for RBTDB images. It is populated, and then * written, as the LAST thing done to the file. Writing this last (with * zeros in the header area initially) will ensure that the header is only * valid when the RBTDB image is also valid. @@ -7424,7 +7424,7 @@ rbtdb_write_header(FILE *rbtfile, long tree_location, long nsec_location, if (FILE_VERSION[0] == '\0') { memset(FILE_VERSION, 0, sizeof(FILE_VERSION)); snprintf(FILE_VERSION, sizeof(FILE_VERSION), - "RBTDB Image %s %s", dns_major, dns_fastapi); + "RBTDB Image %s %s", dns_major, dns_mapapi); } memset(&header, 0, sizeof(rbtdb_file_header_t)); diff --git a/lib/dns/version.c b/lib/dns/version.c index 1059e5f406..a293781b78 100644 --- a/lib/dns/version.c +++ b/lib/dns/version.c @@ -23,7 +23,7 @@ const char dns_version[] = VERSION; const char dns_major[] = MAJOR; -const char dns_fastapi[] = FASTAPI; +const char dns_mapapi[] = MAPAPI; const unsigned int dns_libinterface = LIBINTERFACE; const unsigned int dns_librevision = LIBREVISION; diff --git a/lib/export/dns/Makefile.in b/lib/export/dns/Makefile.in index 3d50e966d6..3a88414d11 100644 --- a/lib/export/dns/Makefile.in +++ b/lib/export/dns/Makefile.in @@ -25,7 +25,7 @@ export_srcdir = @top_srcdir@/lib/export @BIND9_VERSION@ @BIND9_MAJOR@ -@LIBDNS_FASTAPI@ +@LIBDNS_MAPAPI@ @LIBDNS_API@ @@ -113,7 +113,7 @@ version.@O@: ${srcdir}/version.c ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ -DVERSION=\"${VERSION}\" \ -DMAJOR=\"${MAJOR}\" \ - -DFASTAPI=\"${FASTAPI}\" \ + -DMAPAPI=\"${MAPAPI}\" \ -DLIBINTERFACE=${LIBINTERFACE} \ -DLIBREVISION=${LIBREVISION} \ -DLIBAGE=${LIBAGE} \ diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 2198c19c44..c94736e030 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -1033,7 +1033,7 @@ static cfg_type_t cfg_type_mustbesecure = { &cfg_rep_tuple, mustbesecure_fields }; -static const char *masterformat_enums[] = { "text", "raw", "fast", NULL }; +static const char *masterformat_enums[] = { "text", "raw", "map", NULL }; static cfg_type_t cfg_type_masterformat = { "masterformat", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum, &cfg_rep_string, &masterformat_enums