diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-05-14 18:44:22 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-05-14 18:44:22 +0000 |
commit | 79dd93c19fd35899133800562b0db20f1a4c0f56 (patch) | |
tree | 86c1332d2843f4c80ae64365c16ba04306b6f542 /util | |
parent | f61d78fb42d2662643e7f0dbdcb97adbc2589dbc (diff) | |
download | src-79dd93c19fd35899133800562b0db20f1a4c0f56.tar.gz src-79dd93c19fd35899133800562b0db20f1a4c0f56.zip |
import unbound 1.4.22vendor/unbound/1.4.22
Notes
Notes:
svn path=/vendor/unbound/dist/; revision=266077
svn path=/vendor/unbound/1.4.22/; revision=266078; tag=vendor/unbound/1.4.22
Diffstat (limited to 'util')
55 files changed, 3396 insertions, 3204 deletions
diff --git a/util/alloc.c b/util/alloc.c index b5ccd96b4298..4b81beb4c4cb 100644 --- a/util/alloc.c +++ b/util/alloc.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -601,13 +601,13 @@ char* unbound_lite_wrapstr(char* s) return n; } -#undef ldns_pkt2wire -ldns_status unbound_lite_pkt2wire(uint8_t **dest, const ldns_pkt *p, +#undef sldns_pkt2wire +sldns_status unbound_lite_pkt2wire(uint8_t **dest, const sldns_pkt *p, size_t *size) { uint8_t* md = NULL; size_t ms = 0; - ldns_status s = ldns_pkt2wire(&md, p, &ms); + sldns_status s = sldns_pkt2wire(&md, p, &ms); if(md) { *dest = unbound_stat_malloc_lite(ms, __FILE__, __LINE__, __func__); diff --git a/util/alloc.h b/util/alloc.h index cb8d6b1bceb7..ffd605c5dc16 100644 --- a/util/alloc.h +++ b/util/alloc.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -201,15 +201,15 @@ void *unbound_stat_realloc_lite(void *ptr, size_t size, const char* file, char* unbound_strdup_lite(const char* s, const char* file, int line, const char* func); char* unbound_lite_wrapstr(char* s); -# define ldns_rr2str(rr) unbound_lite_wrapstr(ldns_rr2str(rr)) -# define ldns_rdf2str(rdf) unbound_lite_wrapstr(ldns_rdf2str(rdf)) -# define ldns_rr_type2str(t) unbound_lite_wrapstr(ldns_rr_type2str(t)) -# define ldns_rr_class2str(c) unbound_lite_wrapstr(ldns_rr_class2str(c)) -# define ldns_rr_list2str(r) unbound_lite_wrapstr(ldns_rr_list2str(r)) -# define ldns_pkt2str(p) unbound_lite_wrapstr(ldns_pkt2str(p)) -# define ldns_pkt_rcode2str(r) unbound_lite_wrapstr(ldns_pkt_rcode2str(r)) -# define ldns_pkt2wire(a, r, s) unbound_lite_pkt2wire(a, r, s) -ldns_status unbound_lite_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size); +# define sldns_rr2str(rr) unbound_lite_wrapstr(sldns_rr2str(rr)) +# define sldns_rdf2str(rdf) unbound_lite_wrapstr(sldns_rdf2str(rdf)) +# define sldns_rr_type2str(t) unbound_lite_wrapstr(sldns_rr_type2str(t)) +# define sldns_rr_class2str(c) unbound_lite_wrapstr(sldns_rr_class2str(c)) +# define sldns_rr_list2str(r) unbound_lite_wrapstr(sldns_rr_list2str(r)) +# define sldns_pkt2str(p) unbound_lite_wrapstr(sldns_pkt2str(p)) +# define sldns_pkt_rcode2str(r) unbound_lite_wrapstr(sldns_pkt_rcode2str(r)) +# define sldns_pkt2wire(a, r, s) unbound_lite_pkt2wire(a, r, s) +sldns_status unbound_lite_pkt2wire(uint8_t **dest, const sldns_pkt *p, size_t *size); # define i2d_DSA_SIG(d, s) unbound_lite_i2d_DSA_SIG(d, s) int unbound_lite_i2d_DSA_SIG(DSA_SIG* dsasig, unsigned char** sig); #endif /* UNBOUND_ALLOC_LITE */ diff --git a/util/config_file.c b/util/config_file.c index 1e0bd72df833..72f71199dab4 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -41,9 +41,11 @@ #include "config.h" #include <ctype.h> -#include <ldns/ldns.h> +#include <stdarg.h> +#ifdef HAVE_TIME_H +#include <time.h> +#endif #include "util/log.h" - #include "util/configyyrename.h" #include "util/config_file.h" #include "util/configparser.h" @@ -53,6 +55,8 @@ #include "util/regional.h" #include "util/fptr_wlist.h" #include "util/data/dname.h" +#include "ldns/wire2str.h" +#include "ldns/parseutil.h" #ifdef HAVE_GLOB_H # include <glob.h> #endif @@ -134,6 +138,7 @@ config_create(void) cfg->prefetch_key = 0; cfg->infra_cache_slabs = 4; cfg->infra_cache_numhosts = 10000; + cfg->delay_close = 0; if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int)))) goto error_exit; init_outgoing_availports(cfg->outgoing_avail_ports, 65536); @@ -152,6 +157,7 @@ config_create(void) cfg->if_automatic = 0; cfg->so_rcvbuf = 0; cfg->so_sndbuf = 0; + cfg->so_reuseport = 0; cfg->num_ifs = 0; cfg->ifs = NULL; cfg->num_out_ifs = 0; @@ -361,6 +367,7 @@ int config_set_option(struct config_file* cfg, const char* opt, else S_SIZET_OR_ZERO("jostle-timeout:", jostle_time) else S_MEMSIZE("so-rcvbuf:", so_rcvbuf) else S_MEMSIZE("so-sndbuf:", so_sndbuf) + else S_YNO("so-reuseport:", so_reuseport) else S_MEMSIZE("rrset-cache-size:", rrset_cache_size) else S_POW2("rrset-cache-slabs:", rrset_cache_slabs) else S_YNO("prefetch:", prefetch) @@ -372,6 +379,7 @@ int config_set_option(struct config_file* cfg, const char* opt, else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl) else S_POW2("infra-cache-slabs:", infra_cache_slabs) else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts) + else S_NUMBER_OR_ZERO("delay-close:", delay_close) else S_STR("chroot:", chrootdir) else S_STR("username:", username) else S_STR("directory:", directory) @@ -606,6 +614,7 @@ config_get_option(struct config_file* cfg, const char* opt, else O_UNS(opt, "jostle-timeout", jostle_time) else O_MEM(opt, "so-rcvbuf", so_rcvbuf) else O_MEM(opt, "so-sndbuf", so_sndbuf) + else O_YNO(opt, "so-reuseport", so_reuseport) else O_MEM(opt, "rrset-cache-size", rrset_cache_size) else O_DEC(opt, "rrset-cache-slabs", rrset_cache_slabs) else O_YNO(opt, "prefetch-key", prefetch_key) @@ -615,6 +624,7 @@ config_get_option(struct config_file* cfg, const char* opt, else O_DEC(opt, "infra-host-ttl", host_ttl) else O_DEC(opt, "infra-cache-slabs", infra_cache_slabs) else O_MEM(opt, "infra-cache-numhosts", infra_cache_numhosts) + else O_UNS(opt, "delay-close", delay_close) else O_YNO(opt, "do-ip4", do_ip4) else O_YNO(opt, "do-ip6", do_ip6) else O_YNO(opt, "do-udp", do_udp) @@ -1085,7 +1095,7 @@ cfg_convert_timeval(const char* str) if (tm.tm_min < 0 || tm.tm_min > 59) return 0; if (tm.tm_sec < 0 || tm.tm_sec > 59) return 0; /* call ldns conversion function */ - t = mktime_from_utc(&tm); + t = sldns_mktime_from_utc(&tm); return t; } @@ -1233,9 +1243,9 @@ strlen_after_chroot(const char* fname, struct config_file* cfg, int use_chdir) char* fname_after_chroot(const char* fname, struct config_file* cfg, int use_chdir) { - size_t len = strlen_after_chroot(fname, cfg, use_chdir); + size_t len = strlen_after_chroot(fname, cfg, use_chdir)+1; int slashit = 0; - char* buf = (char*)malloc(len+1); + char* buf = (char*)malloc(len); if(!buf) return NULL; buf[0] = 0; @@ -1243,14 +1253,14 @@ fname_after_chroot(const char* fname, struct config_file* cfg, int use_chdir) if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(cfg->chrootdir, fname, strlen(cfg->chrootdir)) == 0) { /* already full pathname, return it */ - strncpy(buf, fname, len); - buf[len] = 0; + (void)strlcpy(buf, fname, len); + buf[len-1] = 0; return buf; } /* chroot */ if(cfg->chrootdir && cfg->chrootdir[0]) { /* start with chrootdir */ - strncpy(buf, cfg->chrootdir, len); + (void)strlcpy(buf, cfg->chrootdir, len); slashit = 1; } #ifdef UB_ON_WINDOWS @@ -1264,21 +1274,21 @@ fname_after_chroot(const char* fname, struct config_file* cfg, int use_chdir) } else if(cfg->directory && cfg->directory[0]) { /* prepend chdir */ if(slashit && cfg->directory[0] != '/') - strncat(buf, "/", len-strlen(buf)); + (void)strlcat(buf, "/", len); /* is the directory already in the chroot? */ if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(cfg->chrootdir, cfg->directory, strlen(cfg->chrootdir)) == 0) - strncat(buf, cfg->directory+strlen(cfg->chrootdir), - len-strlen(buf)); - else strncat(buf, cfg->directory, len-strlen(buf)); + (void)strlcat(buf, cfg->directory+strlen(cfg->chrootdir), + len); + else (void)strlcat(buf, cfg->directory, len); slashit = 1; } /* fname */ if(slashit && fname[0] != '/') - strncat(buf, "/", len-strlen(buf)); - strncat(buf, fname, len-strlen(buf)); - buf[len] = 0; + (void)strlcat(buf, "/", len); + (void)strlcat(buf, fname, len); + buf[len-1] = 0; return buf; } @@ -1329,7 +1339,7 @@ cfg_parse_local_zone(struct config_file* cfg, const char* val) log_err("syntax error: bad zone name: %s", val); return 0; } - strncpy(buf, name, (size_t)(name_end-name)); + (void)strlcpy(buf, name, sizeof(buf)); buf[name_end-name] = '\0'; type = last_space_pos(name_end); @@ -1519,18 +1529,11 @@ char* errinf_to_str(struct module_qstate* qstate) size_t left = sizeof(buf); struct config_strlist* s; char dname[LDNS_MAX_DOMAINLEN+1]; - char* t = ldns_rr_type2str(qstate->qinfo.qtype); - char* c = ldns_rr_class2str(qstate->qinfo.qclass); - if(!t || !c) { - free(t); - free(c); - log_err("malloc failure in errinf_to_str"); - return NULL; - } + char t[16], c[16]; + sldns_wire2str_type_buf(qstate->qinfo.qtype, t, sizeof(t)); + sldns_wire2str_class_buf(qstate->qinfo.qclass, c, sizeof(c)); dname_str(qstate->qinfo.qname, dname); snprintf(p, left, "validation failure <%s %s %s>:", dname, t, c); - free(t); - free(c); left -= strlen(p); p += strlen(p); if(!qstate->errinf) snprintf(p, left, " misc failure"); @@ -1548,21 +1551,13 @@ void errinf_rrset(struct module_qstate* qstate, struct ub_packed_rrset_key *rr) { char buf[1024]; char dname[LDNS_MAX_DOMAINLEN+1]; - char *t, *c; + char t[16], c[16]; if(qstate->env->cfg->val_log_level < 2 || !rr) return; - t = ldns_rr_type2str(ntohs(rr->rk.type)); - c = ldns_rr_class2str(ntohs(rr->rk.rrset_class)); - if(!t || !c) { - free(t); - free(c); - log_err("malloc failure in errinf_rrset"); - return; - } + sldns_wire2str_type_buf(ntohs(rr->rk.type), t, sizeof(t)); + sldns_wire2str_class_buf(ntohs(rr->rk.rrset_class), c, sizeof(c)); dname_str(rr->rk.dname, dname); snprintf(buf, sizeof(buf), "for <%s %s %s>", dname, t, c); - free(t); - free(c); errinf(qstate, buf); } diff --git a/util/config_file.h b/util/config_file.h index 6161302ecf2e..7360fd30205e 100644 --- a/util/config_file.h +++ b/util/config_file.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -119,6 +119,8 @@ struct config_file { size_t infra_cache_slabs; /** max number of hosts in the infra cache */ size_t infra_cache_numhosts; + /** delay close of udp-timeouted ports, if 0 no delayclose. in msec */ + int delay_close; /** the target fetch policy for the iterator */ char* target_fetch_policy; @@ -130,6 +132,8 @@ struct config_file { size_t so_rcvbuf; /** SO_SNDBUF size to set on port 53 UDP socket */ size_t so_sndbuf; + /** SO_REUSEPORT requested on port 53 sockets */ + int so_reuseport; /** number of interfaces to open. If 0 default all interfaces. */ int num_ifs; diff --git a/util/configlexer.c b/util/configlexer.c index 3815dd1f2f51..a73adeccea26 100644 --- a/util/configlexer.c +++ b/util/configlexer.c @@ -363,8 +363,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 143 -#define YY_END_OF_BUFFER 144 +#define YY_NUM_RULES 146 +#define YY_END_OF_BUFFER 147 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -372,157 +372,160 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[1355] = +static yyconst flex_int16_t yy_accept[1383] = { 0, - 1, 1, 125, 125, 129, 129, 133, 133, 137, 137, - 1, 1, 144, 141, 1, 123, 123, 142, 2, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 142, 125, - 126, 126, 127, 142, 129, 130, 130, 131, 142, 136, - 133, 134, 134, 135, 142, 137, 138, 138, 139, 142, - 140, 124, 2, 128, 140, 142, 141, 0, 1, 2, - 2, 2, 2, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 125, 0, 129, 0, 136, 0, 133, 137, 0, 140, - 0, 2, 2, 140, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 140, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 140, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 62, 141, 141, 141, 141, 141, 6, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 140, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 140, - 141, 141, 141, 141, 27, 141, 141, 141, 141, 141, - 12, 13, 141, 15, 14, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 118, 141, 141, 141, 141, 141, 3, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 140, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 132, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 30, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 31, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 77, 132, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 76, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 60, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 20, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 28, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 29, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 22, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 25, 26, 141, 141, 141, 63, 141, 64, 141, - 61, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 5, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 79, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 141, 141, 141, 141, 141, 104, 103, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 32, 141, 141, - 141, 141, 141, 141, 141, 66, 65, 141, 141, 141, - 141, 141, 141, 100, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 51, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 102, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 4, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 97, 141, 141, 141, 141, 141, 141, - 141, 112, 98, 141, 21, 141, 141, 141, 141, 68, - 141, 69, 67, 141, 141, 141, 141, 141, 141, 75, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 99, - 141, 141, 141, 141, 122, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 59, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 17, 141, 141, - - 141, 16, 141, 84, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 39, 40, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 70, 141, - 141, 141, 141, 141, 74, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 78, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 117, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 88, 141, 92, - 141, 141, 141, 141, 73, 141, 141, 110, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 91, 141, 141, 141, 141, 41, 42, 141, 47, - 93, 141, 105, 101, 141, 141, 35, 141, 95, 141, - 141, 141, 141, 141, 7, 141, 58, 109, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 80, 141, 141, 119, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 94, 141, - 34, 36, 141, 141, 141, 141, 141, 57, 141, 141, - 141, 141, 113, 18, 19, 141, 141, 141, 141, 141, - 141, 55, 141, 141, 141, 141, 141, 141, 141, 141, - - 141, 115, 141, 141, 33, 141, 141, 141, 141, 141, - 141, 11, 141, 141, 141, 141, 141, 141, 141, 10, - 141, 141, 37, 141, 121, 114, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 87, 86, 141, 116, - 111, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 43, 141, 120, 141, 141, 141, 141, 38, 141, - 141, 141, 81, 83, 141, 141, 141, 85, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 23, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 108, 141, 141, 141, 141, - - 141, 141, 141, 24, 141, 9, 141, 141, 106, 48, - 141, 141, 141, 90, 141, 71, 141, 141, 141, 50, - 54, 49, 141, 44, 141, 8, 141, 141, 89, 141, - 141, 141, 53, 141, 45, 141, 107, 141, 141, 82, - 72, 52, 46, 141, 141, 141, 141, 56, 141, 141, - 141, 141, 96, 0 + 1, 1, 128, 128, 132, 132, 136, 136, 140, 140, + 1, 1, 147, 144, 1, 126, 126, 145, 2, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 145, 128, + 129, 129, 130, 145, 132, 133, 133, 134, 145, 139, + 136, 137, 137, 138, 145, 140, 141, 141, 142, 145, + 143, 127, 2, 131, 143, 145, 144, 0, 1, 2, + 2, 2, 2, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 128, 0, 132, 0, 139, 0, 136, 140, 0, + 143, 0, 2, 2, 143, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 143, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 143, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 65, 144, 144, + + 144, 144, 144, 6, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 143, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 143, + 144, 144, 144, 144, 29, 144, 144, 144, 144, 144, + 144, 12, 13, 144, 15, 14, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 121, 144, 144, 144, 144, 144, 3, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 143, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 135, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 32, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 33, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 80, 135, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 79, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 63, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 20, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 30, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 31, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 22, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 26, 144, 27, 144, 144, 144, 66, 144, + 67, 144, 64, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 5, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 82, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 23, 144, 144, 144, 144, + 107, 106, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 34, 144, 144, 144, 144, 144, 144, 144, 144, + 69, 68, 144, 144, 144, 144, 144, 144, 103, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 50, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 54, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 105, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 4, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 100, 144, 144, 144, 144, 144, 144, 144, 115, 101, + 144, 21, 144, 144, 144, 144, 71, 144, 72, 70, + 144, 144, 144, 144, 144, 144, 78, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 102, 144, 144, 144, + + 144, 125, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 62, 144, 144, 144, 144, 144, 144, + 144, 144, 28, 144, 144, 17, 144, 144, 144, 16, + 144, 87, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 41, 42, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 73, 144, 144, 144, + 144, 144, 77, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 81, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 120, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 91, 144, 95, 144, 144, + 144, 144, 76, 144, 144, 113, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 94, + 144, 144, 144, 144, 43, 44, 144, 49, 96, 144, + 108, 104, 144, 144, 37, 144, 98, 144, 144, 144, + 144, 144, 7, 144, 61, 112, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 83, 144, 144, 122, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 97, 144, 36, 38, + + 144, 144, 144, 144, 144, 60, 144, 144, 144, 144, + 116, 18, 19, 144, 144, 144, 144, 144, 144, 58, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 118, + 144, 144, 35, 144, 144, 144, 144, 144, 144, 11, + 144, 144, 144, 144, 144, 144, 144, 10, 144, 144, + 39, 144, 124, 117, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 90, 89, 144, 119, 114, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 45, + 144, 123, 144, 144, 144, 144, 40, 144, 144, 144, + 84, 86, 144, 144, 144, 88, 144, 144, 144, 144, + + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 24, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 111, 144, 144, 144, 144, 144, 144, + 144, 25, 144, 9, 144, 144, 109, 51, 144, 144, + 144, 93, 144, 74, 144, 144, 144, 53, 57, 52, + 144, 46, 144, 8, 144, 144, 92, 144, 144, 144, + 56, 144, 47, 144, 110, 144, 144, 85, 75, 55, + 48, 144, 144, 144, 144, 59, 144, 144, 144, 144, + 99, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -568,315 +571,323 @@ static yyconst flex_int32_t yy_meta[66] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[1369] = +static yyconst flex_int16_t yy_base[1397] = { 0, 0, 0, 63, 66, 69, 71, 77, 83, 88, 91, - 129, 135, 498, 454, 95, 3905, 3905, 3905, 107, 110, - 142, 140, 108, 50, 159, 147, 121, 148, 158, 182, - 193, 169, 204, 218, 232, 254, 189, 238, 116, 425, - 3905, 3905, 3905, 94, 352, 3905, 3905, 3905, 96, 338, - 371, 3905, 3905, 3905, 212, 295, 3905, 3905, 3905, 102, - 288, 3905, 293, 3905, 185, 297, 250, 301, 111, 0, - 305, 0, 0, 231, 162, 282, 241, 235, 289, 215, - 286, 284, 311, 294, 290, 296, 300, 315, 307, 322, - 337, 325, 323, 351, 329, 333, 355, 361, 349, 365, - - 356, 346, 373, 376, 382, 370, 385, 386, 383, 388, - 137, 393, 410, 389, 392, 403, 188, 417, 414, 409, - 242, 154, 205, 281, 179, 450, 202, 115, 333, 90, - 467, 471, 0, 420, 441, 443, 440, 240, 450, 449, - 452, 451, 475, 499, 473, 453, 479, 462, 483, 489, - 477, 480, 512, 470, 504, 505, 501, 533, 522, 537, - 538, 532, 521, 549, 548, 559, 560, 550, 552, 546, - 555, 540, 563, 568, 554, 567, 569, 584, 582, 577, - 590, 593, 609, 587, 607, 619, 611, 620, 601, 604, - 617, 616, 621, 627, 614, 643, 652, 644, 656, 646, - - 648, 658, 664, 665, 660, 653, 675, 672, 669, 666, - 679, 684, 685, 680, 682, 702, 719, 707, 704, 701, - 708, 699, 709, 711, 737, 730, 748, 735, 727, 744, - 733, 754, 757, 741, 743, 765, 767, 768, 769, 762, - 785, 782, 778, 783, 781, 793, 784, 816, 803, 861, - 807, 812, 805, 823, 809, 818, 820, 832, 839, 840, - 851, 843, 867, 862, 865, 870, 879, 860, 881, 889, - 878, 897, 905, 906, 904, 913, 910, 831, 912, 916, - 922, 924, 841, 907, 920, 938, 926, 957, 954, 939, - 962, 3905, 966, 943, 953, 965, 956, 3905, 949, 951, - - 983, 977, 991, 976, 984, 978, 1003, 993, 1001, 996, - 994, 1040, 995, 1009, 1042, 1017, 1030, 1018, 1049, 1036, - 1053, 1044, 1035, 1033, 1067, 1052, 1068, 1069, 1081, 1093, - 1078, 1073, 1088, 1097, 1086, 1092, 1094, 1099, 1103, 1106, - 1107, 1114, 1122, 1123, 1131, 1111, 1130, 1133, 1143, 1136, - 1139, 1125, 1146, 1142, 1134, 1173, 1150, 1157, 1156, 1152, - 1164, 1175, 1174, 1183, 1170, 1177, 1197, 1192, 1191, 1193, - 1200, 1204, 1212, 1201, 1208, 1224, 1234, 1213, 1227, 1239, - 1241, 1243, 1244, 1232, 1237, 1233, 1238, 1263, 1253, 1259, - 1260, 1261, 1248, 1264, 1280, 1288, 1290, 1277, 1279, 1284, - - 1289, 1294, 1302, 1307, 1308, 1300, 1321, 1305, 1316, 1326, - 1334, 1329, 1317, 1341, 3905, 1351, 1345, 1336, 1344, 1347, - 3905, 3905, 1353, 3905, 3905, 1357, 1340, 1355, 1379, 1405, - 1378, 1369, 1363, 1389, 1391, 1393, 1394, 1384, 1401, 1410, - 1411, 1406, 1422, 1434, 1426, 1427, 1437, 1443, 1450, 1451, - 1452, 1453, 1440, 1457, 1456, 1458, 1464, 1460, 1468, 1470, - 1454, 3905, 1485, 1475, 1492, 1479, 1496, 3905, 1483, 1484, - 1497, 1486, 1498, 1500, 1510, 1511, 1503, 1519, 1525, 1527, - 1520, 1534, 1546, 1547, 1531, 1541, 1538, 1536, 1558, 1566, - 1561, 1554, 1556, 1575, 1562, 1576, 1579, 1577, 1583, 1571, - - 1570, 1581, 1620, 1597, 1580, 1585, 1599, 1612, 1616, 1628, - 1615, 1640, 1632, 1624, 1642, 1617, 1644, 1645, 1656, 1655, - 1635, 1673, 3905, 1682, 1676, 1665, 1672, 1681, 1678, 1669, - 1689, 1671, 1693, 1701, 1699, 3905, 1698, 1704, 1708, 1697, - 1714, 1725, 1718, 1731, 1737, 3905, 1740, 1738, 1744, 1728, - 1733, 1745, 1735, 1746, 1758, 1755, 1762, 1776, 1770, 1759, - 1778, 1766, 1772, 1767, 1783, 1793, 1795, 1774, 1799, 1801, - 1811, 1813, 1806, 1815, 1797, 1803, 1819, 478, 1814, 1825, - 1818, 1822, 3905, 76, 1836, 1838, 1835, 1839, 1840, 1846, - 1842, 1843, 1849, 1845, 1864, 1868, 1867, 1862, 1870, 1869, - - 1881, 1873, 1889, 1890, 1894, 1895, 1891, 1904, 1880, 1887, - 1918, 1912, 1913, 1902, 3905, 1908, 1920, 1917, 1921, 1937, - 1953, 1930, 1946, 1950, 1957, 1951, 1954, 1961, 1963, 1960, - 1952, 1949, 1975, 1978, 1986, 1992, 1994, 1984, 3905, 1993, - 1989, 1980, 1987, 1990, 2007, 2013, 2011, 2016, 2006, 2026, - 3905, 2042, 2039, 2028, 2032, 2030, 2046, 2043, 2049, 2031, - 2055, 2053, 2057, 2063, 2058, 2072, 3905, 2056, 2067, 2087, - 2069, 2077, 2074, 2084, 2097, 2078, 2080, 2104, 2082, 2090, - 2094, 2114, 2096, 2101, 2100, 2109, 3905, 2138, 2120, 2117, - 2128, 2122, 2130, 2144, 2134, 2137, 2149, 2139, 2151, 2153, - - 2161, 2164, 2166, 2165, 2167, 2180, 2177, 2194, 2176, 2191, - 2188, 3905, 2195, 2192, 2183, 2212, 2205, 2201, 2204, 2208, - 2211, 2218, 2221, 2217, 2222, 2227, 2233, 2226, 2216, 2243, - 2254, 2251, 2238, 2249, 2250, 2260, 2266, 2267, 2270, 2264, - 2275, 3905, 3905, 2283, 2289, 2279, 3905, 2292, 3905, 2295, - 3905, 2293, 2297, 2285, 2278, 2299, 2294, 2308, 2312, 2313, - 2306, 2307, 2325, 2319, 2337, 3905, 2326, 2333, 2348, 2323, - 2331, 2334, 2355, 2358, 2341, 2346, 2353, 2356, 3905, 2372, - 2361, 2376, 2391, 2394, 2374, 2378, 2380, 2393, 2385, 2404, - 2396, 2405, 2384, 2406, 2414, 2401, 2418, 2425, 2420, 2419, - - 2423, 2427, 2429, 2433, 2446, 2435, 3905, 3905, 2449, 2456, - 2463, 2453, 2465, 2445, 2472, 2470, 2467, 2477, 2473, 2475, - 2471, 2491, 2482, 2485, 2486, 2494, 2499, 3905, 2523, 2504, - 2527, 2518, 2529, 2515, 2530, 3905, 3905, 2532, 2525, 2535, - 2542, 2520, 2546, 3905, 2521, 2554, 2565, 2566, 2567, 2568, - 2551, 2560, 2576, 2569, 2578, 2588, 2586, 2594, 2589, 2602, - 2584, 2609, 2603, 2614, 2593, 2597, 2604, 2599, 2622, 2605, - 2628, 2637, 2642, 2640, 3905, 2644, 2629, 2646, 2626, 2648, - 2653, 2661, 2665, 2638, 2639, 2656, 2641, 2660, 2664, 2671, - 2673, 3905, 2685, 2682, 2680, 2689, 2688, 2675, 2704, 2687, - - 2692, 3905, 2720, 2714, 2706, 2711, 2727, 2724, 2721, 2716, - 2719, 2723, 2722, 2733, 2735, 2754, 2755, 2746, 2745, 2762, - 2768, 2778, 2779, 2764, 2781, 2771, 2780, 2773, 2763, 2791, - 2774, 2797, 2787, 3905, 2801, 2802, 2809, 2807, 2811, 2814, - 2808, 3905, 3905, 2810, 3905, 2818, 2815, 2812, 2823, 3905, - 2825, 3905, 3905, 2837, 2831, 2836, 2854, 2859, 2856, 3905, - 2858, 2842, 2866, 2847, 2860, 2863, 2864, 2869, 2850, 3905, - 2874, 2871, 2886, 2896, 3905, 2893, 2908, 2883, 2910, 2912, - 2911, 2913, 2899, 2901, 2923, 2919, 3905, 2903, 2933, 2925, - 2941, 2945, 2956, 2946, 2949, 2959, 2960, 3905, 2950, 2942, - - 2951, 3905, 2969, 3905, 2973, 2968, 2988, 2929, 2989, 2999, - 2982, 3000, 3002, 2990, 3005, 3006, 3905, 3905, 3009, 3008, - 3010, 3027, 3016, 3015, 3025, 3017, 3024, 3028, 3905, 3029, - 3038, 3037, 3048, 3041, 3905, 3059, 3066, 3063, 3065, 3070, - 3061, 3072, 3068, 3073, 3079, 3064, 3082, 3094, 3085, 3905, - 3096, 3102, 3088, 3111, 3095, 3108, 3115, 3116, 3119, 3106, - 3120, 3905, 3124, 3100, 3129, 3127, 3137, 3134, 3123, 3142, - 3141, 3153, 3145, 3156, 3161, 3171, 3169, 3905, 3154, 3905, - 3168, 3178, 3175, 3185, 3905, 3176, 3172, 3905, 3187, 3188, - 3207, 3204, 3206, 3210, 3211, 3199, 3218, 3203, 3220, 3228, - - 3221, 3905, 3213, 3234, 3224, 3240, 3905, 3905, 3243, 3905, - 3905, 3241, 3905, 3905, 3248, 3257, 3905, 3258, 3905, 3264, - 3261, 3247, 3250, 3260, 3905, 3273, 3905, 3905, 3271, 3277, - 3267, 3278, 3282, 3286, 3293, 3284, 3289, 3285, 3290, 3303, - 3294, 3295, 3292, 3299, 3311, 3305, 3309, 3313, 3317, 3332, - 3334, 3343, 3905, 3328, 3347, 3905, 3349, 3341, 3336, 3338, - 3353, 3363, 3362, 3357, 3373, 3367, 3366, 3368, 3905, 3372, - 3905, 3905, 3376, 3383, 3387, 3377, 3384, 3905, 3397, 3398, - 3401, 3405, 3905, 3905, 3905, 3406, 3394, 3411, 3421, 3422, - 3423, 3905, 3415, 3432, 3434, 3425, 3435, 3436, 3445, 3446, - - 3451, 3905, 3450, 3444, 3905, 3457, 3452, 3459, 3461, 3473, - 3466, 3905, 3462, 3471, 3469, 3467, 3480, 3477, 3486, 3905, - 3496, 3493, 3905, 3499, 3905, 3905, 3489, 3510, 3512, 3514, - 3519, 3503, 3508, 3528, 3525, 3523, 3905, 3905, 3534, 3905, - 3905, 3524, 3536, 3526, 3530, 3546, 3542, 3539, 3538, 3551, - 3548, 3905, 3553, 3905, 3558, 3577, 3575, 3572, 3905, 3573, - 3578, 3567, 3905, 3905, 3583, 3595, 3584, 3905, 3602, 3589, - 3594, 3597, 3601, 3605, 3610, 3608, 3622, 3628, 3616, 3617, - 3618, 3641, 3905, 3631, 3632, 3629, 3638, 3647, 3643, 3649, - 3644, 3648, 3654, 3650, 3653, 3905, 3668, 3678, 3667, 3684, - - 3685, 3681, 3687, 3905, 3689, 3905, 3692, 3691, 3905, 3905, - 3693, 3697, 3695, 3905, 3698, 3905, 3706, 3702, 3711, 3905, - 3905, 3905, 3704, 3905, 3717, 3905, 3707, 3720, 3905, 3714, - 3736, 3737, 3905, 3739, 3905, 3740, 3905, 3731, 3744, 3905, - 3905, 3905, 3905, 3742, 3729, 3750, 3748, 3905, 3753, 3738, - 3755, 3751, 3905, 3905, 3813, 3820, 3827, 3834, 3841, 82, - 3848, 3855, 3862, 3869, 3876, 3883, 3890, 3897 + 129, 135, 296, 256, 95, 4001, 4001, 4001, 107, 110, + 142, 140, 108, 50, 159, 147, 158, 148, 174, 190, + 192, 175, 212, 220, 226, 248, 215, 254, 116, 253, + 4001, 4001, 4001, 94, 252, 4001, 4001, 4001, 96, 247, + 280, 4001, 4001, 4001, 295, 242, 4001, 4001, 4001, 102, + 233, 4001, 299, 4001, 236, 305, 201, 309, 111, 0, + 313, 0, 0, 180, 240, 287, 293, 188, 297, 298, + 294, 295, 319, 302, 308, 300, 315, 326, 331, 327, + 344, 121, 329, 356, 359, 325, 351, 363, 372, 357, + + 373, 369, 375, 383, 385, 396, 384, 400, 402, 397, + 407, 137, 406, 414, 419, 420, 427, 426, 433, 439, + 432, 195, 154, 187, 216, 171, 477, 204, 165, 211, + 115, 489, 493, 0, 465, 466, 216, 472, 481, 475, + 453, 495, 492, 430, 521, 500, 485, 502, 482, 506, + 513, 512, 479, 531, 520, 539, 548, 534, 540, 555, + 558, 568, 564, 563, 557, 567, 575, 581, 583, 582, + 586, 573, 590, 576, 579, 597, 584, 610, 599, 609, + 622, 613, 630, 631, 626, 616, 640, 634, 648, 644, + 639, 637, 642, 649, 665, 657, 662, 666, 660, 678, + + 687, 690, 679, 667, 683, 692, 689, 704, 697, 701, + 715, 707, 706, 703, 714, 719, 736, 709, 739, 728, + 748, 742, 738, 741, 747, 730, 760, 759, 777, 749, + 778, 772, 767, 775, 790, 786, 794, 788, 800, 797, + 805, 796, 807, 815, 817, 822, 818, 821, 814, 823, + 832, 848, 841, 893, 839, 852, 850, 845, 842, 856, + 884, 866, 872, 874, 894, 877, 888, 901, 919, 910, + 911, 915, 926, 923, 937, 929, 934, 950, 883, 938, + 951, 935, 949, 954, 962, 958, 956, 978, 953, 967, + 964, 980, 991, 983, 993, 976, 1000, 4001, 1003, 981, + + 1005, 1007, 1009, 4001, 1006, 1015, 1023, 1012, 1030, 1018, + 1028, 1025, 1033, 1045, 1036, 1053, 1040, 1042, 1088, 1039, + 1052, 1079, 1050, 1081, 1065, 1092, 1076, 1086, 1085, 1080, + 1083, 1097, 1113, 1109, 1115, 1129, 1138, 1123, 1119, 1126, + 1143, 1132, 1136, 1142, 1146, 1149, 1141, 1147, 1151, 1162, + 1167, 1177, 1184, 1164, 1178, 1182, 1188, 1189, 1187, 1170, + 1191, 1194, 1181, 1220, 1197, 1209, 1204, 1221, 1226, 1234, + 1235, 1224, 1236, 1242, 1254, 1206, 1243, 1268, 1269, 1247, + 1255, 1261, 1278, 1274, 1279, 1207, 1282, 1280, 1294, 1290, + 1301, 1295, 1306, 1300, 1302, 1296, 1299, 1309, 1316, 1317, + + 1330, 1322, 1335, 1331, 1333, 1347, 1349, 1339, 1344, 1340, + 1358, 1364, 1361, 1367, 1374, 1366, 1376, 1377, 1373, 1392, + 1395, 1385, 1381, 1406, 4001, 1409, 1413, 1408, 1400, 1422, + 1411, 4001, 4001, 1404, 4001, 4001, 1414, 1431, 1424, 1436, + 1463, 1434, 1441, 1427, 1453, 1446, 1462, 1471, 1461, 1473, + 1457, 1480, 1484, 1486, 1483, 1492, 1499, 1488, 1490, 1516, + 1525, 1527, 1521, 1522, 1526, 1529, 1512, 1531, 1533, 1535, + 1538, 1542, 1547, 4001, 1541, 1545, 1549, 1555, 1572, 4001, + 1557, 1574, 1560, 1565, 1567, 1568, 1571, 1586, 1573, 1577, + 1594, 1595, 1605, 1599, 1600, 1624, 1621, 1610, 1616, 1626, + + 1612, 1634, 1638, 1637, 1627, 1636, 1646, 1630, 1644, 1647, + 1651, 1655, 1656, 1657, 1665, 1706, 1664, 1670, 1662, 1683, + 1680, 1678, 1686, 1663, 1674, 1729, 1713, 1702, 1692, 1719, + 1727, 1726, 1725, 1731, 1724, 1744, 4001, 1745, 1757, 1746, + 1754, 1758, 1749, 1761, 1759, 1764, 1773, 1775, 1771, 1783, + 4001, 1782, 1781, 1788, 1806, 1807, 1808, 1795, 1816, 1787, + 4001, 1823, 1820, 1815, 1810, 1809, 1838, 1828, 1827, 1848, + 1840, 1842, 1851, 1860, 1852, 1844, 1863, 1854, 1855, 1850, + 1873, 1878, 1887, 1876, 1888, 1884, 1900, 1902, 1889, 1906, + 1890, 1893, 1896, 139, 1910, 1903, 1905, 1913, 4001, 76, + + 1927, 1929, 1922, 1930, 1947, 1920, 1931, 1932, 1943, 1935, + 1949, 1934, 1960, 1961, 1954, 1962, 1959, 1977, 1965, 1981, + 1974, 1980, 1987, 1986, 1996, 1972, 1999, 1991, 2001, 2007, + 1994, 4001, 2004, 2005, 2025, 2018, 2030, 2040, 2020, 2024, + 2032, 2052, 2048, 2045, 2051, 2054, 2044, 2058, 2047, 2066, + 2062, 2073, 2065, 2082, 2085, 2080, 4001, 2083, 2081, 2077, + 2088, 2079, 2097, 2106, 2109, 2092, 2116, 2119, 2131, 4001, + 2132, 2133, 2118, 2139, 2121, 2140, 2144, 2142, 2130, 2146, + 2145, 2147, 2157, 2164, 2156, 4001, 2159, 2160, 2176, 2186, + 2179, 2166, 2178, 2192, 2174, 2172, 2200, 2184, 2187, 2191, + + 2197, 2190, 2201, 2202, 2212, 2218, 4001, 2242, 2206, 2222, + 2225, 2228, 2221, 2239, 2233, 2237, 2244, 2248, 2253, 2249, + 2267, 2260, 2259, 2252, 2269, 2276, 2268, 2286, 2297, 2301, + 2299, 4001, 2298, 2302, 2292, 2293, 2314, 2305, 2296, 2303, + 2309, 2318, 2311, 2325, 2321, 2324, 2327, 2328, 2336, 2332, + 2341, 2330, 2355, 2357, 2352, 2362, 2349, 2366, 2367, 2374, + 2370, 2379, 4001, 2368, 4001, 2376, 2384, 2395, 4001, 2400, + 4001, 2402, 4001, 2401, 2406, 2394, 2389, 2405, 2403, 2415, + 2399, 2422, 2398, 2413, 2431, 2425, 2433, 4001, 2421, 2429, + 2452, 2434, 2437, 2447, 2461, 2450, 2472, 2449, 2445, 2473, + + 2477, 4001, 2470, 2460, 2486, 2482, 2490, 2474, 2476, 2478, + 2488, 2484, 2501, 2508, 2509, 2503, 2504, 2512, 2513, 2511, + 2516, 2530, 2517, 2522, 2525, 4001, 2538, 2540, 2549, 2539, + 4001, 4001, 2545, 2557, 2563, 2554, 2562, 2556, 2582, 2569, + 2566, 2577, 2559, 2586, 2574, 2589, 2583, 2593, 2606, 2596, + 2597, 4001, 2604, 2609, 2618, 2616, 2605, 2621, 2624, 2638, + 4001, 4001, 2632, 2631, 2628, 2634, 2650, 2642, 4001, 2636, + 2658, 2652, 2665, 2667, 2669, 2659, 2661, 2675, 2677, 2683, + 2686, 2654, 2688, 2689, 2684, 2701, 2706, 4001, 2699, 2712, + 2718, 2702, 2705, 2710, 2719, 2711, 2720, 2721, 2740, 2738, + + 4001, 2744, 2725, 2746, 2728, 2749, 2755, 2748, 2747, 2742, + 2752, 2757, 2733, 2763, 2765, 2784, 2767, 4001, 2769, 2795, + 2782, 2793, 2789, 2775, 2802, 2780, 2792, 4001, 2805, 2817, + 2811, 2814, 2815, 2818, 2825, 2816, 2824, 2827, 2832, 2843, + 2844, 2840, 2861, 2855, 2835, 2851, 2830, 2860, 2868, 2873, + 2863, 2883, 2869, 2880, 2874, 2864, 2897, 2876, 2901, 2882, + 4001, 2902, 2885, 2906, 2908, 2910, 2911, 2909, 4001, 4001, + 2907, 4001, 2938, 2904, 2921, 2931, 4001, 2920, 4001, 4001, + 2929, 2927, 2934, 2925, 2953, 2959, 4001, 2956, 2942, 2967, + 2952, 2948, 2964, 2969, 2957, 2965, 4001, 2966, 2986, 2979, + + 2992, 4001, 2990, 3002, 2983, 3000, 3012, 3006, 3013, 2989, + 3003, 3024, 3016, 4001, 3025, 3008, 3026, 3030, 3046, 3035, + 3038, 3048, 4001, 3049, 3051, 4001, 3050, 3039, 3045, 4001, + 3062, 4001, 3064, 3067, 3071, 3079, 3075, 3093, 3077, 3095, + 3098, 3087, 3101, 3097, 4001, 4001, 3104, 3108, 3109, 3106, + 3107, 3111, 3102, 3116, 3120, 3122, 4001, 3126, 3132, 3131, + 3142, 3134, 4001, 3156, 3157, 3149, 3153, 3163, 3165, 3167, + 3158, 3170, 3172, 3169, 3174, 3175, 3176, 4001, 3181, 3200, + 3185, 3205, 3189, 3203, 3208, 3213, 3206, 3191, 3217, 4001, + 3219, 3194, 3222, 3215, 3216, 3221, 3227, 3232, 3236, 3234, + + 3243, 3251, 3253, 3268, 3261, 4001, 3247, 4001, 3264, 3270, + 3272, 3274, 4001, 3254, 3278, 4001, 3279, 3281, 3276, 3289, + 3301, 3307, 3306, 3292, 3310, 3295, 3313, 3325, 3317, 4001, + 3308, 3321, 3319, 3328, 4001, 4001, 3331, 4001, 4001, 3329, + 4001, 4001, 3338, 3336, 4001, 3347, 4001, 3353, 3359, 3345, + 3340, 3363, 4001, 3364, 4001, 4001, 3366, 3367, 3365, 3370, + 3373, 3376, 3377, 3372, 3383, 3393, 3395, 3396, 3389, 3385, + 3404, 3388, 3397, 3406, 3394, 3411, 3412, 3421, 3422, 3429, + 4001, 3424, 3436, 4001, 3443, 3438, 3435, 3440, 3441, 3439, + 3452, 3460, 3465, 3457, 3454, 3456, 4001, 3461, 4001, 4001, + + 3469, 3475, 3490, 3479, 3477, 4001, 3491, 3474, 3497, 3508, + 4001, 4001, 4001, 3509, 3492, 3502, 3507, 3518, 3505, 4001, + 3500, 3520, 3521, 3516, 3528, 3530, 3537, 3544, 3546, 4001, + 3549, 3539, 4001, 3553, 3547, 3550, 3552, 3562, 3558, 4001, + 3565, 3572, 3568, 3566, 3569, 3574, 3592, 4001, 3589, 3587, + 4001, 3603, 4001, 4001, 3585, 3606, 3601, 3608, 3610, 3595, + 3609, 3619, 3617, 3616, 4001, 4001, 3615, 4001, 4001, 3622, + 3618, 3632, 3628, 3636, 3633, 3634, 3631, 3653, 3644, 4001, + 3663, 4001, 3649, 3669, 3668, 3661, 4001, 3665, 3671, 3648, + 4001, 4001, 3677, 3684, 3678, 4001, 3681, 3693, 3688, 3691, + + 3703, 3708, 3700, 3704, 3711, 3720, 3695, 3705, 3726, 3731, + 4001, 3728, 3722, 3718, 3737, 3739, 3735, 3729, 3745, 3757, + 3747, 3760, 3751, 4001, 3761, 3766, 3773, 3776, 3777, 3774, + 3780, 4001, 3781, 4001, 3783, 3784, 4001, 4001, 3786, 3785, + 3790, 4001, 3791, 4001, 3799, 3805, 3810, 4001, 4001, 4001, + 3815, 4001, 3816, 4001, 3824, 3812, 4001, 3807, 3828, 3829, + 4001, 3830, 4001, 3831, 4001, 3821, 3834, 4001, 4001, 4001, + 4001, 3832, 3818, 3840, 3841, 4001, 3849, 3839, 3851, 3844, + 4001, 4001, 3909, 3916, 3923, 3930, 3937, 82, 3944, 3951, + 3958, 3965, 3972, 3979, 3986, 3993 + } ; -static yyconst flex_int16_t yy_def[1369] = +static yyconst flex_int16_t yy_def[1397] = { 0, - 1354, 1, 1355, 1355, 1356, 1356, 1357, 1357, 1358, 1358, - 1359, 1359, 1354, 1360, 1354, 1354, 1354, 1354, 1361, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1362, - 1354, 1354, 1354, 1362, 1363, 1354, 1354, 1354, 1363, 1364, - 1354, 1354, 1354, 1354, 1364, 1365, 1354, 1354, 1354, 1365, - 1366, 1354, 1367, 1354, 1366, 1366, 1360, 1360, 1354, 1368, - 1361, 1368, 1361, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1362, 1362, 1363, 1363, 1364, 1364, 1354, 1365, 1365, 1366, - 1366, 1367, 1367, 1366, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1366, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1354, 1354, 1360, 1354, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1354, 1366, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1354, 1360, 1360, 1360, 1354, 1360, 1354, 1360, - 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360, 1360, - 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1354, - 1360, 1354, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1354, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - - 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1354, - 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1354, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1354, - 1354, 1360, 1354, 1354, 1360, 1360, 1354, 1360, 1354, 1360, - 1360, 1360, 1360, 1360, 1354, 1360, 1354, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1354, 1360, 1360, 1354, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, - 1354, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1354, 1354, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - - 1360, 1354, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, - 1360, 1360, 1354, 1360, 1354, 1354, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1354, - 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1354, 1360, - 1360, 1360, 1354, 1354, 1360, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, - 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, - - 1360, 1360, 1360, 1354, 1360, 1354, 1360, 1360, 1354, 1354, - 1360, 1360, 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1354, - 1354, 1354, 1360, 1354, 1360, 1354, 1360, 1360, 1354, 1360, - 1360, 1360, 1354, 1360, 1354, 1360, 1354, 1360, 1360, 1354, - 1354, 1354, 1354, 1360, 1360, 1360, 1360, 1354, 1360, 1360, - 1360, 1360, 1354, 0, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354 + 1382, 1, 1383, 1383, 1384, 1384, 1385, 1385, 1386, 1386, + 1387, 1387, 1382, 1388, 1382, 1382, 1382, 1382, 1389, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1390, + 1382, 1382, 1382, 1390, 1391, 1382, 1382, 1382, 1391, 1392, + 1382, 1382, 1382, 1382, 1392, 1393, 1382, 1382, 1382, 1393, + 1394, 1382, 1395, 1382, 1394, 1394, 1388, 1388, 1382, 1396, + 1389, 1396, 1389, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1390, 1390, 1391, 1391, 1392, 1392, 1382, 1393, 1393, + 1394, 1394, 1395, 1395, 1394, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1394, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1394, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + + 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1394, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1394, + 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, + 1388, 1382, 1382, 1388, 1382, 1382, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1394, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1394, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1382, 1388, 1382, 1388, 1388, 1388, 1382, 1388, + 1382, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + 1382, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1382, + 1388, 1382, 1388, 1388, 1388, 1388, 1382, 1388, 1382, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1382, 1388, 1388, 1382, 1388, 1388, 1388, 1382, + 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1382, 1382, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1382, 1388, 1388, + 1388, 1388, 1382, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1382, 1382, 1388, 1382, 1382, 1388, + 1382, 1382, 1388, 1388, 1382, 1388, 1382, 1388, 1388, 1388, + 1388, 1388, 1382, 1388, 1382, 1382, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1382, 1382, + + 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + 1382, 1382, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, 1388, 1388, + 1382, 1388, 1382, 1382, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1388, 1382, 1382, 1388, 1382, 1382, 1388, + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1382, + 1388, 1382, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, + 1382, 1382, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + + 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1382, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, 1388, 1388, + 1388, 1382, 1388, 1382, 1388, 1388, 1382, 1382, 1388, 1388, + 1388, 1382, 1388, 1382, 1388, 1388, 1388, 1382, 1382, 1382, + 1388, 1382, 1388, 1382, 1388, 1388, 1382, 1388, 1388, 1388, + 1382, 1388, 1382, 1388, 1382, 1388, 1388, 1382, 1382, 1382, + 1382, 1388, 1388, 1388, 1388, 1382, 1388, 1388, 1388, 1388, + 1382, 0, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382 + } ; -static yyconst flex_int16_t yy_nxt[3971] = +static yyconst flex_int16_t yy_nxt[4067] = { 0, 14, 15, 16, 17, 18, 19, 18, 14, 14, 14, 14, 18, 20, 14, 21, 22, 23, 24, 14, 25, @@ -887,436 +898,447 @@ static yyconst flex_int16_t yy_nxt[3971] = 38, 14, 14, 14, 14, 41, 42, 43, 41, 42, 43, 46, 47, 46, 47, 48, 86, 48, 51, 52, 53, 54, 67, 18, 51, 52, 53, 54, 68, 18, - 57, 58, 59, 57, 58, 59, 69, 121, 121, 123, + 57, 58, 59, 57, 58, 59, 69, 122, 122, 124, - 70, 44, 123, 86, 44, 128, 128, 49, 72, 49, - 72, 72, 69, 72, 131, 55, 70, 67, 72, 67, - 67, 55, 67, 84, 74, 75, 60, 67, 131, 60, + 70, 44, 124, 86, 44, 129, 129, 49, 72, 49, + 72, 72, 69, 72, 132, 55, 70, 67, 72, 67, + 67, 55, 67, 84, 74, 75, 60, 67, 157, 60, 15, 16, 17, 62, 63, 64, 15, 16, 17, 62, - 63, 64, 76, 85, 178, 73, 68, 92, 68, 65, - 84, 74, 75, 129, 77, 65, 80, 121, 121, 68, - 81, 78, 89, 82, 93, 90, 83, 66, 79, 76, - 85, 87, 91, 66, 92, 68, 65, 136, 68, 88, - 68, 77, 65, 80, 94, 68, 68, 81, 78, 89, - 82, 93, 90, 83, 95, 79, 68, 68, 87, 91, - - 68, 102, 96, 127, 136, 99, 88, 68, 97, 100, - 134, 94, 98, 125, 117, 125, 125, 126, 125, 118, - 68, 95, 185, 131, 103, 101, 68, 68, 102, 96, - 104, 68, 99, 105, 107, 97, 100, 134, 141, 98, - 106, 117, 68, 124, 108, 135, 118, 109, 110, 185, - 119, 103, 101, 68, 120, 138, 68, 104, 111, 193, - 105, 107, 112, 113, 139, 141, 114, 106, 115, 68, - 68, 108, 135, 68, 109, 110, 68, 119, 68, 68, - 122, 120, 138, 116, 123, 111, 193, 123, 68, 112, - 113, 139, 68, 114, 72, 115, 72, 72, 130, 72, - - 130, 130, 67, 130, 67, 67, 72, 67, 72, 72, - 116, 72, 67, 137, 140, 142, 72, 143, 144, 146, - 68, 147, 68, 151, 68, 148, 131, 68, 68, 149, - 150, 133, 68, 129, 68, 145, 128, 128, 68, 157, - 137, 140, 142, 73, 143, 68, 146, 152, 147, 68, - 151, 153, 148, 68, 154, 156, 149, 150, 162, 158, - 68, 68, 145, 68, 161, 159, 157, 68, 155, 160, - 163, 68, 127, 165, 152, 68, 126, 168, 153, 164, - 167, 154, 156, 166, 68, 162, 158, 68, 169, 68, - 124, 161, 159, 68, 68, 155, 160, 163, 171, 68, - - 165, 173, 172, 68, 168, 170, 164, 167, 68, 174, - 166, 68, 175, 176, 68, 169, 179, 177, 182, 183, - 68, 68, 180, 68, 68, 171, 68, 68, 173, 172, - 68, 68, 170, 186, 189, 184, 174, 187, 188, 175, - 176, 68, 181, 179, 177, 182, 183, 68, 68, 180, - 191, 125, 68, 125, 125, 68, 125, 190, 131, 196, - 186, 189, 184, 122, 187, 188, 192, 197, 130, 181, - 130, 130, 72, 130, 72, 72, 194, 72, 68, 68, - 195, 68, 198, 205, 190, 204, 671, 68, 68, 68, - 68, 68, 68, 192, 197, 206, 207, 1354, 208, 214, - - 68, 1354, 210, 194, 1354, 209, 211, 195, 68, 133, - 205, 68, 204, 68, 199, 68, 68, 68, 68, 200, - 215, 68, 206, 207, 201, 208, 214, 68, 217, 210, - 202, 203, 209, 211, 219, 212, 216, 68, 213, 68, - 218, 199, 68, 68, 220, 222, 200, 215, 1354, 1354, - 68, 201, 223, 224, 221, 217, 225, 202, 203, 68, - 68, 219, 212, 216, 226, 213, 227, 228, 229, 230, - 68, 68, 232, 233, 1354, 68, 68, 231, 68, 223, - 224, 221, 234, 237, 68, 236, 68, 68, 68, 241, - 68, 226, 68, 68, 235, 229, 230, 68, 68, 232, - - 233, 68, 238, 243, 231, 68, 68, 68, 242, 234, - 237, 244, 236, 239, 240, 68, 245, 246, 250, 247, - 68, 235, 68, 256, 253, 68, 248, 1354, 68, 238, - 243, 68, 1354, 251, 254, 242, 255, 257, 244, 131, - 239, 240, 68, 259, 246, 68, 247, 68, 249, 68, - 252, 253, 68, 258, 68, 68, 262, 68, 68, 68, - 251, 254, 260, 255, 257, 68, 261, 269, 263, 1354, - 259, 1354, 266, 264, 265, 249, 273, 252, 270, 267, - 258, 68, 68, 262, 68, 268, 68, 271, 272, 260, - 68, 68, 278, 261, 68, 263, 68, 274, 68, 266, - - 264, 265, 68, 68, 68, 270, 267, 68, 275, 277, - 68, 279, 268, 68, 271, 272, 276, 68, 68, 278, - 68, 282, 68, 68, 274, 280, 281, 283, 286, 284, - 1354, 287, 285, 288, 289, 275, 277, 68, 279, 68, - 68, 292, 68, 276, 298, 68, 68, 68, 282, 68, - 290, 291, 280, 296, 283, 286, 284, 68, 287, 285, - 288, 289, 293, 294, 297, 68, 295, 301, 68, 300, - 299, 68, 303, 68, 302, 68, 1354, 290, 291, 68, - 296, 68, 68, 306, 305, 312, 68, 307, 1354, 293, - 294, 297, 68, 295, 301, 68, 300, 299, 304, 313, - - 68, 302, 311, 68, 1354, 68, 68, 68, 1354, 316, - 306, 305, 308, 314, 307, 309, 68, 310, 1354, 68, - 68, 68, 68, 68, 315, 304, 313, 333, 319, 311, - 317, 68, 328, 327, 1354, 331, 316, 329, 356, 308, - 314, 68, 309, 131, 310, 68, 318, 68, 361, 332, - 68, 315, 1354, 330, 68, 319, 68, 317, 68, 328, - 327, 68, 331, 334, 329, 335, 336, 1354, 338, 68, - 68, 340, 341, 318, 320, 321, 332, 68, 68, 68, - 330, 68, 337, 339, 322, 345, 323, 324, 325, 68, - 334, 326, 335, 336, 346, 338, 342, 343, 68, 68, - - 68, 320, 321, 68, 347, 68, 344, 348, 68, 337, - 339, 322, 345, 323, 324, 325, 68, 68, 326, 68, - 353, 346, 349, 342, 343, 350, 352, 68, 354, 357, - 355, 347, 358, 344, 348, 68, 360, 1354, 351, 362, - 363, 365, 68, 68, 68, 68, 359, 353, 68, 349, - 68, 68, 350, 352, 68, 354, 357, 355, 68, 358, - 68, 364, 68, 360, 68, 351, 362, 363, 365, 366, - 367, 368, 372, 359, 369, 371, 68, 68, 370, 374, - 375, 68, 376, 380, 1354, 373, 1354, 68, 364, 68, - 1354, 68, 68, 378, 68, 68, 366, 367, 368, 372, - - 68, 369, 371, 68, 68, 370, 374, 375, 377, 376, - 379, 382, 373, 381, 68, 68, 68, 385, 383, 384, - 378, 68, 68, 386, 387, 1354, 393, 1354, 1354, 68, - 1354, 68, 68, 68, 68, 377, 394, 379, 382, 68, - 381, 68, 398, 1354, 385, 383, 384, 68, 397, 395, - 386, 387, 388, 393, 399, 68, 68, 389, 396, 390, - 1354, 400, 401, 394, 1354, 404, 405, 391, 68, 398, - 403, 68, 407, 68, 68, 397, 402, 392, 68, 388, - 68, 399, 68, 406, 389, 396, 390, 68, 400, 401, - 68, 68, 404, 405, 391, 409, 410, 403, 408, 407, - - 411, 412, 413, 402, 392, 68, 68, 68, 415, 416, - 406, 68, 414, 419, 1354, 417, 68, 421, 422, 131, - 418, 423, 409, 410, 68, 408, 68, 420, 412, 413, - 68, 68, 68, 424, 425, 68, 416, 68, 426, 414, - 419, 68, 417, 427, 68, 68, 428, 418, 429, 68, - 430, 431, 68, 434, 420, 432, 433, 1354, 435, 436, - 68, 68, 440, 68, 441, 1354, 443, 1354, 68, 68, - 427, 68, 68, 428, 68, 429, 442, 68, 431, 444, - 68, 68, 432, 433, 68, 435, 436, 437, 68, 440, - 68, 446, 438, 443, 68, 68, 439, 449, 447, 448, - - 450, 445, 68, 442, 451, 453, 444, 454, 68, 452, - 1354, 68, 68, 68, 437, 68, 455, 458, 446, 438, - 463, 68, 459, 439, 449, 447, 448, 450, 445, 68, - 68, 68, 453, 456, 454, 68, 452, 457, 68, 68, - 460, 461, 68, 455, 458, 462, 68, 464, 467, 459, - 68, 68, 468, 465, 1354, 480, 469, 470, 1354, 1354, - 456, 471, 68, 473, 457, 68, 472, 460, 466, 474, - 68, 68, 68, 476, 464, 68, 68, 68, 475, 68, - 465, 68, 68, 469, 470, 477, 68, 479, 471, 478, - 473, 68, 482, 472, 481, 466, 474, 68, 68, 68, - - 476, 68, 68, 483, 485, 475, 484, 488, 487, 486, - 489, 1354, 477, 1354, 479, 68, 478, 68, 68, 482, - 490, 481, 68, 491, 492, 495, 68, 68, 68, 493, - 483, 485, 68, 484, 488, 487, 486, 489, 68, 494, - 68, 496, 497, 68, 499, 68, 68, 490, 498, 500, - 491, 492, 495, 501, 68, 68, 493, 510, 503, 68, - 504, 502, 1354, 506, 131, 505, 494, 68, 496, 497, - 511, 499, 68, 507, 68, 498, 500, 509, 68, 68, - 501, 508, 68, 68, 510, 68, 512, 504, 502, 68, - 506, 68, 505, 68, 519, 68, 1354, 511, 520, 521, - - 507, 68, 523, 522, 509, 1354, 525, 68, 508, 1354, - 526, 524, 1354, 527, 1354, 1354, 68, 68, 513, 1354, - 514, 519, 68, 515, 528, 520, 521, 68, 516, 68, - 522, 68, 68, 525, 517, 518, 530, 526, 524, 68, - 527, 531, 529, 68, 68, 513, 532, 514, 68, 68, - 515, 528, 533, 535, 536, 516, 534, 537, 538, 541, - 68, 517, 518, 530, 68, 68, 539, 1354, 531, 529, - 540, 546, 68, 532, 544, 68, 542, 548, 68, 533, - 535, 68, 545, 534, 549, 543, 541, 547, 68, 68, - 68, 68, 68, 539, 68, 68, 68, 540, 68, 550, - - 551, 544, 68, 542, 552, 553, 68, 1354, 68, 545, - 554, 549, 543, 68, 547, 556, 557, 68, 555, 559, - 561, 68, 68, 68, 68, 562, 550, 551, 558, 560, - 68, 552, 553, 564, 68, 68, 68, 554, 68, 565, - 563, 68, 556, 557, 567, 555, 559, 561, 68, 68, - 566, 568, 562, 570, 574, 558, 560, 68, 68, 569, - 564, 572, 571, 68, 573, 68, 565, 563, 575, 68, - 576, 567, 68, 577, 68, 578, 68, 566, 568, 68, - 580, 574, 581, 579, 68, 68, 569, 583, 572, 571, - 584, 573, 68, 582, 68, 575, 68, 576, 586, 68, - - 68, 587, 578, 585, 68, 588, 589, 580, 68, 68, - 579, 597, 595, 68, 68, 68, 596, 131, 68, 68, - 582, 68, 602, 68, 598, 586, 1354, 1354, 587, 610, - 585, 1354, 588, 589, 590, 68, 591, 68, 597, 595, - 592, 600, 593, 596, 599, 601, 615, 594, 607, 608, - 68, 598, 603, 68, 68, 68, 610, 604, 68, 605, - 611, 590, 68, 591, 612, 609, 68, 592, 600, 593, - 68, 599, 601, 68, 594, 607, 608, 606, 68, 603, - 68, 613, 68, 68, 604, 614, 605, 611, 616, 617, - 618, 612, 609, 68, 68, 619, 620, 621, 622, 623, - - 1354, 1354, 625, 68, 606, 624, 628, 68, 613, 68, - 68, 68, 614, 632, 68, 616, 68, 618, 626, 68, - 68, 627, 619, 620, 621, 622, 623, 68, 629, 625, - 633, 68, 624, 630, 631, 68, 68, 68, 635, 68, - 632, 634, 68, 636, 637, 626, 68, 638, 627, 1354, - 640, 639, 68, 641, 643, 629, 68, 633, 642, 645, - 630, 631, 647, 68, 644, 635, 68, 646, 634, 68, - 636, 68, 649, 68, 648, 68, 68, 640, 68, 650, - 641, 643, 68, 68, 68, 642, 645, 651, 653, 647, - 652, 644, 654, 68, 646, 655, 68, 68, 657, 649, - - 68, 648, 656, 661, 68, 68, 650, 658, 68, 659, - 68, 660, 68, 662, 68, 653, 68, 652, 664, 654, - 665, 68, 655, 663, 1354, 657, 667, 668, 669, 656, - 661, 68, 666, 68, 658, 68, 659, 68, 660, 68, - 662, 68, 670, 672, 68, 673, 679, 680, 674, 68, - 663, 68, 68, 68, 668, 669, 68, 68, 675, 666, - 68, 676, 681, 68, 677, 684, 678, 682, 683, 670, - 672, 685, 673, 68, 68, 674, 68, 68, 68, 687, - 68, 68, 689, 68, 68, 675, 690, 68, 676, 681, - 686, 677, 684, 678, 682, 683, 688, 692, 685, 691, - - 68, 1354, 68, 693, 694, 68, 68, 68, 68, 689, - 695, 68, 700, 690, 698, 706, 701, 686, 68, 68, - 696, 697, 705, 688, 692, 68, 691, 68, 68, 68, - 693, 694, 68, 68, 699, 702, 708, 695, 703, 700, - 68, 698, 68, 701, 704, 707, 68, 696, 697, 705, - 68, 68, 709, 710, 713, 68, 68, 715, 68, 68, - 711, 699, 702, 708, 712, 703, 714, 717, 68, 716, - 718, 704, 707, 719, 1354, 68, 721, 722, 723, 709, - 710, 713, 724, 720, 68, 725, 1354, 68, 68, 68, - 68, 68, 68, 714, 717, 68, 716, 718, 68, 68, - - 719, 68, 726, 721, 722, 723, 732, 727, 733, 735, - 720, 1354, 736, 68, 728, 734, 68, 742, 68, 729, - 737, 730, 68, 731, 68, 68, 738, 68, 68, 726, - 68, 68, 68, 732, 727, 733, 735, 743, 739, 736, - 740, 728, 734, 747, 68, 68, 729, 737, 730, 68, - 731, 68, 741, 738, 68, 745, 744, 749, 746, 750, - 751, 748, 752, 759, 68, 739, 68, 740, 68, 68, - 68, 753, 754, 755, 760, 757, 762, 68, 1354, 741, - 68, 68, 745, 744, 68, 746, 750, 68, 748, 752, - 758, 68, 756, 68, 68, 68, 68, 763, 753, 754, - - 755, 68, 757, 761, 764, 68, 765, 68, 766, 767, - 68, 769, 68, 770, 768, 68, 68, 758, 68, 756, - 68, 771, 68, 772, 763, 68, 773, 774, 68, 776, - 761, 764, 68, 765, 68, 68, 767, 775, 68, 68, - 770, 768, 68, 777, 782, 778, 781, 68, 771, 779, - 772, 783, 68, 773, 774, 68, 776, 780, 68, 785, - 68, 784, 1354, 786, 775, 789, 68, 787, 68, 791, - 777, 782, 68, 781, 788, 68, 68, 68, 783, 792, - 793, 790, 68, 800, 780, 795, 785, 68, 784, 68, - 786, 68, 789, 796, 787, 794, 791, 797, 801, 68, - - 802, 788, 68, 68, 68, 68, 792, 793, 790, 798, - 799, 803, 795, 805, 68, 68, 808, 804, 68, 806, - 796, 68, 794, 807, 797, 1354, 68, 802, 814, 68, - 68, 809, 68, 68, 810, 813, 798, 799, 803, 68, - 805, 812, 68, 68, 804, 811, 68, 815, 820, 68, - 68, 819, 816, 824, 68, 68, 68, 817, 809, 68, - 68, 810, 813, 818, 68, 68, 822, 823, 812, 821, - 826, 68, 811, 825, 815, 820, 68, 828, 819, 816, - 824, 68, 832, 829, 817, 830, 835, 68, 68, 68, - 818, 827, 68, 822, 823, 831, 821, 826, 68, 833, - - 825, 834, 68, 836, 68, 68, 837, 838, 68, 839, - 829, 840, 830, 68, 841, 842, 68, 68, 827, 844, - 843, 68, 831, 68, 1354, 846, 833, 68, 834, 848, - 68, 68, 68, 68, 838, 68, 839, 68, 840, 847, - 849, 841, 842, 845, 68, 68, 68, 843, 860, 850, - 68, 68, 846, 851, 855, 852, 848, 68, 853, 1354, - 854, 68, 856, 68, 68, 857, 847, 849, 858, 68, - 845, 68, 68, 863, 859, 68, 850, 861, 862, 68, - 851, 855, 852, 1354, 68, 853, 68, 854, 864, 856, - 866, 68, 857, 68, 68, 858, 68, 865, 867, 68, - - 863, 859, 1354, 869, 861, 862, 868, 875, 870, 872, - 68, 871, 68, 877, 68, 864, 68, 866, 68, 873, - 874, 876, 68, 68, 865, 1354, 880, 883, 1354, 68, - 869, 68, 68, 868, 68, 870, 872, 878, 871, 68, - 877, 881, 68, 68, 68, 879, 873, 874, 876, 882, - 884, 888, 68, 880, 885, 887, 68, 68, 68, 886, - 892, 68, 891, 68, 878, 68, 889, 68, 881, 890, - 893, 68, 879, 68, 901, 897, 882, 884, 888, 894, - 895, 885, 887, 68, 68, 896, 886, 68, 902, 891, - 900, 68, 898, 889, 68, 899, 890, 893, 909, 904, - - 905, 68, 897, 68, 903, 68, 894, 895, 68, 68, - 68, 68, 896, 68, 908, 68, 906, 900, 907, 898, - 68, 910, 899, 68, 68, 909, 904, 905, 911, 68, - 912, 903, 68, 913, 914, 915, 916, 68, 1354, 917, - 1354, 908, 68, 906, 918, 907, 1354, 924, 910, 921, - 919, 920, 926, 68, 1354, 911, 68, 1354, 68, 68, - 913, 68, 915, 68, 922, 68, 917, 68, 68, 927, - 68, 918, 923, 68, 924, 925, 921, 919, 920, 926, - 68, 928, 929, 930, 68, 932, 933, 934, 931, 68, - 1354, 922, 68, 938, 935, 942, 927, 1354, 68, 923, - - 946, 936, 925, 68, 68, 68, 68, 68, 928, 929, - 930, 937, 932, 933, 68, 931, 68, 939, 940, 941, - 943, 935, 68, 944, 68, 945, 68, 68, 936, 947, - 949, 68, 68, 950, 948, 68, 951, 68, 937, 952, - 68, 68, 68, 68, 939, 940, 941, 68, 953, 954, - 944, 956, 68, 958, 955, 1354, 947, 949, 957, 960, - 68, 948, 959, 951, 68, 961, 68, 68, 962, 966, - 967, 970, 1354, 969, 1354, 68, 68, 68, 68, 68, - 68, 955, 68, 972, 68, 957, 68, 968, 963, 959, - 964, 68, 961, 975, 68, 965, 966, 967, 68, 68, - - 969, 971, 68, 68, 973, 974, 976, 977, 978, 68, - 972, 68, 979, 68, 968, 963, 980, 964, 68, 982, - 68, 984, 965, 68, 981, 68, 68, 68, 971, 986, - 68, 973, 974, 976, 977, 978, 983, 985, 987, 979, - 988, 989, 68, 980, 68, 991, 982, 990, 993, 68, - 994, 981, 68, 992, 68, 995, 986, 68, 68, 68, - 68, 68, 68, 983, 985, 68, 998, 988, 989, 1001, - 1000, 68, 991, 68, 990, 993, 996, 994, 999, 1002, - 992, 997, 995, 68, 68, 1003, 1005, 1006, 1007, 1004, - 1354, 1354, 68, 68, 1008, 1009, 1010, 1000, 1012, 1011, - - 68, 68, 68, 996, 1014, 999, 68, 1013, 997, 68, - 1015, 68, 68, 1017, 1006, 1016, 68, 68, 68, 68, - 1018, 1008, 1009, 1010, 1019, 68, 1011, 1020, 1022, 68, - 1024, 1021, 1027, 1023, 1013, 68, 1029, 1015, 1031, 68, - 68, 1025, 1016, 1028, 1026, 68, 68, 68, 68, 68, - 68, 1019, 68, 68, 1020, 1022, 68, 1024, 1021, 1027, - 1023, 68, 1030, 68, 1032, 1354, 1033, 1035, 1025, 68, - 1028, 1026, 1034, 1037, 68, 68, 1036, 1354, 1038, 1039, - 68, 1044, 1354, 1040, 1046, 68, 1041, 1042, 68, 1030, - 1045, 1032, 68, 1033, 68, 1043, 68, 68, 68, 1034, - - 1037, 68, 68, 1036, 68, 1038, 1039, 68, 1044, 68, - 1040, 1046, 68, 1041, 1042, 1047, 1048, 1045, 1049, 1050, - 1051, 68, 1043, 1354, 68, 1053, 1052, 1054, 1056, 1055, - 1058, 68, 1057, 1060, 68, 1059, 1062, 68, 1354, 68, - 1078, 68, 1047, 1048, 1354, 1049, 68, 1051, 68, 68, - 68, 68, 1053, 1052, 1054, 1056, 1055, 68, 1061, 1057, - 1060, 68, 1059, 68, 1063, 1064, 1067, 68, 1065, 1066, - 1354, 68, 1068, 1072, 1071, 1069, 1070, 1354, 1073, 68, - 68, 1354, 1354, 68, 68, 1061, 1074, 68, 68, 68, - 1075, 1063, 1064, 1067, 68, 1065, 1066, 68, 68, 1068, - - 1072, 1071, 1069, 1070, 1076, 1073, 68, 68, 1077, 1079, - 1080, 68, 1081, 1074, 1084, 1082, 1085, 1075, 1083, 1088, - 68, 1354, 1089, 1354, 1354, 1086, 68, 68, 68, 1087, - 1092, 1076, 1091, 1094, 1354, 1077, 1079, 68, 68, 1081, - 68, 1084, 1082, 68, 68, 1083, 68, 68, 68, 1089, - 1090, 1093, 1086, 68, 68, 68, 1087, 1092, 1096, 1091, - 1094, 1095, 68, 68, 1097, 68, 68, 68, 1098, 1099, - 1102, 1100, 1107, 1101, 1354, 68, 68, 1090, 1093, 68, - 1103, 1354, 1106, 1108, 1110, 1096, 68, 1104, 1095, 1105, - 1111, 1097, 1109, 1113, 1112, 1098, 1099, 68, 1100, 68, - - 1101, 68, 68, 68, 68, 1114, 68, 1103, 68, 1106, - 68, 68, 1116, 1117, 1104, 1115, 1105, 68, 1118, 1109, - 68, 1112, 1119, 68, 1120, 1121, 68, 1354, 1123, 1122, - 1125, 1127, 68, 68, 68, 1128, 1126, 1129, 68, 1116, - 68, 1130, 1115, 1124, 68, 1118, 68, 1131, 1354, 68, - 1133, 1120, 1121, 68, 68, 1123, 1122, 68, 68, 1134, - 1132, 68, 68, 1126, 1129, 68, 1135, 68, 1130, 1137, - 1124, 1138, 68, 1136, 1131, 68, 1139, 1133, 1141, 68, - 68, 1140, 1146, 68, 1142, 1143, 1134, 1132, 1144, 1354, - 1145, 68, 68, 1135, 68, 1150, 1137, 1147, 1138, 68, - - 1136, 1151, 1149, 1139, 1152, 1148, 68, 68, 1140, 68, - 68, 1142, 1143, 68, 68, 1144, 68, 1145, 1153, 1154, - 1155, 1156, 1150, 68, 1147, 68, 68, 1157, 1151, 1149, - 1158, 1152, 1148, 1159, 1160, 1162, 1161, 68, 1163, 1354, - 1164, 68, 68, 1166, 68, 68, 1154, 1155, 68, 68, - 1165, 68, 1169, 1167, 1157, 1168, 68, 1158, 68, 68, - 1159, 1160, 68, 1161, 1170, 1163, 68, 1164, 1171, 1172, - 1166, 1173, 68, 1174, 1175, 1354, 1177, 1165, 68, 68, - 1167, 68, 1168, 1176, 1178, 68, 68, 1179, 68, 1354, - 1180, 1170, 1181, 1183, 1182, 68, 68, 1184, 68, 68, - - 1174, 1175, 68, 1177, 1185, 68, 1192, 1186, 1188, 68, - 1176, 68, 1193, 1189, 1179, 68, 68, 1180, 1187, 1181, - 68, 1182, 68, 68, 68, 1191, 1190, 68, 68, 1196, - 68, 68, 68, 68, 1186, 1188, 1194, 68, 1198, 1193, - 1189, 68, 1195, 68, 1197, 1187, 1199, 68, 1200, 68, - 1201, 68, 1191, 1190, 1202, 68, 1196, 1203, 1354, 1204, - 1205, 1206, 1207, 1194, 1354, 1198, 68, 1208, 1212, 1195, - 68, 1197, 68, 1199, 68, 1200, 68, 1201, 1354, 68, - 1213, 68, 1209, 1354, 1203, 68, 1204, 68, 1206, 1207, - 1210, 68, 1211, 1214, 1208, 68, 1215, 1219, 1220, 1216, - - 68, 68, 1217, 1221, 68, 68, 68, 1218, 1223, 1209, - 68, 68, 1225, 1222, 68, 68, 1226, 1210, 1227, 1211, - 1214, 68, 68, 1215, 1219, 68, 1216, 1228, 1224, 1217, - 1221, 1229, 68, 1354, 1218, 68, 68, 1230, 1231, 68, - 1222, 1233, 1232, 68, 68, 1227, 1237, 1238, 1234, 68, - 1235, 1236, 1239, 68, 1228, 1224, 1354, 1240, 1229, 68, - 68, 68, 1241, 68, 1230, 1231, 1242, 1243, 1233, 1232, - 68, 1244, 68, 68, 68, 1234, 1245, 1235, 1236, 1246, - 1252, 1247, 68, 68, 68, 1248, 1249, 1253, 68, 68, - 68, 1254, 1250, 1242, 1243, 68, 1255, 68, 1244, 68, - - 68, 1251, 1256, 1245, 68, 68, 1246, 68, 1247, 68, - 1259, 68, 1248, 1249, 1253, 68, 1257, 1258, 68, 1250, - 1260, 1354, 1261, 1255, 68, 1263, 1262, 68, 1251, 1256, - 1264, 68, 1265, 1266, 68, 1267, 1268, 68, 1269, 1354, - 1354, 68, 1274, 1257, 1258, 1354, 68, 1260, 68, 1261, - 68, 1270, 68, 1262, 1271, 1272, 1273, 68, 1276, 1265, - 1266, 68, 68, 68, 68, 1269, 68, 1281, 68, 1274, - 1277, 1279, 68, 1275, 68, 1278, 68, 68, 1270, 1280, - 68, 1271, 1272, 1273, 68, 1276, 68, 1282, 1283, 68, - 1284, 68, 1285, 1286, 1281, 1354, 68, 1277, 1279, 1289, - - 1275, 1287, 1278, 1288, 1291, 68, 1280, 1290, 1354, 1293, - 68, 68, 1296, 68, 1282, 68, 68, 1284, 1292, 1285, - 1286, 68, 68, 1295, 1294, 1297, 1289, 68, 1287, 1304, - 1288, 1291, 68, 68, 1290, 68, 1293, 1298, 1299, 68, - 68, 1300, 1306, 68, 1301, 1292, 68, 1303, 68, 1309, - 1295, 1294, 1297, 1302, 68, 68, 68, 1305, 1310, 1314, - 68, 1316, 1308, 1307, 1298, 1299, 68, 68, 1300, 68, - 68, 1301, 1312, 1311, 1303, 1313, 68, 1315, 1320, 68, - 1302, 68, 68, 1317, 1305, 68, 68, 68, 68, 1308, - 1307, 68, 68, 1318, 1319, 1321, 1322, 1323, 1324, 1312, - - 1311, 1325, 1313, 1326, 1315, 68, 68, 1327, 1329, 1354, - 1317, 1330, 1328, 1333, 1331, 1335, 68, 1354, 1337, 68, - 1318, 1319, 68, 68, 1323, 68, 1334, 68, 1325, 68, - 68, 68, 1336, 68, 1327, 68, 68, 1332, 1330, 1328, - 68, 1331, 68, 1339, 68, 68, 1338, 1340, 1341, 68, - 1342, 1343, 68, 1334, 1344, 68, 1345, 1346, 68, 1336, - 1347, 1348, 1353, 1351, 1332, 1354, 1354, 68, 1349, 68, - 1339, 1354, 1354, 1338, 68, 68, 68, 68, 68, 1350, - 68, 1344, 68, 1345, 1346, 1352, 68, 1347, 68, 68, - 1351, 68, 1354, 68, 1354, 1349, 1354, 1354, 1354, 1354, - - 1354, 1354, 1354, 1354, 1354, 1354, 1350, 1354, 1354, 1354, - 1354, 1354, 1352, 40, 40, 40, 40, 40, 40, 40, - 45, 45, 45, 45, 45, 45, 45, 50, 50, 50, - 50, 50, 50, 50, 56, 56, 56, 56, 56, 56, - 56, 61, 61, 61, 61, 61, 61, 61, 71, 71, - 1354, 71, 71, 71, 71, 121, 121, 1354, 1354, 1354, - 121, 121, 123, 123, 1354, 1354, 123, 1354, 123, 125, - 1354, 1354, 1354, 1354, 1354, 125, 128, 128, 1354, 1354, - 1354, 128, 128, 130, 1354, 1354, 1354, 1354, 1354, 130, - 132, 132, 1354, 132, 132, 132, 132, 72, 72, 1354, - - 72, 72, 72, 72, 13, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354 + 63, 64, 76, 85, 180, 73, 68, 690, 68, 65, + 84, 74, 75, 132, 77, 65, 80, 122, 122, 68, + 81, 78, 89, 82, 94, 90, 83, 66, 79, 76, + 85, 87, 91, 66, 92, 68, 65, 68, 68, 88, + 68, 77, 65, 80, 93, 68, 68, 81, 78, 89, + 82, 94, 90, 83, 136, 79, 68, 68, 87, 91, + + 95, 92, 96, 130, 100, 128, 88, 103, 101, 127, + 97, 93, 68, 68, 129, 129, 98, 140, 68, 124, + 99, 136, 124, 193, 102, 125, 68, 95, 68, 96, + 68, 100, 104, 123, 103, 101, 108, 97, 105, 68, + 118, 106, 111, 98, 140, 119, 109, 99, 107, 110, + 68, 102, 112, 68, 68, 137, 113, 114, 68, 104, + 115, 135, 116, 108, 68, 105, 120, 118, 106, 111, + 121, 132, 119, 109, 132, 107, 110, 117, 68, 112, + 130, 128, 137, 113, 114, 127, 68, 115, 135, 116, + 125, 123, 68, 120, 68, 1382, 126, 121, 126, 126, + + 72, 126, 72, 72, 117, 72, 131, 139, 131, 131, + 67, 131, 67, 67, 72, 67, 72, 72, 138, 72, + 67, 142, 141, 143, 72, 68, 145, 147, 144, 149, + 1382, 68, 68, 68, 139, 68, 68, 134, 68, 148, + 68, 151, 1382, 146, 150, 138, 68, 152, 142, 141, + 143, 73, 153, 68, 147, 144, 149, 68, 154, 158, + 163, 155, 1382, 68, 68, 68, 148, 68, 151, 68, + 146, 150, 159, 161, 152, 156, 164, 162, 165, 153, + 1382, 167, 68, 1382, 1382, 154, 158, 163, 155, 68, + 166, 168, 160, 169, 68, 68, 1382, 68, 171, 159, + + 161, 68, 156, 164, 162, 165, 170, 68, 167, 1382, + 68, 68, 173, 68, 172, 175, 174, 166, 168, 160, + 169, 68, 68, 68, 176, 171, 182, 178, 177, 181, + 1382, 1382, 1382, 170, 68, 68, 179, 201, 68, 173, + 68, 172, 175, 174, 68, 68, 183, 185, 184, 188, + 1382, 176, 68, 182, 178, 177, 181, 68, 68, 186, + 187, 190, 189, 179, 68, 68, 1382, 1382, 68, 1382, + 68, 68, 1382, 183, 185, 184, 188, 68, 126, 191, + 126, 126, 192, 126, 197, 1382, 186, 187, 190, 189, + 131, 68, 131, 131, 72, 131, 72, 72, 194, 72, + + 195, 196, 198, 132, 68, 214, 191, 199, 200, 192, + 68, 197, 207, 68, 1382, 208, 210, 68, 209, 68, + 68, 211, 1382, 68, 1382, 194, 1382, 195, 196, 212, + 68, 134, 214, 68, 199, 200, 202, 213, 68, 207, + 68, 203, 208, 210, 68, 209, 204, 1382, 211, 217, + 68, 68, 205, 206, 215, 218, 212, 216, 68, 68, + 219, 1382, 222, 202, 213, 220, 1382, 221, 203, 68, + 223, 226, 68, 204, 229, 224, 217, 68, 68, 205, + 206, 215, 218, 227, 216, 225, 68, 219, 231, 228, + 232, 230, 220, 68, 221, 68, 68, 223, 238, 1382, + + 233, 68, 68, 234, 235, 68, 68, 236, 1382, 237, + 227, 68, 225, 68, 68, 240, 228, 68, 230, 68, + 68, 68, 68, 239, 68, 238, 241, 233, 68, 245, + 234, 235, 242, 249, 236, 68, 237, 68, 243, 244, + 1382, 252, 240, 247, 246, 1382, 250, 68, 68, 248, + 239, 68, 251, 241, 68, 254, 260, 255, 1382, 242, + 68, 259, 257, 253, 68, 243, 244, 258, 68, 68, + 247, 246, 68, 250, 256, 68, 248, 132, 68, 251, + 68, 261, 68, 262, 255, 264, 68, 68, 259, 257, + 253, 263, 266, 270, 258, 68, 265, 271, 68, 267, + + 68, 256, 268, 68, 68, 68, 269, 272, 261, 273, + 262, 274, 264, 276, 278, 1382, 68, 68, 263, 266, + 270, 68, 275, 265, 271, 68, 267, 68, 68, 268, + 68, 277, 280, 269, 272, 68, 273, 279, 284, 68, + 276, 68, 68, 282, 68, 68, 281, 68, 283, 275, + 1382, 286, 68, 68, 285, 287, 288, 68, 277, 280, + 298, 289, 293, 1382, 279, 284, 68, 292, 68, 290, + 282, 1382, 291, 281, 68, 283, 68, 68, 286, 68, + 68, 285, 295, 288, 294, 68, 68, 68, 289, 293, + 296, 297, 299, 302, 292, 303, 290, 68, 68, 291, + + 300, 304, 305, 301, 309, 68, 306, 1382, 1382, 295, + 68, 294, 311, 68, 307, 68, 68, 296, 297, 299, + 302, 312, 303, 313, 68, 319, 68, 300, 68, 305, + 301, 308, 68, 306, 68, 68, 310, 320, 68, 311, + 314, 307, 318, 68, 315, 68, 321, 316, 312, 317, + 313, 1382, 68, 68, 322, 68, 68, 323, 308, 68, + 68, 68, 324, 310, 320, 334, 326, 314, 338, 318, + 68, 315, 335, 321, 316, 337, 317, 68, 325, 68, + 68, 322, 336, 68, 323, 1382, 68, 339, 132, 324, + 68, 340, 334, 326, 68, 338, 1382, 341, 342, 335, + + 343, 344, 337, 360, 68, 325, 327, 328, 345, 336, + 68, 1382, 68, 346, 339, 68, 329, 347, 330, 331, + 332, 68, 68, 333, 341, 342, 68, 343, 348, 349, + 360, 68, 68, 327, 328, 345, 354, 1382, 351, 68, + 346, 350, 352, 329, 347, 330, 331, 332, 68, 68, + 333, 353, 355, 68, 361, 363, 364, 68, 356, 357, + 370, 68, 1382, 354, 68, 351, 362, 68, 350, 352, + 358, 365, 68, 68, 367, 68, 68, 366, 353, 355, + 368, 361, 363, 359, 372, 356, 357, 68, 68, 68, + 369, 68, 68, 362, 68, 375, 68, 358, 365, 371, + + 68, 367, 68, 373, 366, 68, 374, 368, 377, 376, + 359, 372, 378, 380, 68, 379, 68, 369, 68, 68, + 1382, 68, 375, 1382, 381, 389, 371, 382, 387, 68, + 373, 68, 383, 374, 1382, 377, 376, 384, 68, 378, + 380, 68, 379, 68, 68, 68, 385, 68, 386, 388, + 68, 381, 1382, 68, 382, 387, 68, 390, 391, 383, + 393, 68, 394, 68, 384, 392, 68, 396, 68, 395, + 403, 68, 397, 385, 68, 386, 388, 68, 68, 404, + 68, 407, 1382, 68, 390, 391, 405, 393, 68, 394, + 68, 68, 392, 408, 396, 406, 395, 403, 1382, 397, + + 398, 409, 411, 68, 410, 399, 404, 400, 407, 412, + 414, 413, 1382, 416, 68, 401, 415, 68, 68, 68, + 408, 68, 406, 68, 68, 402, 68, 398, 409, 411, + 68, 410, 399, 417, 400, 68, 412, 414, 413, 418, + 416, 419, 401, 415, 420, 421, 422, 68, 423, 1382, + 424, 68, 402, 68, 425, 426, 428, 68, 432, 427, + 417, 68, 433, 430, 68, 431, 418, 132, 419, 434, + 68, 420, 429, 422, 68, 423, 68, 424, 435, 68, + 68, 68, 426, 428, 68, 68, 427, 68, 436, 68, + 430, 437, 431, 1382, 439, 441, 438, 440, 445, 429, + + 68, 444, 68, 443, 442, 68, 447, 1382, 68, 451, + 446, 453, 1382, 463, 473, 68, 68, 1382, 474, 68, + 68, 439, 68, 438, 440, 68, 68, 68, 444, 68, + 443, 442, 68, 447, 448, 68, 451, 446, 452, 449, + 455, 454, 68, 450, 68, 68, 1382, 68, 459, 456, + 1382, 458, 460, 1382, 1382, 1382, 1382, 1382, 68, 68, + 464, 448, 68, 467, 68, 452, 449, 455, 454, 461, + 450, 457, 68, 68, 68, 459, 456, 462, 458, 460, + 68, 68, 465, 466, 468, 68, 469, 464, 471, 475, + 467, 1382, 68, 68, 470, 472, 461, 479, 457, 68, + + 476, 480, 1382, 1382, 462, 1382, 68, 68, 477, 465, + 466, 468, 68, 469, 481, 471, 68, 68, 68, 483, + 68, 470, 472, 478, 488, 482, 486, 476, 68, 484, + 487, 485, 68, 68, 68, 477, 489, 68, 68, 68, + 68, 481, 493, 490, 68, 495, 483, 68, 492, 1382, + 478, 488, 482, 486, 68, 68, 484, 487, 485, 491, + 68, 494, 496, 489, 500, 497, 498, 1382, 68, 68, + 490, 68, 495, 68, 499, 492, 501, 68, 68, 503, + 502, 1382, 68, 504, 1382, 68, 491, 68, 494, 496, + 505, 500, 497, 498, 507, 506, 68, 508, 509, 68, + + 512, 499, 68, 501, 68, 68, 503, 502, 510, 511, + 504, 68, 68, 513, 68, 68, 516, 505, 514, 68, + 1382, 507, 506, 68, 508, 509, 515, 512, 517, 519, + 132, 518, 522, 68, 523, 510, 511, 521, 68, 525, + 513, 520, 68, 526, 68, 514, 68, 68, 524, 68, + 533, 68, 68, 515, 1382, 517, 519, 537, 518, 522, + 68, 523, 68, 535, 521, 68, 525, 536, 520, 68, + 534, 542, 68, 1382, 68, 524, 527, 533, 528, 68, + 538, 529, 1382, 539, 68, 541, 530, 540, 1382, 1382, + 535, 68, 531, 532, 536, 68, 543, 534, 542, 68, + + 68, 68, 546, 527, 547, 528, 550, 538, 529, 68, + 539, 68, 541, 530, 540, 544, 545, 549, 68, 531, + 532, 68, 68, 543, 68, 548, 68, 551, 68, 546, + 68, 547, 552, 550, 553, 554, 1382, 68, 1382, 555, + 1382, 558, 544, 545, 549, 556, 561, 559, 557, 563, + 68, 560, 548, 1382, 68, 565, 1382, 562, 1382, 68, + 68, 567, 554, 68, 68, 68, 555, 68, 558, 68, + 566, 68, 556, 68, 559, 557, 68, 564, 560, 68, + 68, 568, 565, 68, 562, 68, 569, 68, 567, 571, + 572, 577, 573, 68, 570, 68, 574, 566, 68, 576, + + 575, 578, 579, 68, 564, 68, 68, 580, 568, 68, + 68, 68, 68, 569, 581, 68, 571, 572, 577, 573, + 582, 570, 583, 574, 68, 585, 576, 575, 578, 579, + 584, 586, 68, 68, 580, 1382, 587, 68, 68, 589, + 588, 581, 590, 68, 591, 593, 592, 582, 68, 583, + 68, 594, 585, 597, 68, 599, 595, 584, 600, 68, + 596, 598, 68, 587, 68, 68, 589, 588, 68, 590, + 602, 591, 68, 592, 68, 68, 68, 601, 594, 611, + 618, 619, 68, 595, 68, 132, 603, 596, 598, 68, + 605, 1382, 604, 68, 68, 68, 612, 602, 613, 1382, + + 68, 68, 68, 68, 601, 615, 611, 618, 68, 614, + 616, 617, 68, 603, 1382, 626, 68, 605, 68, 604, + 606, 68, 607, 612, 68, 613, 608, 625, 609, 624, + 68, 627, 615, 610, 1382, 632, 614, 616, 617, 1382, + 68, 620, 626, 628, 68, 629, 621, 606, 622, 607, + 630, 68, 634, 608, 625, 609, 624, 68, 627, 633, + 610, 631, 68, 68, 68, 68, 623, 68, 620, 68, + 628, 635, 629, 621, 638, 622, 636, 630, 637, 639, + 642, 640, 68, 68, 68, 1382, 633, 68, 631, 641, + 646, 645, 68, 623, 655, 68, 68, 68, 635, 68, + + 644, 638, 68, 636, 643, 637, 639, 642, 640, 68, + 648, 68, 647, 68, 649, 653, 641, 1382, 645, 68, + 68, 68, 650, 651, 652, 68, 68, 644, 654, 660, + 656, 643, 658, 68, 657, 659, 661, 648, 1382, 647, + 662, 649, 653, 665, 68, 68, 68, 68, 68, 650, + 651, 652, 663, 68, 68, 654, 660, 667, 68, 658, + 664, 68, 659, 661, 666, 68, 68, 662, 669, 668, + 665, 670, 671, 672, 1382, 1382, 68, 673, 68, 663, + 68, 676, 68, 674, 667, 675, 68, 664, 68, 68, + 68, 666, 68, 68, 678, 669, 668, 677, 68, 671, + + 672, 68, 681, 679, 673, 680, 682, 683, 676, 684, + 674, 68, 675, 1382, 68, 685, 68, 686, 688, 689, + 687, 678, 68, 692, 677, 68, 68, 68, 68, 681, + 679, 68, 680, 682, 68, 693, 700, 698, 68, 691, + 68, 68, 685, 68, 68, 688, 689, 687, 68, 694, + 692, 68, 695, 697, 699, 696, 701, 702, 68, 703, + 68, 704, 693, 700, 706, 68, 691, 68, 68, 68, + 68, 707, 68, 68, 709, 705, 694, 1382, 710, 695, + 697, 68, 696, 701, 702, 68, 703, 68, 704, 711, + 708, 706, 68, 712, 715, 713, 714, 68, 68, 68, + + 68, 709, 705, 68, 720, 710, 716, 1382, 722, 718, + 68, 726, 68, 717, 725, 68, 711, 708, 68, 68, + 712, 715, 713, 714, 68, 68, 719, 723, 721, 68, + 727, 720, 68, 716, 68, 722, 718, 68, 724, 68, + 717, 725, 68, 68, 728, 68, 730, 731, 734, 729, + 733, 732, 735, 719, 723, 721, 68, 727, 68, 736, + 737, 738, 68, 68, 741, 724, 740, 739, 68, 745, + 68, 728, 743, 730, 742, 734, 729, 733, 68, 735, + 746, 747, 68, 68, 1382, 68, 68, 737, 738, 68, + 68, 741, 68, 740, 739, 744, 68, 748, 754, 743, + + 68, 742, 753, 68, 68, 749, 756, 755, 747, 758, + 750, 68, 751, 757, 752, 68, 759, 68, 68, 68, + 68, 68, 744, 68, 748, 754, 68, 763, 762, 753, + 68, 760, 749, 756, 755, 68, 758, 750, 761, 751, + 757, 752, 765, 759, 68, 764, 766, 68, 768, 767, + 769, 771, 770, 773, 68, 762, 68, 68, 760, 68, + 772, 774, 775, 777, 776, 761, 781, 782, 68, 68, + 68, 68, 764, 766, 780, 768, 767, 68, 68, 770, + 68, 779, 68, 68, 68, 68, 778, 772, 774, 775, + 777, 776, 783, 784, 68, 68, 786, 68, 68, 785, + + 787, 780, 68, 788, 68, 789, 790, 791, 779, 795, + 68, 1382, 68, 778, 68, 792, 68, 68, 793, 783, + 794, 796, 68, 786, 68, 68, 785, 787, 68, 68, + 68, 798, 789, 790, 800, 68, 795, 797, 68, 68, + 68, 805, 792, 803, 68, 793, 799, 794, 796, 801, + 68, 804, 807, 802, 808, 1382, 68, 806, 798, 68, + 68, 800, 809, 68, 797, 814, 68, 810, 805, 811, + 803, 68, 818, 799, 812, 68, 816, 68, 804, 807, + 68, 808, 68, 813, 806, 815, 68, 68, 817, 809, + 68, 68, 814, 820, 810, 819, 811, 68, 68, 818, + + 821, 812, 822, 816, 823, 68, 68, 68, 824, 826, + 813, 825, 815, 1382, 68, 817, 832, 828, 827, 1382, + 820, 830, 819, 829, 68, 831, 833, 821, 837, 822, + 68, 68, 838, 834, 68, 68, 68, 68, 825, 68, + 68, 68, 846, 68, 828, 827, 835, 68, 836, 68, + 829, 839, 68, 833, 840, 837, 68, 841, 842, 68, + 834, 843, 68, 68, 844, 68, 68, 845, 68, 846, + 68, 847, 848, 835, 68, 836, 849, 852, 839, 68, + 851, 840, 850, 853, 841, 842, 856, 68, 843, 854, + 68, 844, 858, 68, 845, 68, 859, 857, 847, 848, + + 68, 855, 860, 849, 68, 68, 68, 851, 68, 850, + 853, 861, 68, 862, 68, 863, 854, 68, 864, 858, + 865, 867, 68, 859, 857, 866, 869, 68, 855, 868, + 870, 872, 68, 68, 871, 873, 68, 68, 68, 68, + 68, 68, 863, 68, 68, 864, 874, 865, 867, 876, + 877, 68, 866, 68, 878, 875, 868, 870, 872, 68, + 68, 871, 873, 68, 879, 880, 884, 68, 881, 68, + 887, 68, 68, 874, 883, 68, 876, 877, 882, 885, + 886, 878, 875, 68, 888, 68, 890, 68, 68, 893, + 68, 879, 880, 884, 889, 881, 891, 887, 68, 68, + + 892, 883, 894, 895, 898, 882, 896, 886, 68, 897, + 68, 68, 68, 890, 68, 68, 68, 900, 899, 901, + 68, 889, 68, 891, 68, 902, 68, 892, 68, 894, + 895, 898, 903, 896, 907, 904, 897, 909, 906, 68, + 908, 68, 68, 905, 900, 899, 68, 68, 910, 68, + 68, 68, 902, 911, 68, 68, 918, 912, 914, 903, + 68, 907, 904, 68, 913, 906, 917, 908, 68, 915, + 905, 919, 916, 927, 1382, 910, 68, 68, 68, 920, + 911, 921, 922, 68, 912, 914, 923, 68, 928, 926, + 929, 913, 68, 917, 68, 68, 915, 68, 919, 916, + + 68, 68, 924, 931, 68, 925, 920, 68, 921, 922, + 930, 938, 68, 923, 932, 68, 926, 929, 935, 933, + 68, 68, 934, 936, 68, 940, 937, 68, 943, 924, + 931, 68, 925, 941, 68, 68, 942, 930, 939, 1382, + 1382, 932, 68, 68, 68, 935, 933, 68, 944, 934, + 936, 947, 945, 937, 68, 948, 68, 949, 946, 68, + 941, 965, 68, 942, 950, 939, 68, 953, 955, 68, + 68, 952, 68, 954, 68, 944, 68, 951, 947, 945, + 68, 956, 948, 957, 949, 946, 961, 960, 68, 958, + 68, 950, 68, 959, 953, 955, 68, 68, 952, 68, + + 954, 968, 962, 68, 951, 68, 963, 68, 956, 964, + 957, 966, 969, 68, 960, 68, 958, 970, 967, 971, + 959, 68, 68, 972, 68, 973, 68, 68, 968, 962, + 977, 979, 980, 963, 974, 975, 964, 68, 966, 68, + 68, 976, 978, 68, 68, 967, 971, 981, 68, 68, + 68, 983, 982, 985, 984, 989, 68, 68, 68, 68, + 987, 974, 975, 68, 986, 996, 68, 988, 976, 978, + 990, 68, 991, 993, 997, 1382, 68, 992, 68, 982, + 68, 984, 68, 994, 68, 68, 68, 68, 995, 1001, + 68, 986, 996, 68, 988, 68, 999, 990, 1000, 991, + + 993, 68, 998, 68, 992, 68, 1002, 68, 1003, 1005, + 994, 1004, 1006, 68, 1007, 995, 1001, 1008, 68, 1009, + 68, 1010, 68, 999, 1011, 1000, 1014, 68, 1382, 998, + 68, 68, 1013, 68, 1015, 1003, 1005, 1029, 1004, 1006, + 68, 1007, 1012, 68, 1008, 1016, 1009, 1017, 1010, 68, + 1018, 1023, 68, 68, 68, 68, 68, 1019, 1020, 1013, + 1021, 1015, 68, 68, 1022, 68, 1026, 1027, 68, 1012, + 68, 1030, 1016, 68, 1017, 1031, 1028, 1018, 68, 1032, + 1033, 68, 68, 1024, 1019, 1020, 1034, 1021, 1025, 68, + 1035, 1022, 1036, 68, 1027, 1037, 1045, 1038, 68, 68, + + 1039, 68, 68, 1028, 1040, 1043, 68, 68, 1042, 1041, + 1024, 68, 68, 1034, 68, 1025, 1044, 1046, 68, 1036, + 68, 68, 1037, 68, 1038, 1047, 1048, 1039, 1049, 1050, + 1051, 1057, 1043, 1054, 1059, 68, 1041, 1061, 1382, 68, + 68, 1055, 68, 1044, 68, 68, 68, 68, 68, 68, + 1052, 1056, 1047, 1048, 1058, 1049, 1050, 1051, 68, 68, + 1054, 1053, 1060, 68, 1061, 68, 1062, 68, 1055, 68, + 1063, 1068, 68, 1065, 1064, 1382, 68, 1052, 1056, 1066, + 68, 1058, 1073, 1071, 1067, 1382, 68, 1069, 1053, 1060, + 68, 68, 1070, 1062, 68, 68, 1072, 68, 1068, 1074, + + 1065, 1064, 68, 68, 68, 68, 1066, 68, 1075, 1073, + 1071, 1067, 1076, 1078, 1069, 1077, 1080, 68, 1084, 1070, + 1079, 68, 1082, 1072, 68, 1081, 1074, 68, 68, 1083, + 68, 1086, 1087, 1089, 1085, 1075, 1382, 1090, 68, 1076, + 68, 68, 1077, 1080, 68, 1084, 68, 1079, 1094, 1082, + 68, 68, 1081, 1091, 68, 1088, 1083, 1382, 1095, 1087, + 1089, 1085, 68, 68, 68, 1097, 1092, 1098, 68, 1093, + 1100, 1096, 1101, 68, 1099, 1094, 68, 68, 1382, 1102, + 1091, 1103, 1088, 68, 68, 1095, 68, 68, 68, 68, + 1106, 1105, 1097, 1092, 1098, 1107, 1093, 1100, 1096, 1101, + + 68, 1099, 68, 1104, 1108, 68, 1102, 1109, 1103, 68, + 1110, 1112, 1113, 68, 1111, 68, 1114, 68, 1105, 1116, + 1382, 1117, 1107, 1119, 1115, 68, 1120, 1382, 1121, 1118, + 1104, 68, 1122, 68, 1109, 68, 68, 1110, 1112, 68, + 68, 1111, 68, 1114, 68, 68, 68, 68, 1117, 68, + 1119, 1115, 1124, 1120, 68, 1121, 1118, 1123, 68, 1122, + 68, 1125, 1126, 1127, 68, 1128, 1129, 1130, 1382, 68, + 68, 1131, 68, 1132, 1382, 1134, 1135, 1133, 1136, 1124, + 68, 1138, 1137, 1139, 1123, 1141, 1142, 68, 1125, 1126, + 1127, 68, 1128, 1129, 68, 68, 68, 1144, 1131, 1140, + + 1132, 68, 1134, 68, 1133, 68, 1143, 68, 68, 1137, + 68, 1145, 68, 68, 68, 1146, 1147, 1153, 1148, 68, + 1149, 1154, 1150, 68, 1144, 1151, 1140, 68, 1155, 68, + 1156, 1157, 68, 1143, 1158, 1159, 1382, 1161, 68, 1160, + 1152, 68, 1146, 68, 68, 1148, 68, 1149, 1154, 1150, + 1165, 68, 1151, 68, 68, 68, 1163, 68, 1157, 68, + 68, 1158, 1159, 1162, 1161, 68, 1160, 1152, 1164, 1166, + 68, 1167, 68, 1168, 68, 1169, 1170, 1165, 1171, 1174, + 1177, 68, 1173, 1163, 1172, 68, 1175, 1181, 1382, 68, + 1162, 68, 68, 1179, 1176, 1164, 1166, 1180, 1167, 68, + + 1168, 1178, 68, 1170, 1182, 1171, 68, 1177, 68, 1173, + 68, 1172, 68, 1175, 68, 1183, 68, 68, 1184, 68, + 1179, 1176, 1185, 1186, 1180, 1187, 1188, 68, 1178, 1189, + 68, 1182, 1190, 68, 1191, 1192, 1382, 1193, 1194, 68, + 1197, 1195, 1183, 1196, 68, 68, 68, 1199, 68, 1185, + 1186, 68, 1187, 1188, 1198, 68, 1189, 68, 1200, 68, + 1201, 1191, 1192, 68, 1193, 1194, 68, 68, 1195, 68, + 1196, 1202, 1203, 1204, 68, 1206, 68, 1382, 68, 1205, + 1208, 1198, 1207, 68, 1211, 68, 1210, 1212, 1213, 1382, + 1209, 68, 1382, 1382, 1382, 1214, 1220, 68, 1202, 1203, + + 1204, 68, 68, 68, 68, 68, 1205, 1208, 68, 1207, + 68, 68, 1215, 1210, 68, 68, 1216, 1209, 1217, 1218, + 1219, 68, 1214, 68, 1221, 1222, 68, 68, 1223, 1225, + 1224, 68, 68, 68, 68, 68, 1226, 1228, 1229, 1215, + 1230, 1227, 68, 1216, 68, 1217, 1218, 1219, 1232, 68, + 68, 1221, 1222, 1231, 1233, 1223, 1225, 1224, 1234, 68, + 68, 1235, 68, 1226, 1228, 1229, 1238, 68, 1227, 1236, + 1237, 1240, 1241, 68, 68, 1232, 68, 68, 68, 68, + 1231, 68, 1239, 1242, 1243, 1234, 1382, 1244, 1235, 1247, + 68, 1245, 68, 1238, 68, 68, 1236, 1237, 68, 68, + + 1246, 1248, 1251, 68, 1252, 1249, 1250, 68, 1253, 1239, + 1242, 1243, 68, 68, 1244, 68, 1247, 68, 1245, 1254, + 1382, 1255, 1257, 1258, 1260, 1256, 1261, 1246, 68, 68, + 68, 1252, 1249, 1250, 1259, 68, 1262, 1263, 68, 1265, + 68, 1266, 1264, 68, 1267, 68, 68, 68, 1255, 1257, + 1258, 1260, 1256, 1261, 68, 1268, 68, 1269, 68, 68, + 1382, 1259, 1271, 1262, 1263, 1270, 68, 1272, 68, 1264, + 1274, 1273, 1275, 1382, 1276, 68, 1382, 68, 1277, 1280, + 1282, 1382, 68, 1382, 68, 68, 1281, 68, 68, 1271, + 68, 68, 1270, 1283, 1272, 1278, 68, 1274, 1273, 1275, + + 68, 1276, 1279, 68, 68, 1277, 68, 68, 1284, 1285, + 68, 1286, 68, 1281, 1287, 1290, 1288, 1382, 1289, 1291, + 1283, 1292, 1278, 68, 1293, 68, 1295, 68, 1296, 1279, + 68, 1297, 1298, 68, 1294, 1284, 1285, 1300, 1286, 68, + 1302, 68, 1290, 1288, 68, 1289, 68, 68, 68, 1304, + 1382, 1293, 1299, 68, 68, 68, 68, 68, 1297, 1298, + 68, 1294, 1301, 1303, 1300, 1305, 68, 1302, 1306, 68, + 68, 68, 68, 1307, 68, 1308, 1304, 1309, 1310, 1299, + 1311, 1313, 68, 1312, 1316, 1314, 68, 68, 1382, 1301, + 1303, 68, 1305, 1317, 1315, 1306, 1318, 1320, 1319, 68, + + 1307, 68, 1308, 68, 1309, 1310, 68, 68, 1313, 68, + 1312, 1316, 1314, 1321, 1324, 68, 68, 1323, 1322, 68, + 1317, 1315, 68, 1318, 1320, 1319, 68, 1326, 1325, 68, + 1328, 68, 1330, 68, 1327, 1331, 1329, 1332, 68, 1334, + 1321, 68, 68, 68, 1323, 1322, 68, 1333, 1337, 68, + 1338, 1336, 1340, 1335, 1326, 1325, 68, 1328, 68, 1330, + 68, 1327, 1331, 1329, 68, 1339, 68, 68, 1342, 68, + 1343, 1344, 1382, 68, 1333, 68, 1341, 68, 1336, 1340, + 1335, 1345, 1347, 68, 1348, 68, 1346, 1349, 1350, 68, + 1351, 1352, 1339, 1353, 1354, 68, 1357, 1343, 68, 68, + + 1355, 1382, 1382, 1341, 68, 1356, 1358, 1359, 1345, 1347, + 1382, 68, 68, 1346, 68, 68, 1361, 1351, 68, 68, + 1353, 68, 68, 68, 68, 1362, 1363, 1355, 68, 68, + 1360, 1364, 1356, 1358, 1359, 1365, 1367, 68, 1366, 1368, + 1369, 1370, 1371, 68, 1372, 68, 1373, 1374, 68, 1375, + 68, 1376, 1362, 68, 68, 1381, 68, 1360, 1364, 68, + 1382, 1377, 68, 1367, 1379, 1366, 68, 68, 68, 68, + 68, 1372, 68, 1373, 1374, 1378, 1375, 68, 68, 68, + 1382, 1380, 68, 1382, 1382, 1382, 1382, 68, 1377, 68, + 1382, 1379, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + + 1382, 1382, 1378, 1382, 1382, 1382, 1382, 1382, 1380, 40, + 40, 40, 40, 40, 40, 40, 45, 45, 45, 45, + 45, 45, 45, 50, 50, 50, 50, 50, 50, 50, + 56, 56, 56, 56, 56, 56, 56, 61, 61, 61, + 61, 61, 61, 61, 71, 71, 1382, 71, 71, 71, + 71, 122, 122, 1382, 1382, 1382, 122, 122, 124, 124, + 1382, 1382, 124, 1382, 124, 126, 1382, 1382, 1382, 1382, + 1382, 126, 129, 129, 1382, 1382, 1382, 129, 129, 131, + 1382, 1382, 1382, 1382, 1382, 131, 133, 133, 1382, 133, + 133, 133, 133, 72, 72, 1382, 72, 72, 72, 72, + + 13, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382 } ; -static yyconst flex_int16_t yy_chk[3971] = +static yyconst flex_int16_t yy_chk[4067] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1326,434 +1348,445 @@ static yyconst flex_int16_t yy_chk[3971] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 5, 24, 6, 7, 7, - 7, 7, 1360, 7, 8, 8, 8, 8, 24, 8, + 7, 7, 1388, 7, 8, 8, 8, 8, 24, 8, 9, 9, 9, 10, 10, 10, 15, 44, 44, 49, 15, 3, 49, 24, 4, 60, 60, 5, 19, 6, - 19, 19, 69, 19, 584, 7, 69, 39, 19, 39, - 39, 8, 39, 23, 20, 20, 9, 39, 130, 10, + 19, 19, 69, 19, 600, 7, 69, 39, 19, 39, + 39, 8, 39, 23, 20, 20, 9, 39, 92, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, - 12, 12, 20, 23, 111, 19, 23, 27, 20, 11, - 23, 20, 20, 128, 21, 12, 22, 122, 122, 27, + 12, 12, 20, 23, 112, 19, 23, 594, 20, 11, + 23, 20, 20, 131, 21, 12, 22, 123, 123, 92, 22, 21, 26, 22, 28, 26, 22, 11, 21, 20, - 23, 25, 26, 12, 27, 111, 11, 75, 22, 25, - 21, 21, 12, 22, 29, 26, 28, 22, 21, 26, - 22, 28, 26, 22, 30, 21, 29, 25, 25, 26, - - 75, 32, 30, 127, 75, 31, 25, 32, 30, 31, - 65, 29, 30, 55, 37, 55, 55, 125, 55, 37, - 30, 30, 117, 65, 33, 31, 117, 37, 32, 30, - 33, 31, 31, 33, 34, 30, 31, 65, 80, 30, - 33, 37, 33, 123, 34, 74, 37, 34, 35, 117, - 38, 33, 31, 80, 38, 77, 34, 33, 35, 138, - 33, 34, 35, 35, 78, 80, 36, 33, 36, 74, - 35, 34, 74, 78, 34, 35, 38, 38, 138, 77, - 121, 38, 77, 36, 124, 35, 138, 124, 67, 35, - 35, 78, 36, 36, 63, 36, 63, 63, 66, 63, - - 66, 66, 68, 66, 68, 68, 71, 68, 71, 71, - 36, 71, 68, 76, 79, 81, 71, 82, 83, 84, - 76, 85, 82, 89, 81, 86, 61, 79, 85, 87, - 88, 63, 84, 56, 86, 83, 129, 129, 87, 93, - 76, 79, 81, 71, 82, 89, 84, 90, 85, 83, - 89, 91, 86, 88, 91, 92, 87, 88, 96, 93, - 90, 93, 83, 92, 95, 94, 93, 95, 91, 94, - 97, 96, 51, 99, 90, 91, 50, 102, 91, 98, - 101, 91, 92, 100, 102, 96, 93, 99, 103, 94, - 45, 95, 94, 97, 101, 91, 94, 97, 105, 98, - - 99, 106, 105, 100, 102, 104, 98, 101, 106, 107, - 100, 103, 108, 109, 104, 103, 112, 110, 114, 115, - 105, 109, 113, 107, 108, 105, 110, 114, 106, 105, - 115, 112, 104, 118, 134, 116, 107, 119, 120, 108, - 109, 116, 113, 112, 110, 114, 115, 120, 113, 113, - 136, 126, 119, 126, 126, 118, 126, 135, 134, 141, - 118, 134, 116, 40, 119, 120, 137, 142, 131, 113, - 131, 131, 132, 131, 132, 132, 139, 132, 137, 135, - 140, 136, 143, 146, 135, 145, 578, 140, 139, 142, - 141, 146, 14, 137, 142, 147, 148, 13, 149, 154, - - 148, 0, 151, 139, 0, 150, 152, 140, 154, 132, - 146, 145, 145, 143, 144, 151, 578, 147, 152, 144, - 155, 149, 147, 148, 144, 149, 154, 150, 157, 151, - 144, 144, 150, 152, 159, 153, 156, 144, 153, 157, - 158, 144, 155, 156, 160, 161, 144, 155, 0, 0, - 153, 144, 162, 163, 160, 157, 164, 144, 144, 163, - 159, 159, 153, 156, 165, 153, 166, 167, 168, 169, - 162, 158, 171, 172, 0, 160, 161, 170, 172, 162, - 163, 160, 173, 176, 170, 175, 165, 164, 168, 179, - 169, 165, 175, 171, 174, 168, 169, 166, 167, 171, - - 172, 173, 177, 181, 170, 176, 174, 177, 180, 173, - 176, 182, 175, 178, 178, 180, 183, 184, 187, 185, - 179, 174, 178, 192, 189, 184, 186, 0, 181, 177, - 181, 182, 0, 188, 190, 180, 191, 193, 182, 189, - 178, 178, 190, 195, 184, 185, 185, 183, 186, 187, - 188, 189, 195, 194, 192, 191, 198, 186, 188, 193, - 188, 190, 196, 191, 193, 194, 197, 205, 199, 0, - 195, 0, 202, 200, 201, 186, 209, 188, 206, 203, - 194, 196, 198, 198, 200, 204, 201, 207, 208, 196, - 197, 206, 214, 197, 199, 199, 202, 210, 205, 202, - - 200, 201, 203, 204, 210, 206, 203, 209, 211, 213, - 208, 215, 204, 207, 207, 208, 212, 211, 214, 214, - 215, 218, 212, 213, 210, 216, 217, 219, 221, 220, - 0, 222, 220, 223, 224, 211, 213, 222, 215, 220, - 216, 226, 219, 212, 231, 218, 221, 223, 218, 224, - 225, 225, 216, 229, 219, 221, 220, 217, 222, 220, - 223, 224, 227, 228, 230, 229, 228, 234, 226, 233, - 232, 231, 236, 228, 235, 225, 0, 225, 225, 234, - 229, 235, 230, 239, 238, 243, 227, 240, 0, 227, - 228, 230, 232, 228, 234, 233, 233, 232, 237, 244, - - 240, 235, 242, 236, 0, 237, 238, 239, 0, 247, - 239, 238, 241, 245, 240, 241, 243, 241, 0, 245, - 242, 244, 247, 241, 246, 237, 244, 257, 249, 242, - 248, 246, 252, 251, 0, 255, 247, 253, 278, 241, - 245, 249, 241, 253, 241, 251, 248, 255, 283, 256, - 252, 246, 0, 254, 248, 249, 256, 248, 257, 252, - 251, 254, 255, 258, 253, 259, 260, 0, 262, 278, - 258, 264, 264, 248, 250, 250, 256, 259, 260, 283, - 254, 262, 261, 263, 250, 268, 250, 250, 250, 261, - 258, 250, 259, 260, 269, 262, 265, 266, 268, 250, - - 264, 250, 250, 265, 270, 263, 267, 271, 266, 261, - 263, 250, 268, 250, 250, 250, 271, 267, 250, 269, - 275, 269, 272, 265, 266, 273, 274, 270, 276, 279, - 277, 270, 280, 267, 271, 272, 282, 0, 273, 284, - 285, 287, 275, 273, 274, 284, 281, 275, 277, 272, - 279, 276, 273, 274, 280, 276, 279, 277, 285, 280, - 281, 286, 282, 282, 287, 273, 284, 285, 287, 288, - 289, 290, 295, 281, 291, 294, 286, 290, 293, 297, - 299, 294, 300, 304, 0, 296, 0, 299, 286, 300, - 0, 295, 289, 302, 297, 288, 288, 289, 290, 295, - - 291, 291, 294, 296, 293, 293, 297, 299, 301, 300, - 303, 306, 296, 305, 304, 302, 306, 309, 307, 308, - 302, 301, 305, 310, 311, 0, 313, 0, 0, 303, - 0, 308, 311, 313, 310, 301, 314, 303, 306, 309, - 305, 307, 317, 0, 309, 307, 308, 314, 316, 315, - 310, 311, 312, 313, 318, 316, 318, 312, 315, 312, - 0, 319, 320, 314, 0, 323, 324, 312, 317, 317, - 322, 324, 326, 323, 320, 316, 321, 312, 312, 312, - 315, 318, 322, 325, 312, 315, 312, 319, 319, 320, - 326, 321, 323, 324, 312, 328, 329, 322, 327, 326, - - 330, 331, 332, 321, 312, 325, 327, 328, 334, 335, - 325, 332, 333, 338, 0, 336, 331, 340, 341, 329, - 337, 342, 328, 329, 335, 327, 333, 339, 331, 332, - 336, 330, 337, 343, 344, 334, 335, 338, 345, 333, - 338, 339, 336, 346, 340, 341, 347, 337, 348, 346, - 349, 350, 342, 353, 339, 351, 352, 0, 354, 355, - 343, 344, 357, 352, 358, 0, 360, 0, 347, 345, - 346, 348, 355, 347, 350, 348, 359, 351, 350, 361, - 354, 349, 351, 352, 353, 354, 355, 356, 357, 357, - 360, 362, 356, 360, 359, 358, 356, 365, 363, 364, - - 366, 361, 361, 359, 367, 369, 361, 370, 365, 368, - 0, 356, 363, 362, 356, 366, 371, 374, 362, 356, - 378, 364, 375, 356, 365, 363, 364, 366, 361, 369, - 368, 370, 369, 372, 370, 367, 368, 373, 371, 374, - 376, 377, 372, 371, 374, 377, 375, 379, 381, 375, - 373, 378, 381, 380, 0, 393, 382, 383, 0, 0, - 372, 384, 376, 386, 373, 379, 385, 376, 380, 387, - 384, 386, 377, 389, 379, 385, 387, 380, 388, 381, - 380, 382, 383, 382, 383, 390, 393, 392, 384, 391, - 386, 389, 395, 385, 394, 380, 387, 390, 391, 392, - - 389, 388, 394, 396, 398, 388, 397, 401, 400, 399, - 402, 0, 390, 0, 392, 398, 391, 399, 395, 395, - 403, 394, 400, 404, 405, 408, 396, 401, 397, 406, - 396, 398, 402, 397, 401, 400, 399, 402, 406, 407, - 403, 409, 410, 408, 412, 404, 405, 403, 411, 413, - 404, 405, 408, 414, 409, 413, 406, 427, 416, 407, - 417, 414, 0, 419, 410, 418, 407, 412, 409, 410, - 428, 412, 411, 420, 418, 411, 413, 426, 427, 414, - 414, 423, 419, 417, 427, 420, 429, 417, 414, 416, - 419, 423, 418, 428, 431, 426, 0, 428, 432, 433, - - 420, 433, 435, 434, 426, 0, 437, 432, 423, 0, - 438, 436, 0, 439, 0, 0, 431, 429, 430, 0, - 430, 431, 438, 430, 440, 432, 433, 434, 430, 435, - 434, 436, 437, 437, 430, 430, 442, 438, 436, 439, - 439, 443, 441, 430, 442, 430, 444, 430, 440, 441, - 430, 440, 445, 447, 448, 430, 446, 449, 450, 453, - 443, 430, 430, 442, 445, 446, 451, 0, 443, 441, - 452, 458, 444, 444, 456, 447, 454, 460, 453, 445, - 447, 448, 457, 446, 461, 455, 453, 459, 449, 450, - 451, 452, 461, 451, 455, 454, 456, 452, 458, 463, - - 464, 456, 457, 454, 465, 466, 459, 0, 460, 457, - 467, 461, 455, 464, 459, 469, 470, 466, 467, 472, - 474, 469, 470, 463, 472, 475, 463, 464, 471, 473, - 465, 465, 466, 477, 467, 471, 473, 467, 474, 478, - 476, 477, 469, 470, 480, 467, 472, 474, 475, 476, - 479, 481, 475, 483, 487, 471, 473, 478, 481, 482, - 477, 485, 484, 479, 486, 480, 478, 476, 488, 485, - 489, 480, 482, 490, 488, 491, 487, 479, 481, 486, - 493, 487, 494, 492, 483, 484, 482, 496, 485, 484, - 497, 486, 492, 495, 493, 488, 489, 489, 499, 491, - - 495, 500, 491, 498, 490, 501, 502, 493, 501, 500, - 492, 506, 504, 494, 496, 498, 505, 497, 505, 502, - 495, 499, 511, 506, 507, 499, 0, 0, 500, 516, - 498, 0, 501, 502, 503, 504, 503, 507, 506, 504, - 503, 509, 503, 505, 508, 510, 521, 503, 513, 514, - 508, 507, 512, 511, 509, 516, 516, 512, 503, 512, - 517, 503, 514, 503, 518, 515, 510, 503, 509, 503, - 513, 508, 510, 521, 503, 513, 514, 512, 512, 512, - 515, 519, 517, 518, 512, 520, 512, 517, 522, 524, - 525, 518, 515, 520, 519, 526, 527, 528, 529, 530, - - 0, 0, 532, 526, 512, 531, 535, 530, 519, 532, - 527, 522, 520, 540, 525, 522, 529, 525, 533, 528, - 524, 534, 526, 527, 528, 529, 530, 531, 537, 532, - 541, 533, 531, 538, 539, 540, 537, 535, 543, 534, - 540, 542, 538, 544, 545, 533, 539, 547, 534, 0, - 548, 547, 541, 548, 550, 537, 543, 541, 549, 552, - 538, 539, 554, 542, 551, 543, 550, 553, 542, 544, - 544, 551, 556, 553, 555, 545, 548, 548, 547, 557, - 548, 550, 549, 552, 554, 549, 552, 558, 560, 554, - 559, 551, 561, 556, 553, 562, 555, 560, 564, 556, - - 557, 555, 563, 568, 562, 564, 557, 565, 559, 566, - 563, 567, 568, 569, 558, 560, 561, 559, 571, 561, - 572, 565, 562, 570, 0, 564, 574, 575, 576, 563, - 568, 566, 573, 567, 565, 575, 566, 569, 567, 570, - 569, 576, 577, 579, 573, 580, 588, 589, 581, 571, - 570, 572, 579, 574, 575, 576, 581, 577, 582, 573, - 582, 585, 590, 580, 586, 593, 587, 591, 592, 577, - 579, 594, 580, 587, 585, 581, 586, 588, 589, 596, - 591, 592, 598, 594, 590, 582, 599, 593, 585, 590, - 595, 586, 593, 587, 591, 592, 597, 601, 594, 600, - - 598, 0, 595, 602, 603, 597, 596, 600, 599, 598, - 604, 602, 609, 599, 607, 616, 610, 595, 609, 601, - 605, 606, 614, 597, 601, 610, 600, 603, 604, 607, - 602, 603, 605, 606, 608, 611, 618, 604, 612, 609, - 614, 607, 608, 610, 613, 617, 616, 605, 606, 614, - 612, 613, 619, 620, 622, 618, 611, 624, 617, 619, - 621, 608, 611, 618, 621, 612, 623, 626, 622, 625, - 627, 613, 617, 628, 0, 620, 630, 631, 632, 619, - 620, 622, 633, 629, 623, 634, 0, 632, 624, 626, - 631, 621, 627, 623, 626, 625, 625, 627, 630, 628, - - 628, 629, 635, 630, 631, 632, 638, 636, 640, 642, - 629, 0, 643, 633, 637, 641, 634, 649, 642, 637, - 644, 637, 638, 637, 635, 643, 645, 641, 644, 635, - 636, 640, 637, 638, 636, 640, 642, 650, 646, 643, - 647, 637, 641, 655, 649, 645, 637, 644, 637, 647, - 637, 646, 648, 645, 648, 653, 652, 657, 654, 658, - 659, 656, 660, 668, 650, 646, 654, 647, 656, 660, - 655, 661, 662, 663, 669, 665, 671, 653, 0, 648, - 652, 658, 653, 652, 657, 654, 658, 659, 656, 660, - 666, 662, 664, 661, 668, 663, 665, 672, 661, 662, - - 663, 664, 665, 670, 673, 669, 674, 671, 675, 676, - 666, 678, 673, 679, 677, 672, 676, 666, 677, 664, - 679, 680, 674, 681, 672, 670, 682, 683, 680, 685, - 670, 673, 681, 674, 683, 675, 676, 684, 685, 684, - 679, 677, 678, 686, 691, 688, 690, 686, 680, 688, - 681, 692, 682, 682, 683, 690, 685, 689, 689, 694, - 692, 693, 0, 695, 684, 698, 691, 696, 693, 700, - 686, 691, 695, 690, 697, 696, 688, 698, 692, 701, - 702, 699, 694, 709, 689, 704, 694, 697, 693, 699, - 695, 700, 698, 705, 696, 703, 700, 706, 710, 701, - - 711, 697, 702, 704, 703, 705, 701, 702, 699, 707, - 708, 713, 704, 715, 709, 707, 717, 714, 706, 716, - 705, 715, 703, 716, 706, 0, 711, 711, 723, 710, - 714, 718, 708, 713, 719, 722, 707, 708, 713, 718, - 715, 721, 719, 717, 714, 720, 720, 724, 729, 721, - 716, 728, 725, 733, 729, 724, 722, 726, 718, 723, - 725, 719, 722, 727, 728, 726, 731, 732, 721, 730, - 735, 727, 720, 734, 724, 729, 733, 737, 728, 725, - 733, 730, 741, 738, 726, 739, 746, 734, 735, 732, - 727, 736, 731, 731, 732, 740, 730, 735, 736, 744, - - 734, 745, 740, 748, 737, 738, 750, 752, 739, 753, - 738, 754, 739, 741, 755, 756, 755, 746, 736, 758, - 757, 744, 740, 754, 0, 760, 744, 745, 745, 762, - 748, 752, 757, 750, 752, 753, 753, 756, 754, 761, - 763, 755, 756, 759, 761, 762, 758, 757, 775, 764, - 759, 760, 760, 765, 770, 767, 762, 764, 768, 0, - 769, 770, 771, 763, 767, 772, 761, 763, 773, 771, - 759, 768, 772, 778, 774, 765, 764, 776, 777, 775, - 765, 770, 767, 0, 776, 768, 769, 769, 780, 771, - 782, 777, 772, 773, 778, 773, 774, 781, 783, 781, - - 778, 774, 0, 785, 776, 777, 784, 791, 786, 788, - 780, 787, 785, 793, 782, 780, 786, 782, 787, 789, - 790, 792, 793, 789, 781, 0, 796, 799, 0, 783, - 785, 788, 784, 784, 791, 786, 788, 794, 787, 796, - 793, 797, 790, 792, 794, 795, 789, 790, 792, 798, - 800, 804, 795, 796, 801, 803, 797, 800, 799, 802, - 809, 801, 806, 798, 794, 802, 805, 803, 797, 805, - 810, 804, 795, 806, 817, 814, 798, 800, 804, 811, - 812, 801, 803, 814, 805, 813, 802, 809, 818, 806, - 816, 812, 815, 805, 810, 815, 805, 810, 825, 820, - - 821, 811, 814, 813, 819, 817, 811, 812, 816, 821, - 815, 819, 813, 820, 824, 818, 822, 816, 823, 815, - 823, 826, 815, 824, 825, 825, 820, 821, 827, 822, - 829, 819, 826, 830, 831, 832, 833, 827, 0, 834, - 0, 824, 830, 822, 835, 823, 0, 842, 826, 839, - 835, 838, 845, 834, 0, 827, 832, 0, 842, 845, - 830, 829, 832, 839, 840, 831, 834, 833, 835, 846, - 838, 835, 841, 840, 842, 843, 839, 835, 838, 845, - 841, 847, 848, 849, 843, 851, 852, 853, 850, 851, - 0, 840, 846, 857, 854, 861, 846, 0, 852, 841, - - 865, 855, 843, 847, 848, 849, 850, 854, 847, 848, - 849, 856, 851, 852, 853, 850, 855, 858, 859, 860, - 862, 854, 861, 863, 857, 864, 856, 859, 855, 866, - 868, 865, 858, 869, 867, 866, 870, 868, 856, 871, - 860, 863, 867, 870, 858, 859, 860, 862, 872, 873, - 863, 876, 864, 878, 874, 0, 866, 868, 877, 880, - 869, 867, 879, 870, 879, 881, 871, 877, 882, 884, - 885, 888, 0, 887, 0, 872, 884, 885, 874, 887, - 873, 874, 876, 890, 878, 877, 880, 886, 883, 879, - 883, 881, 881, 894, 886, 883, 884, 885, 888, 882, - - 887, 889, 889, 883, 891, 893, 895, 896, 897, 890, - 890, 891, 898, 898, 886, 883, 899, 883, 895, 901, - 894, 904, 883, 893, 900, 900, 897, 896, 889, 906, - 901, 891, 893, 895, 896, 897, 903, 905, 907, 898, - 908, 909, 899, 899, 905, 911, 901, 910, 913, 906, - 914, 900, 904, 912, 910, 915, 906, 911, 903, 909, - 913, 912, 908, 903, 905, 907, 917, 908, 909, 920, - 919, 914, 911, 915, 910, 913, 916, 914, 918, 921, - 912, 916, 915, 919, 918, 922, 923, 924, 925, 922, - 0, 0, 916, 917, 926, 927, 928, 919, 930, 929, - - 920, 929, 924, 916, 932, 918, 921, 931, 916, 926, - 933, 928, 931, 936, 924, 935, 922, 923, 927, 925, - 937, 926, 927, 928, 938, 933, 929, 939, 941, 930, - 946, 940, 948, 944, 931, 932, 951, 933, 955, 935, - 936, 946, 935, 949, 947, 938, 941, 937, 944, 939, - 948, 938, 940, 947, 939, 941, 946, 946, 940, 948, - 944, 949, 954, 951, 956, 0, 957, 959, 946, 955, - 949, 947, 958, 962, 956, 954, 961, 0, 963, 964, - 962, 969, 0, 965, 972, 964, 966, 967, 969, 954, - 971, 956, 957, 957, 959, 968, 961, 958, 965, 958, - - 962, 966, 967, 961, 963, 963, 964, 968, 969, 972, - 965, 972, 971, 966, 967, 973, 974, 971, 976, 977, - 978, 978, 968, 0, 973, 980, 979, 981, 983, 982, - 985, 976, 984, 988, 974, 986, 990, 983, 0, 984, - 1008, 988, 973, 974, 0, 976, 977, 978, 979, 981, - 980, 982, 980, 979, 981, 983, 982, 986, 989, 984, - 988, 985, 986, 990, 991, 992, 994, 1008, 992, 993, - 0, 989, 995, 1000, 999, 996, 997, 0, 1001, 991, - 1000, 0, 0, 992, 994, 989, 1003, 995, 999, 1001, - 1005, 991, 992, 994, 993, 992, 993, 996, 997, 995, - - 1000, 999, 996, 997, 1006, 1001, 1006, 1003, 1007, 1009, - 1010, 1005, 1011, 1003, 1014, 1012, 1015, 1005, 1013, 1020, - 1011, 0, 1021, 0, 0, 1016, 1007, 1009, 1014, 1019, - 1024, 1006, 1023, 1026, 0, 1007, 1009, 1010, 1012, 1011, - 1013, 1014, 1012, 1015, 1016, 1013, 1020, 1019, 1021, 1021, - 1022, 1025, 1016, 1024, 1023, 1026, 1019, 1024, 1028, 1023, - 1026, 1027, 1027, 1025, 1030, 1022, 1028, 1030, 1031, 1032, - 1036, 1033, 1041, 1034, 0, 1032, 1031, 1022, 1025, 1034, - 1037, 0, 1040, 1042, 1044, 1028, 1033, 1038, 1027, 1039, - 1045, 1030, 1043, 1047, 1046, 1031, 1032, 1036, 1033, 1041, - - 1034, 1038, 1046, 1039, 1037, 1048, 1043, 1037, 1040, 1040, - 1042, 1044, 1051, 1052, 1038, 1049, 1039, 1045, 1053, 1043, - 1047, 1046, 1054, 1049, 1055, 1056, 1053, 0, 1058, 1057, - 1059, 1061, 1048, 1055, 1051, 1063, 1060, 1064, 1064, 1051, - 1052, 1065, 1049, 1058, 1060, 1053, 1056, 1066, 0, 1054, - 1068, 1055, 1056, 1057, 1058, 1058, 1057, 1059, 1061, 1069, - 1067, 1069, 1063, 1060, 1064, 1066, 1070, 1065, 1065, 1072, - 1058, 1073, 1068, 1071, 1066, 1067, 1074, 1068, 1076, 1071, - 1070, 1075, 1083, 1073, 1077, 1079, 1069, 1067, 1081, 0, - 1082, 1072, 1079, 1070, 1074, 1087, 1072, 1084, 1073, 1075, - - 1071, 1089, 1086, 1074, 1090, 1084, 1081, 1077, 1075, 1076, - 1087, 1077, 1079, 1083, 1086, 1081, 1082, 1082, 1091, 1092, - 1093, 1094, 1087, 1084, 1084, 1089, 1090, 1095, 1089, 1086, - 1096, 1090, 1084, 1097, 1098, 1100, 1099, 1096, 1101, 0, - 1103, 1098, 1092, 1105, 1093, 1091, 1092, 1093, 1094, 1095, - 1104, 1103, 1112, 1106, 1095, 1109, 1097, 1096, 1099, 1101, - 1097, 1098, 1105, 1099, 1115, 1101, 1100, 1103, 1116, 1118, - 1105, 1120, 1104, 1121, 1122, 0, 1124, 1104, 1106, 1112, - 1106, 1109, 1109, 1123, 1126, 1122, 1115, 1129, 1123, 0, - 1130, 1115, 1131, 1133, 1132, 1116, 1118, 1134, 1124, 1121, - - 1121, 1122, 1120, 1124, 1135, 1131, 1142, 1136, 1138, 1129, - 1123, 1126, 1143, 1139, 1129, 1130, 1132, 1130, 1137, 1131, - 1133, 1132, 1136, 1138, 1134, 1141, 1140, 1137, 1139, 1146, - 1143, 1135, 1141, 1142, 1136, 1138, 1144, 1144, 1148, 1143, - 1139, 1140, 1145, 1146, 1147, 1137, 1149, 1147, 1150, 1145, - 1151, 1148, 1141, 1140, 1152, 1149, 1146, 1154, 0, 1155, - 1157, 1158, 1159, 1144, 0, 1148, 1154, 1160, 1164, 1145, - 1150, 1147, 1151, 1149, 1159, 1150, 1160, 1151, 0, 1158, - 1165, 1152, 1161, 0, 1154, 1155, 1155, 1157, 1158, 1159, - 1162, 1161, 1163, 1166, 1160, 1164, 1167, 1174, 1175, 1168, - - 1163, 1162, 1170, 1176, 1167, 1166, 1168, 1173, 1179, 1161, - 1170, 1165, 1181, 1177, 1173, 1176, 1182, 1162, 1186, 1163, - 1166, 1174, 1177, 1167, 1174, 1175, 1168, 1187, 1180, 1170, - 1176, 1188, 1187, 0, 1173, 1179, 1180, 1189, 1190, 1181, - 1177, 1193, 1191, 1182, 1186, 1186, 1197, 1198, 1194, 1188, - 1195, 1196, 1199, 1193, 1187, 1180, 0, 1200, 1188, 1189, - 1190, 1191, 1201, 1196, 1189, 1190, 1203, 1204, 1193, 1191, - 1194, 1206, 1195, 1197, 1198, 1194, 1207, 1195, 1196, 1208, - 1215, 1209, 1204, 1199, 1200, 1210, 1211, 1216, 1203, 1201, - 1207, 1217, 1213, 1203, 1204, 1206, 1218, 1208, 1206, 1209, - - 1213, 1214, 1219, 1207, 1211, 1216, 1208, 1215, 1209, 1214, - 1224, 1210, 1210, 1211, 1216, 1218, 1221, 1222, 1217, 1213, - 1227, 0, 1228, 1218, 1219, 1230, 1229, 1227, 1214, 1219, - 1231, 1222, 1232, 1233, 1221, 1234, 1235, 1224, 1236, 0, - 0, 1232, 1245, 1221, 1222, 0, 1233, 1227, 1228, 1228, - 1229, 1239, 1230, 1229, 1242, 1243, 1244, 1231, 1247, 1232, - 1233, 1236, 1242, 1235, 1244, 1236, 1234, 1253, 1245, 1245, - 1248, 1250, 1239, 1246, 1243, 1249, 1249, 1248, 1239, 1251, - 1247, 1242, 1243, 1244, 1246, 1247, 1251, 1255, 1256, 1250, - 1257, 1253, 1258, 1260, 1253, 0, 1255, 1248, 1250, 1265, - - 1246, 1261, 1249, 1262, 1267, 1262, 1251, 1266, 0, 1270, - 1258, 1260, 1273, 1257, 1255, 1256, 1261, 1257, 1269, 1258, - 1260, 1265, 1267, 1272, 1271, 1274, 1265, 1270, 1261, 1281, - 1262, 1267, 1271, 1266, 1266, 1272, 1270, 1275, 1276, 1273, - 1269, 1277, 1284, 1274, 1278, 1269, 1276, 1280, 1275, 1287, - 1272, 1271, 1274, 1279, 1279, 1280, 1281, 1282, 1288, 1292, - 1277, 1294, 1286, 1285, 1275, 1276, 1278, 1286, 1277, 1284, - 1285, 1278, 1290, 1289, 1280, 1291, 1287, 1293, 1299, 1282, - 1279, 1289, 1291, 1295, 1282, 1288, 1292, 1290, 1294, 1286, - 1285, 1295, 1293, 1297, 1298, 1300, 1301, 1302, 1303, 1290, - - 1289, 1305, 1291, 1307, 1293, 1299, 1297, 1308, 1312, 0, - 1295, 1313, 1311, 1318, 1315, 1323, 1298, 0, 1327, 1302, - 1297, 1298, 1300, 1301, 1302, 1303, 1319, 1305, 1305, 1308, - 1307, 1311, 1325, 1313, 1308, 1312, 1315, 1317, 1313, 1311, - 1318, 1315, 1323, 1330, 1317, 1327, 1328, 1331, 1332, 1319, - 1334, 1336, 1330, 1319, 1338, 1325, 1339, 1344, 1328, 1325, - 1345, 1346, 1352, 1350, 1317, 0, 0, 1345, 1347, 1338, - 1330, 0, 0, 1328, 1331, 1332, 1350, 1334, 1336, 1349, - 1344, 1338, 1339, 1339, 1344, 1351, 1347, 1345, 1346, 1352, - 1350, 1349, 0, 1351, 0, 1347, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 1349, 0, 0, 0, - 0, 0, 1351, 1355, 1355, 1355, 1355, 1355, 1355, 1355, - 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1357, 1357, 1357, - 1357, 1357, 1357, 1357, 1358, 1358, 1358, 1358, 1358, 1358, - 1358, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1361, 1361, - 0, 1361, 1361, 1361, 1361, 1362, 1362, 0, 0, 0, - 1362, 1362, 1363, 1363, 0, 0, 1363, 0, 1363, 1364, - 0, 0, 0, 0, 0, 1364, 1365, 1365, 0, 0, - 0, 1365, 1365, 1366, 0, 0, 0, 0, 0, 1366, - 1367, 1367, 0, 1367, 1367, 1367, 1367, 1368, 1368, 0, - - 1368, 1368, 1368, 1368, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, - 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354 + 23, 25, 26, 12, 26, 112, 11, 594, 22, 25, + 21, 21, 12, 22, 27, 26, 28, 22, 21, 26, + 22, 28, 26, 22, 74, 21, 27, 25, 25, 26, + + 29, 26, 30, 129, 31, 128, 25, 32, 31, 126, + 30, 27, 29, 32, 130, 130, 30, 78, 74, 125, + 30, 74, 125, 137, 31, 124, 78, 29, 30, 30, + 31, 31, 33, 122, 32, 31, 34, 30, 33, 67, + 37, 33, 35, 30, 78, 37, 34, 30, 33, 34, + 33, 31, 35, 37, 137, 75, 35, 35, 34, 33, + 36, 65, 36, 34, 35, 33, 38, 37, 33, 35, + 38, 61, 37, 34, 65, 33, 34, 36, 75, 35, + 56, 51, 75, 35, 35, 50, 36, 36, 65, 36, + 45, 40, 38, 38, 14, 13, 55, 38, 55, 55, + + 63, 55, 63, 63, 36, 63, 66, 77, 66, 66, + 68, 66, 68, 68, 71, 68, 71, 71, 76, 71, + 68, 80, 79, 81, 71, 76, 83, 84, 82, 86, + 0, 77, 81, 82, 77, 79, 80, 63, 86, 85, + 84, 88, 0, 83, 87, 76, 85, 89, 80, 79, + 81, 71, 90, 87, 84, 82, 86, 83, 91, 93, + 96, 91, 0, 96, 88, 90, 85, 93, 88, 89, + 83, 87, 94, 95, 89, 91, 97, 95, 98, 90, + 0, 100, 91, 0, 0, 91, 93, 96, 91, 97, + 99, 101, 94, 102, 94, 100, 0, 95, 104, 94, + + 95, 98, 91, 97, 95, 98, 103, 102, 100, 0, + 99, 101, 106, 103, 105, 107, 106, 99, 101, 94, + 102, 104, 107, 105, 108, 104, 114, 110, 109, 113, + 0, 0, 0, 103, 106, 110, 111, 144, 108, 106, + 109, 105, 107, 106, 113, 111, 114, 116, 115, 119, + 0, 108, 114, 114, 110, 109, 113, 115, 116, 117, + 118, 121, 120, 111, 118, 117, 0, 0, 144, 0, + 121, 119, 0, 114, 116, 115, 119, 120, 127, 135, + 127, 127, 136, 127, 141, 0, 117, 118, 121, 120, + 132, 141, 132, 132, 133, 132, 133, 133, 138, 133, + + 139, 140, 142, 135, 136, 153, 135, 142, 143, 136, + 138, 141, 146, 140, 0, 147, 149, 153, 148, 139, + 149, 150, 0, 147, 0, 138, 0, 139, 140, 151, + 143, 133, 153, 142, 142, 143, 145, 152, 146, 146, + 148, 145, 147, 149, 150, 148, 145, 0, 150, 155, + 152, 151, 145, 145, 154, 156, 151, 154, 155, 145, + 157, 0, 160, 145, 152, 158, 0, 159, 145, 154, + 161, 163, 158, 145, 166, 162, 155, 156, 159, 145, + 145, 154, 156, 164, 154, 162, 157, 157, 168, 165, + 169, 167, 158, 160, 159, 165, 161, 161, 175, 0, + + 170, 164, 163, 171, 172, 166, 162, 173, 0, 174, + 164, 172, 162, 167, 174, 177, 165, 175, 167, 168, + 170, 169, 177, 176, 171, 175, 178, 170, 173, 181, + 171, 172, 179, 185, 173, 176, 174, 179, 180, 180, + 0, 188, 177, 183, 182, 0, 186, 180, 178, 184, + 176, 182, 187, 178, 186, 189, 194, 190, 0, 179, + 181, 193, 191, 188, 185, 180, 180, 192, 183, 184, + 183, 182, 188, 186, 190, 192, 184, 191, 187, 187, + 193, 195, 190, 196, 190, 198, 189, 194, 193, 191, + 188, 197, 200, 204, 192, 196, 199, 205, 199, 201, + + 197, 190, 202, 195, 198, 204, 203, 206, 195, 207, + 196, 208, 198, 210, 212, 0, 200, 203, 197, 200, + 204, 205, 209, 199, 205, 201, 201, 207, 202, 202, + 206, 211, 214, 203, 206, 209, 207, 213, 218, 210, + 210, 214, 208, 216, 213, 212, 215, 218, 217, 209, + 0, 220, 215, 211, 219, 221, 222, 216, 211, 214, + 230, 223, 226, 0, 213, 218, 220, 225, 226, 224, + 216, 0, 224, 215, 217, 217, 223, 219, 220, 224, + 222, 219, 228, 222, 227, 225, 221, 230, 223, 226, + 229, 229, 231, 233, 225, 234, 224, 228, 227, 224, + + 232, 235, 236, 232, 240, 233, 237, 0, 0, 228, + 232, 227, 242, 234, 238, 229, 231, 229, 229, 231, + 233, 243, 234, 243, 236, 247, 238, 232, 235, 236, + 232, 239, 237, 237, 242, 240, 241, 248, 239, 242, + 244, 238, 246, 241, 245, 243, 249, 245, 243, 245, + 243, 0, 249, 244, 250, 245, 247, 251, 239, 248, + 246, 250, 252, 241, 248, 255, 253, 244, 259, 246, + 251, 245, 256, 249, 245, 258, 245, 255, 252, 253, + 259, 250, 257, 258, 251, 0, 252, 260, 257, 252, + 256, 261, 255, 253, 260, 259, 0, 262, 263, 256, + + 264, 265, 258, 279, 262, 252, 254, 254, 266, 257, + 263, 0, 264, 267, 260, 266, 254, 268, 254, 254, + 254, 279, 261, 254, 262, 263, 267, 264, 269, 269, + 279, 254, 265, 254, 254, 266, 274, 0, 271, 268, + 267, 270, 272, 254, 268, 254, 254, 254, 270, 271, + 254, 273, 275, 272, 280, 282, 283, 269, 276, 277, + 289, 274, 0, 274, 273, 271, 281, 276, 270, 272, + 278, 284, 277, 282, 286, 275, 280, 285, 273, 275, + 287, 280, 282, 278, 291, 276, 277, 283, 278, 281, + 288, 289, 284, 281, 287, 294, 286, 278, 284, 290, + + 285, 286, 291, 292, 285, 290, 293, 287, 296, 295, + 278, 291, 297, 300, 296, 299, 288, 288, 292, 300, + 0, 294, 294, 0, 301, 310, 290, 302, 308, 293, + 292, 295, 303, 293, 0, 296, 295, 305, 297, 297, + 300, 299, 299, 301, 305, 302, 306, 303, 307, 309, + 308, 301, 0, 306, 302, 308, 310, 311, 312, 303, + 314, 307, 315, 312, 305, 313, 311, 317, 309, 316, + 320, 313, 318, 306, 315, 307, 309, 320, 317, 321, + 318, 323, 0, 314, 311, 312, 322, 314, 323, 315, + 321, 316, 313, 324, 317, 322, 316, 320, 0, 318, + + 319, 325, 327, 325, 326, 319, 321, 319, 323, 328, + 330, 329, 0, 332, 327, 319, 331, 322, 330, 324, + 324, 331, 322, 329, 328, 319, 319, 319, 325, 327, + 326, 326, 319, 333, 319, 332, 328, 330, 329, 334, + 332, 335, 319, 331, 336, 337, 338, 334, 339, 0, + 340, 333, 319, 335, 341, 342, 344, 339, 348, 343, + 333, 338, 349, 346, 340, 347, 334, 336, 335, 350, + 342, 336, 345, 338, 343, 339, 337, 340, 351, 347, + 344, 341, 342, 344, 345, 348, 343, 346, 352, 349, + 346, 353, 347, 0, 355, 357, 354, 356, 361, 345, + + 350, 360, 354, 359, 358, 351, 363, 0, 360, 365, + 362, 367, 0, 376, 386, 352, 355, 0, 386, 363, + 356, 355, 353, 354, 356, 359, 357, 358, 360, 361, + 359, 358, 362, 363, 364, 365, 365, 362, 366, 364, + 369, 368, 367, 364, 376, 386, 0, 366, 372, 370, + 0, 371, 373, 0, 0, 0, 0, 0, 364, 368, + 377, 364, 372, 380, 369, 366, 364, 369, 368, 374, + 364, 370, 370, 371, 373, 372, 370, 375, 371, 373, + 374, 377, 378, 379, 381, 380, 382, 377, 384, 387, + 380, 0, 375, 381, 383, 385, 374, 390, 370, 382, + + 388, 390, 0, 0, 375, 0, 378, 379, 389, 378, + 379, 381, 384, 382, 391, 384, 383, 385, 388, 393, + 387, 383, 385, 389, 398, 392, 396, 388, 390, 394, + 397, 395, 389, 392, 396, 389, 399, 397, 394, 391, + 395, 391, 403, 400, 393, 405, 393, 398, 402, 0, + 389, 398, 392, 396, 399, 400, 394, 397, 395, 401, + 402, 404, 406, 399, 410, 407, 408, 0, 401, 404, + 400, 405, 405, 403, 409, 402, 411, 408, 410, 413, + 412, 0, 409, 414, 0, 406, 401, 407, 404, 406, + 415, 410, 407, 408, 417, 416, 411, 418, 419, 413, + + 422, 409, 412, 411, 416, 414, 413, 412, 420, 421, + 414, 419, 415, 423, 417, 418, 426, 415, 424, 423, + 0, 417, 416, 422, 418, 419, 424, 422, 427, 429, + 420, 428, 434, 421, 437, 420, 421, 431, 429, 439, + 423, 430, 434, 440, 424, 424, 428, 426, 438, 431, + 442, 427, 437, 424, 0, 427, 429, 446, 428, 434, + 430, 437, 439, 444, 431, 444, 439, 445, 430, 438, + 443, 451, 442, 0, 440, 438, 441, 442, 441, 443, + 447, 441, 0, 448, 446, 450, 441, 449, 0, 0, + 444, 445, 441, 441, 445, 451, 452, 443, 451, 449, + + 447, 441, 455, 441, 456, 441, 459, 447, 441, 448, + 448, 450, 450, 441, 449, 453, 454, 458, 452, 441, + 441, 455, 453, 452, 454, 457, 458, 460, 459, 455, + 456, 456, 461, 459, 462, 463, 0, 457, 0, 464, + 0, 467, 453, 454, 458, 465, 470, 468, 466, 472, + 467, 469, 457, 0, 460, 475, 0, 471, 0, 463, + 464, 477, 463, 461, 465, 462, 464, 466, 467, 468, + 476, 469, 465, 470, 468, 466, 471, 473, 469, 475, + 472, 478, 475, 476, 471, 473, 479, 477, 477, 481, + 482, 487, 483, 478, 479, 481, 484, 476, 483, 486, + + 485, 488, 489, 484, 473, 485, 486, 490, 478, 487, + 479, 489, 482, 479, 491, 490, 481, 482, 487, 483, + 492, 479, 493, 484, 488, 495, 486, 485, 488, 489, + 494, 496, 491, 492, 490, 0, 497, 494, 495, 499, + 498, 491, 500, 493, 501, 503, 502, 492, 498, 493, + 501, 504, 495, 507, 499, 509, 505, 494, 510, 497, + 506, 508, 496, 497, 500, 505, 499, 498, 508, 500, + 512, 501, 502, 502, 506, 504, 503, 511, 504, 517, + 524, 525, 509, 505, 507, 510, 513, 506, 508, 511, + 515, 0, 514, 512, 513, 514, 518, 512, 519, 0, + + 519, 524, 517, 515, 511, 521, 517, 524, 518, 520, + 522, 523, 525, 513, 0, 529, 522, 515, 521, 514, + 516, 520, 516, 518, 523, 519, 516, 528, 516, 527, + 529, 530, 521, 516, 0, 535, 520, 522, 523, 0, + 528, 526, 529, 531, 516, 532, 526, 516, 526, 516, + 533, 527, 538, 516, 528, 516, 527, 530, 530, 536, + 516, 534, 535, 533, 532, 531, 526, 526, 526, 534, + 531, 539, 532, 526, 542, 526, 540, 533, 541, 543, + 546, 544, 536, 538, 540, 0, 536, 543, 534, 545, + 550, 549, 541, 526, 560, 539, 542, 545, 539, 544, + + 548, 542, 546, 540, 547, 541, 543, 546, 544, 549, + 553, 547, 552, 548, 554, 558, 545, 0, 549, 553, + 552, 550, 555, 556, 557, 560, 554, 548, 559, 564, + 562, 547, 563, 558, 562, 563, 565, 553, 0, 552, + 566, 554, 558, 569, 555, 556, 557, 566, 565, 555, + 556, 557, 567, 564, 559, 559, 564, 571, 563, 563, + 568, 562, 563, 565, 570, 569, 568, 566, 573, 572, + 569, 574, 575, 576, 0, 0, 567, 577, 571, 567, + 572, 580, 576, 578, 571, 579, 570, 568, 580, 573, + 575, 570, 578, 579, 582, 573, 572, 581, 574, 575, + + 576, 577, 585, 583, 577, 584, 586, 587, 580, 588, + 578, 581, 579, 0, 584, 589, 582, 590, 592, 593, + 591, 582, 586, 596, 581, 583, 585, 589, 591, 585, + 583, 592, 584, 586, 593, 597, 606, 604, 587, 595, + 588, 596, 589, 597, 590, 592, 593, 591, 595, 598, + 596, 598, 601, 603, 605, 602, 607, 608, 606, 609, + 603, 610, 597, 606, 612, 601, 595, 602, 604, 607, + 608, 613, 612, 610, 615, 611, 598, 0, 616, 601, + 603, 609, 602, 607, 608, 605, 609, 611, 610, 617, + 614, 612, 615, 618, 621, 619, 620, 617, 613, 614, + + 616, 615, 611, 619, 626, 616, 622, 0, 628, 624, + 626, 633, 621, 623, 631, 618, 617, 614, 622, 620, + 618, 621, 619, 620, 624, 623, 625, 629, 627, 628, + 634, 626, 631, 622, 625, 628, 624, 627, 630, 629, + 623, 631, 633, 634, 635, 630, 637, 638, 640, 636, + 639, 638, 641, 625, 629, 627, 636, 634, 639, 642, + 643, 644, 640, 635, 647, 630, 646, 645, 637, 651, + 641, 635, 649, 637, 648, 640, 636, 639, 638, 641, + 652, 653, 647, 644, 0, 649, 643, 643, 644, 645, + 642, 647, 646, 646, 645, 650, 648, 654, 658, 649, + + 651, 648, 656, 653, 650, 655, 660, 659, 653, 662, + 655, 652, 655, 661, 655, 660, 663, 662, 656, 659, + 654, 658, 650, 655, 654, 658, 661, 667, 666, 656, + 666, 664, 655, 660, 659, 663, 662, 655, 665, 655, + 661, 655, 669, 663, 664, 668, 671, 665, 673, 672, + 674, 676, 675, 678, 667, 666, 673, 668, 664, 675, + 677, 679, 680, 682, 681, 665, 687, 688, 679, 669, + 671, 672, 668, 671, 685, 673, 672, 674, 676, 675, + 678, 684, 677, 681, 680, 682, 683, 677, 679, 680, + 682, 681, 689, 690, 685, 683, 692, 687, 688, 691, + + 693, 685, 684, 694, 692, 695, 696, 697, 684, 701, + 696, 0, 695, 683, 689, 698, 693, 691, 699, 689, + 700, 702, 698, 692, 690, 699, 691, 693, 702, 700, + 694, 704, 695, 696, 706, 701, 701, 703, 697, 703, + 704, 711, 698, 709, 709, 699, 705, 700, 702, 708, + 705, 710, 713, 708, 714, 0, 706, 712, 704, 713, + 710, 706, 715, 711, 703, 720, 712, 716, 711, 717, + 709, 715, 724, 705, 718, 716, 722, 714, 710, 713, + 708, 714, 717, 719, 712, 721, 718, 720, 723, 715, + 724, 719, 720, 726, 716, 725, 717, 723, 722, 724, + + 727, 718, 728, 722, 729, 721, 727, 725, 730, 733, + 719, 731, 721, 0, 726, 723, 738, 735, 734, 0, + 726, 737, 725, 736, 728, 737, 739, 727, 743, 728, + 735, 736, 744, 740, 739, 729, 733, 731, 731, 730, + 734, 740, 752, 738, 735, 734, 741, 741, 742, 743, + 736, 745, 737, 739, 746, 743, 742, 747, 748, 745, + 740, 749, 746, 744, 750, 747, 748, 751, 752, 752, + 750, 753, 754, 741, 749, 742, 755, 758, 745, 751, + 757, 746, 756, 759, 747, 748, 762, 757, 749, 760, + 755, 750, 766, 753, 751, 754, 767, 764, 753, 754, + + 756, 761, 768, 755, 758, 759, 764, 757, 761, 756, + 759, 770, 760, 772, 766, 774, 760, 762, 775, 766, + 776, 778, 767, 767, 764, 777, 780, 777, 761, 779, + 781, 783, 776, 768, 782, 784, 783, 781, 770, 774, + 772, 779, 774, 778, 775, 775, 785, 776, 778, 787, + 789, 784, 777, 780, 790, 786, 779, 781, 783, 789, + 782, 782, 784, 786, 791, 792, 796, 790, 793, 785, + 799, 787, 792, 785, 795, 793, 787, 789, 794, 797, + 798, 790, 786, 799, 800, 794, 803, 798, 796, 806, + 791, 791, 792, 796, 801, 793, 804, 799, 804, 795, + + 805, 795, 807, 808, 811, 794, 809, 798, 803, 810, + 797, 800, 808, 803, 809, 801, 810, 813, 812, 814, + 806, 801, 812, 804, 805, 815, 811, 805, 807, 807, + 808, 811, 816, 809, 820, 817, 810, 822, 819, 813, + 821, 816, 817, 818, 813, 812, 814, 815, 823, 820, + 818, 819, 815, 824, 821, 823, 833, 825, 828, 816, + 824, 820, 817, 825, 827, 819, 830, 821, 822, 829, + 818, 834, 829, 841, 0, 823, 827, 830, 828, 835, + 824, 836, 837, 833, 825, 828, 838, 829, 842, 840, + 843, 827, 836, 830, 838, 834, 829, 843, 834, 829, + + 837, 835, 839, 845, 841, 839, 835, 840, 836, 837, + 844, 853, 845, 838, 846, 842, 840, 843, 849, 847, + 839, 847, 848, 850, 844, 855, 851, 846, 858, 839, + 845, 848, 839, 856, 850, 851, 857, 844, 854, 0, + 0, 846, 853, 857, 849, 849, 847, 854, 859, 848, + 850, 863, 860, 851, 856, 864, 855, 865, 860, 858, + 856, 882, 859, 857, 866, 854, 865, 870, 872, 864, + 863, 868, 866, 871, 870, 859, 860, 867, 863, 860, + 868, 873, 864, 874, 865, 860, 878, 877, 867, 875, + 872, 866, 882, 876, 870, 872, 871, 876, 868, 877, + + 871, 885, 879, 873, 867, 874, 880, 875, 873, 881, + 874, 883, 886, 878, 877, 879, 875, 887, 884, 889, + 876, 880, 885, 890, 881, 891, 883, 884, 885, 879, + 895, 897, 898, 880, 892, 893, 881, 889, 883, 886, + 892, 894, 896, 893, 887, 884, 889, 899, 894, 896, + 890, 902, 900, 904, 903, 908, 891, 895, 897, 898, + 906, 892, 893, 903, 905, 913, 905, 907, 894, 896, + 909, 913, 909, 910, 914, 0, 900, 909, 899, 900, + 910, 903, 902, 911, 904, 909, 908, 906, 912, 919, + 911, 905, 913, 907, 907, 912, 916, 909, 917, 909, + + 910, 914, 915, 915, 909, 917, 920, 919, 921, 923, + 911, 922, 924, 924, 925, 912, 919, 926, 926, 927, + 921, 929, 916, 916, 930, 917, 933, 923, 0, 915, + 927, 922, 932, 920, 934, 921, 923, 947, 922, 924, + 925, 925, 931, 929, 926, 935, 927, 936, 929, 931, + 937, 942, 932, 933, 936, 930, 934, 938, 939, 932, + 940, 934, 937, 935, 941, 938, 944, 945, 947, 931, + 939, 948, 935, 945, 936, 949, 946, 937, 942, 949, + 950, 940, 941, 943, 938, 939, 951, 940, 943, 946, + 952, 941, 953, 944, 945, 954, 963, 955, 948, 943, + + 956, 951, 956, 946, 957, 960, 949, 953, 959, 958, + 943, 950, 955, 951, 958, 943, 962, 964, 954, 953, + 960, 952, 954, 963, 955, 965, 966, 956, 967, 968, + 971, 978, 960, 974, 982, 957, 958, 984, 0, 959, + 962, 975, 974, 962, 964, 971, 965, 968, 966, 967, + 973, 976, 965, 966, 981, 967, 968, 971, 978, 975, + 974, 973, 983, 984, 984, 982, 985, 981, 975, 976, + 986, 992, 983, 989, 988, 0, 973, 973, 976, 990, + 989, 981, 998, 995, 991, 0, 992, 993, 973, 983, + 991, 985, 994, 985, 988, 995, 996, 986, 992, 999, + + 989, 988, 993, 996, 998, 990, 990, 994, 1000, 998, + 995, 991, 1001, 1004, 993, 1003, 1006, 1000, 1010, 994, + 1005, 1005, 1008, 996, 999, 1007, 999, 1010, 1003, 1009, + 1001, 1012, 1013, 1016, 1011, 1000, 0, 1017, 1006, 1001, + 1004, 1011, 1003, 1006, 1008, 1010, 1016, 1005, 1020, 1008, + 1007, 1009, 1007, 1018, 1013, 1015, 1009, 0, 1021, 1013, + 1016, 1011, 1012, 1015, 1017, 1024, 1019, 1025, 1018, 1019, + 1028, 1022, 1029, 1020, 1027, 1020, 1021, 1028, 0, 1031, + 1018, 1033, 1015, 1029, 1019, 1021, 1022, 1024, 1027, 1025, + 1036, 1035, 1024, 1019, 1025, 1037, 1019, 1028, 1022, 1029, + + 1031, 1027, 1033, 1034, 1038, 1034, 1031, 1039, 1033, 1035, + 1040, 1042, 1043, 1037, 1041, 1039, 1044, 1036, 1035, 1048, + 0, 1049, 1037, 1051, 1047, 1042, 1052, 0, 1053, 1050, + 1034, 1038, 1054, 1040, 1039, 1044, 1041, 1040, 1042, 1043, + 1053, 1041, 1047, 1044, 1050, 1051, 1048, 1049, 1049, 1052, + 1051, 1047, 1056, 1052, 1054, 1053, 1050, 1055, 1055, 1054, + 1056, 1058, 1059, 1060, 1058, 1061, 1062, 1064, 0, 1060, + 1059, 1065, 1062, 1066, 0, 1068, 1069, 1067, 1070, 1056, + 1061, 1072, 1071, 1073, 1055, 1075, 1076, 1066, 1058, 1059, + 1060, 1067, 1061, 1062, 1064, 1065, 1071, 1079, 1065, 1074, + + 1066, 1068, 1068, 1069, 1067, 1070, 1077, 1074, 1072, 1071, + 1073, 1080, 1075, 1076, 1077, 1081, 1082, 1087, 1083, 1079, + 1084, 1088, 1085, 1081, 1079, 1086, 1074, 1083, 1089, 1088, + 1091, 1092, 1092, 1077, 1093, 1094, 0, 1096, 1080, 1095, + 1086, 1084, 1081, 1082, 1087, 1083, 1085, 1084, 1088, 1085, + 1100, 1086, 1086, 1094, 1095, 1089, 1098, 1091, 1092, 1096, + 1093, 1093, 1094, 1097, 1096, 1097, 1095, 1086, 1099, 1101, + 1098, 1102, 1100, 1103, 1099, 1104, 1105, 1100, 1107, 1111, + 1114, 1101, 1110, 1098, 1109, 1107, 1112, 1119, 0, 1102, + 1097, 1103, 1114, 1117, 1112, 1099, 1101, 1118, 1102, 1105, + + 1103, 1115, 1109, 1105, 1120, 1107, 1104, 1114, 1110, 1110, + 1111, 1109, 1112, 1112, 1119, 1121, 1115, 1117, 1122, 1118, + 1117, 1112, 1123, 1124, 1118, 1125, 1126, 1120, 1115, 1127, + 1124, 1120, 1128, 1126, 1129, 1131, 0, 1132, 1133, 1121, + 1140, 1134, 1121, 1137, 1123, 1122, 1131, 1144, 1125, 1123, + 1124, 1127, 1125, 1126, 1143, 1129, 1127, 1133, 1146, 1132, + 1148, 1129, 1131, 1128, 1132, 1133, 1134, 1140, 1134, 1137, + 1137, 1149, 1150, 1151, 1144, 1154, 1143, 0, 1151, 1152, + 1158, 1143, 1157, 1150, 1161, 1146, 1160, 1162, 1163, 0, + 1159, 1148, 0, 0, 0, 1164, 1170, 1149, 1149, 1150, + + 1151, 1152, 1154, 1159, 1157, 1158, 1152, 1158, 1160, 1157, + 1164, 1161, 1165, 1160, 1162, 1163, 1166, 1159, 1167, 1168, + 1169, 1165, 1164, 1170, 1171, 1172, 1172, 1169, 1173, 1175, + 1174, 1166, 1175, 1167, 1168, 1173, 1176, 1178, 1179, 1165, + 1180, 1177, 1171, 1166, 1174, 1167, 1168, 1169, 1183, 1176, + 1177, 1171, 1172, 1182, 1185, 1173, 1175, 1174, 1186, 1178, + 1179, 1187, 1182, 1176, 1178, 1179, 1190, 1180, 1177, 1188, + 1189, 1192, 1193, 1187, 1183, 1183, 1186, 1190, 1188, 1189, + 1182, 1185, 1191, 1194, 1195, 1186, 0, 1196, 1187, 1202, + 1191, 1198, 1195, 1190, 1196, 1194, 1188, 1189, 1192, 1198, + + 1201, 1203, 1207, 1193, 1208, 1204, 1205, 1201, 1209, 1191, + 1194, 1195, 1208, 1202, 1196, 1205, 1202, 1204, 1198, 1210, + 0, 1214, 1216, 1217, 1219, 1215, 1221, 1201, 1203, 1207, + 1215, 1208, 1204, 1205, 1218, 1209, 1222, 1223, 1221, 1225, + 1216, 1226, 1224, 1219, 1227, 1217, 1210, 1214, 1214, 1216, + 1217, 1219, 1215, 1221, 1224, 1228, 1218, 1229, 1222, 1223, + 0, 1218, 1232, 1222, 1223, 1231, 1225, 1234, 1226, 1224, + 1236, 1235, 1237, 0, 1238, 1227, 0, 1232, 1239, 1243, + 1245, 0, 1228, 0, 1229, 1235, 1244, 1231, 1236, 1232, + 1237, 1234, 1231, 1246, 1234, 1241, 1239, 1236, 1235, 1237, + + 1238, 1238, 1242, 1241, 1244, 1239, 1243, 1245, 1247, 1249, + 1242, 1250, 1246, 1244, 1252, 1257, 1255, 0, 1256, 1258, + 1246, 1259, 1241, 1255, 1260, 1250, 1262, 1249, 1263, 1242, + 1247, 1264, 1267, 1260, 1261, 1247, 1249, 1271, 1250, 1257, + 1273, 1252, 1257, 1255, 1256, 1256, 1258, 1261, 1259, 1275, + 0, 1260, 1270, 1267, 1264, 1263, 1271, 1262, 1264, 1267, + 1270, 1261, 1272, 1274, 1271, 1276, 1273, 1273, 1277, 1277, + 1272, 1275, 1276, 1278, 1274, 1279, 1275, 1281, 1283, 1270, + 1284, 1286, 1279, 1285, 1290, 1288, 1290, 1283, 0, 1272, + 1274, 1278, 1276, 1293, 1289, 1277, 1294, 1297, 1295, 1286, + + 1278, 1281, 1279, 1288, 1281, 1283, 1285, 1284, 1286, 1289, + 1285, 1290, 1288, 1298, 1301, 1293, 1295, 1300, 1299, 1297, + 1293, 1289, 1294, 1294, 1297, 1295, 1299, 1303, 1302, 1300, + 1305, 1298, 1307, 1307, 1304, 1308, 1306, 1309, 1303, 1312, + 1298, 1301, 1304, 1308, 1300, 1299, 1302, 1310, 1315, 1305, + 1316, 1314, 1318, 1313, 1303, 1302, 1314, 1305, 1306, 1307, + 1313, 1304, 1308, 1306, 1309, 1317, 1312, 1318, 1320, 1310, + 1321, 1322, 0, 1317, 1310, 1315, 1319, 1316, 1314, 1318, + 1313, 1323, 1326, 1319, 1327, 1321, 1325, 1328, 1329, 1323, + 1330, 1331, 1317, 1333, 1335, 1320, 1340, 1321, 1322, 1325, + + 1336, 0, 0, 1319, 1326, 1339, 1341, 1343, 1323, 1326, + 0, 1327, 1330, 1325, 1328, 1329, 1346, 1330, 1331, 1333, + 1333, 1335, 1336, 1340, 1339, 1347, 1351, 1336, 1341, 1343, + 1345, 1353, 1339, 1341, 1343, 1355, 1358, 1345, 1356, 1359, + 1360, 1362, 1364, 1346, 1366, 1358, 1367, 1372, 1347, 1373, + 1356, 1374, 1347, 1351, 1353, 1380, 1373, 1345, 1353, 1366, + 0, 1375, 1355, 1358, 1378, 1356, 1359, 1360, 1362, 1364, + 1372, 1366, 1367, 1367, 1372, 1377, 1373, 1378, 1374, 1375, + 0, 1379, 1380, 0, 0, 0, 0, 1377, 1375, 1379, + 0, 1378, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 1377, 0, 0, 0, 0, 0, 1379, 1383, + 1383, 1383, 1383, 1383, 1383, 1383, 1384, 1384, 1384, 1384, + 1384, 1384, 1384, 1385, 1385, 1385, 1385, 1385, 1385, 1385, + 1386, 1386, 1386, 1386, 1386, 1386, 1386, 1387, 1387, 1387, + 1387, 1387, 1387, 1387, 1389, 1389, 0, 1389, 1389, 1389, + 1389, 1390, 1390, 0, 0, 0, 1390, 1390, 1391, 1391, + 0, 0, 1391, 0, 1391, 1392, 0, 0, 0, 0, + 0, 1392, 1393, 1393, 0, 0, 0, 1393, 1393, 1394, + 0, 0, 0, 0, 0, 1394, 1395, 1395, 0, 1395, + 1395, 1395, 1395, 1396, 1396, 0, 1396, 1396, 1396, 1396, + + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, + 1382, 1382, 1382, 1382, 1382, 1382 } ; static yy_state_type yy_last_accepting_state; @@ -1955,7 +1988,7 @@ static void config_end_include(void) #define YY_NO_INPUT 1 #endif -#line 1957 "<stdout>" +#line 1990 "<stdout>" #define INITIAL 0 #define quotedstring 1 @@ -2142,7 +2175,7 @@ YY_DECL #line 198 "util/configlexer.lex" -#line 2144 "<stdout>" +#line 2177 "<stdout>" if ( !(yy_init) ) { @@ -2201,13 +2234,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1355 ) + if ( yy_current_state >= 1383 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 3905 ); + while ( yy_base[yy_current_state] != 4001 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -2347,539 +2380,554 @@ YY_RULE_SETUP case 23: YY_RULE_SETUP #line 224 "util/configlexer.lex" -{ YDVAR(1, VAR_OUTGOING_INTERFACE) } +{ YDVAR(1, VAR_INTERFACE) } YY_BREAK case 24: YY_RULE_SETUP #line 225 "util/configlexer.lex" -{ YDVAR(1, VAR_INTERFACE_AUTOMATIC) } +{ YDVAR(1, VAR_OUTGOING_INTERFACE) } YY_BREAK case 25: YY_RULE_SETUP #line 226 "util/configlexer.lex" -{ YDVAR(1, VAR_SO_RCVBUF) } +{ YDVAR(1, VAR_INTERFACE_AUTOMATIC) } YY_BREAK case 26: YY_RULE_SETUP #line 227 "util/configlexer.lex" -{ YDVAR(1, VAR_SO_SNDBUF) } +{ YDVAR(1, VAR_SO_RCVBUF) } YY_BREAK case 27: YY_RULE_SETUP #line 228 "util/configlexer.lex" -{ YDVAR(1, VAR_CHROOT) } +{ YDVAR(1, VAR_SO_SNDBUF) } YY_BREAK case 28: YY_RULE_SETUP #line 229 "util/configlexer.lex" -{ YDVAR(1, VAR_USERNAME) } +{ YDVAR(1, VAR_SO_REUSEPORT) } YY_BREAK case 29: YY_RULE_SETUP #line 230 "util/configlexer.lex" -{ YDVAR(1, VAR_DIRECTORY) } +{ YDVAR(1, VAR_CHROOT) } YY_BREAK case 30: YY_RULE_SETUP #line 231 "util/configlexer.lex" -{ YDVAR(1, VAR_LOGFILE) } +{ YDVAR(1, VAR_USERNAME) } YY_BREAK case 31: YY_RULE_SETUP #line 232 "util/configlexer.lex" -{ YDVAR(1, VAR_PIDFILE) } +{ YDVAR(1, VAR_DIRECTORY) } YY_BREAK case 32: YY_RULE_SETUP #line 233 "util/configlexer.lex" -{ YDVAR(1, VAR_ROOT_HINTS) } +{ YDVAR(1, VAR_LOGFILE) } YY_BREAK case 33: YY_RULE_SETUP #line 234 "util/configlexer.lex" -{ YDVAR(1, VAR_EDNS_BUFFER_SIZE) } +{ YDVAR(1, VAR_PIDFILE) } YY_BREAK case 34: YY_RULE_SETUP #line 235 "util/configlexer.lex" -{ YDVAR(1, VAR_MSG_BUFFER_SIZE) } +{ YDVAR(1, VAR_ROOT_HINTS) } YY_BREAK case 35: YY_RULE_SETUP #line 236 "util/configlexer.lex" -{ YDVAR(1, VAR_MSG_CACHE_SIZE) } +{ YDVAR(1, VAR_EDNS_BUFFER_SIZE) } YY_BREAK case 36: YY_RULE_SETUP #line 237 "util/configlexer.lex" -{ YDVAR(1, VAR_MSG_CACHE_SLABS) } +{ YDVAR(1, VAR_MSG_BUFFER_SIZE) } YY_BREAK case 37: YY_RULE_SETUP #line 238 "util/configlexer.lex" -{ YDVAR(1, VAR_RRSET_CACHE_SIZE) } +{ YDVAR(1, VAR_MSG_CACHE_SIZE) } YY_BREAK case 38: YY_RULE_SETUP #line 239 "util/configlexer.lex" -{ YDVAR(1, VAR_RRSET_CACHE_SLABS) } +{ YDVAR(1, VAR_MSG_CACHE_SLABS) } YY_BREAK case 39: YY_RULE_SETUP #line 240 "util/configlexer.lex" -{ YDVAR(1, VAR_CACHE_MAX_TTL) } +{ YDVAR(1, VAR_RRSET_CACHE_SIZE) } YY_BREAK case 40: YY_RULE_SETUP #line 241 "util/configlexer.lex" -{ YDVAR(1, VAR_CACHE_MIN_TTL) } +{ YDVAR(1, VAR_RRSET_CACHE_SLABS) } YY_BREAK case 41: YY_RULE_SETUP #line 242 "util/configlexer.lex" -{ YDVAR(1, VAR_INFRA_HOST_TTL) } +{ YDVAR(1, VAR_CACHE_MAX_TTL) } YY_BREAK case 42: YY_RULE_SETUP #line 243 "util/configlexer.lex" -{ YDVAR(1, VAR_INFRA_LAME_TTL) } +{ YDVAR(1, VAR_CACHE_MIN_TTL) } YY_BREAK case 43: YY_RULE_SETUP #line 244 "util/configlexer.lex" -{ YDVAR(1, VAR_INFRA_CACHE_SLABS) } +{ YDVAR(1, VAR_INFRA_HOST_TTL) } YY_BREAK case 44: YY_RULE_SETUP #line 245 "util/configlexer.lex" -{ YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) } +{ YDVAR(1, VAR_INFRA_LAME_TTL) } YY_BREAK case 45: YY_RULE_SETUP #line 246 "util/configlexer.lex" -{ YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) } +{ YDVAR(1, VAR_INFRA_CACHE_SLABS) } YY_BREAK case 46: YY_RULE_SETUP #line 247 "util/configlexer.lex" -{ YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) } +{ YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) } YY_BREAK case 47: YY_RULE_SETUP #line 248 "util/configlexer.lex" -{ YDVAR(1, VAR_JOSTLE_TIMEOUT) } +{ YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) } YY_BREAK case 48: YY_RULE_SETUP #line 249 "util/configlexer.lex" -{ YDVAR(1, VAR_TARGET_FETCH_POLICY) } +{ YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) } YY_BREAK case 49: YY_RULE_SETUP #line 250 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) } +{ YDVAR(1, VAR_JOSTLE_TIMEOUT) } YY_BREAK case 50: YY_RULE_SETUP #line 251 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_LARGE_QUERIES) } +{ YDVAR(1, VAR_DELAY_CLOSE) } YY_BREAK case 51: YY_RULE_SETUP #line 252 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_GLUE) } +{ YDVAR(1, VAR_TARGET_FETCH_POLICY) } YY_BREAK case 52: YY_RULE_SETUP #line 253 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) } +{ YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) } YY_BREAK case 53: YY_RULE_SETUP #line 254 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) } +{ YDVAR(1, VAR_HARDEN_LARGE_QUERIES) } YY_BREAK case 54: YY_RULE_SETUP #line 255 "util/configlexer.lex" -{ YDVAR(1, VAR_HARDEN_REFERRAL_PATH) } +{ YDVAR(1, VAR_HARDEN_GLUE) } YY_BREAK case 55: YY_RULE_SETUP #line 256 "util/configlexer.lex" -{ YDVAR(1, VAR_USE_CAPS_FOR_ID) } +{ YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) } YY_BREAK case 56: YY_RULE_SETUP #line 257 "util/configlexer.lex" -{ YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) } +{ YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) } YY_BREAK case 57: YY_RULE_SETUP #line 258 "util/configlexer.lex" -{ YDVAR(1, VAR_PRIVATE_ADDRESS) } +{ YDVAR(1, VAR_HARDEN_REFERRAL_PATH) } YY_BREAK case 58: YY_RULE_SETUP #line 259 "util/configlexer.lex" -{ YDVAR(1, VAR_PRIVATE_DOMAIN) } +{ YDVAR(1, VAR_USE_CAPS_FOR_ID) } YY_BREAK case 59: YY_RULE_SETUP #line 260 "util/configlexer.lex" -{ YDVAR(1, VAR_PREFETCH_KEY) } +{ YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) } YY_BREAK case 60: YY_RULE_SETUP #line 261 "util/configlexer.lex" -{ YDVAR(1, VAR_PREFETCH) } +{ YDVAR(1, VAR_PRIVATE_ADDRESS) } YY_BREAK case 61: YY_RULE_SETUP #line 262 "util/configlexer.lex" -{ YDVAR(0, VAR_STUB_ZONE) } +{ YDVAR(1, VAR_PRIVATE_DOMAIN) } YY_BREAK case 62: YY_RULE_SETUP #line 263 "util/configlexer.lex" -{ YDVAR(1, VAR_NAME) } +{ YDVAR(1, VAR_PREFETCH_KEY) } YY_BREAK case 63: YY_RULE_SETUP #line 264 "util/configlexer.lex" -{ YDVAR(1, VAR_STUB_ADDR) } +{ YDVAR(1, VAR_PREFETCH) } YY_BREAK case 64: YY_RULE_SETUP #line 265 "util/configlexer.lex" -{ YDVAR(1, VAR_STUB_HOST) } +{ YDVAR(0, VAR_STUB_ZONE) } YY_BREAK case 65: YY_RULE_SETUP #line 266 "util/configlexer.lex" -{ YDVAR(1, VAR_STUB_PRIME) } +{ YDVAR(1, VAR_NAME) } YY_BREAK case 66: YY_RULE_SETUP #line 267 "util/configlexer.lex" -{ YDVAR(1, VAR_STUB_FIRST) } +{ YDVAR(1, VAR_STUB_ADDR) } YY_BREAK case 67: YY_RULE_SETUP #line 268 "util/configlexer.lex" -{ YDVAR(0, VAR_FORWARD_ZONE) } +{ YDVAR(1, VAR_STUB_HOST) } YY_BREAK case 68: YY_RULE_SETUP #line 269 "util/configlexer.lex" -{ YDVAR(1, VAR_FORWARD_ADDR) } +{ YDVAR(1, VAR_STUB_PRIME) } YY_BREAK case 69: YY_RULE_SETUP #line 270 "util/configlexer.lex" -{ YDVAR(1, VAR_FORWARD_HOST) } +{ YDVAR(1, VAR_STUB_FIRST) } YY_BREAK case 70: YY_RULE_SETUP #line 271 "util/configlexer.lex" -{ YDVAR(1, VAR_FORWARD_FIRST) } +{ YDVAR(0, VAR_FORWARD_ZONE) } YY_BREAK case 71: YY_RULE_SETUP #line 272 "util/configlexer.lex" -{ YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) } +{ YDVAR(1, VAR_FORWARD_ADDR) } YY_BREAK case 72: YY_RULE_SETUP #line 273 "util/configlexer.lex" -{ YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) } +{ YDVAR(1, VAR_FORWARD_HOST) } YY_BREAK case 73: YY_RULE_SETUP #line 274 "util/configlexer.lex" -{ YDVAR(2, VAR_ACCESS_CONTROL) } +{ YDVAR(1, VAR_FORWARD_FIRST) } YY_BREAK case 74: YY_RULE_SETUP #line 275 "util/configlexer.lex" -{ YDVAR(1, VAR_HIDE_IDENTITY) } +{ YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) } YY_BREAK case 75: YY_RULE_SETUP #line 276 "util/configlexer.lex" -{ YDVAR(1, VAR_HIDE_VERSION) } +{ YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) } YY_BREAK case 76: YY_RULE_SETUP #line 277 "util/configlexer.lex" -{ YDVAR(1, VAR_IDENTITY) } +{ YDVAR(2, VAR_ACCESS_CONTROL) } YY_BREAK case 77: YY_RULE_SETUP #line 278 "util/configlexer.lex" -{ YDVAR(1, VAR_VERSION) } +{ YDVAR(1, VAR_HIDE_IDENTITY) } YY_BREAK case 78: YY_RULE_SETUP #line 279 "util/configlexer.lex" -{ YDVAR(1, VAR_MODULE_CONF) } +{ YDVAR(1, VAR_HIDE_VERSION) } YY_BREAK case 79: YY_RULE_SETUP #line 280 "util/configlexer.lex" -{ YDVAR(1, VAR_DLV_ANCHOR) } +{ YDVAR(1, VAR_IDENTITY) } YY_BREAK case 80: YY_RULE_SETUP #line 281 "util/configlexer.lex" -{ YDVAR(1, VAR_DLV_ANCHOR_FILE) } +{ YDVAR(1, VAR_VERSION) } YY_BREAK case 81: YY_RULE_SETUP #line 282 "util/configlexer.lex" -{ YDVAR(1, VAR_TRUST_ANCHOR_FILE) } +{ YDVAR(1, VAR_MODULE_CONF) } YY_BREAK case 82: YY_RULE_SETUP #line 283 "util/configlexer.lex" -{ YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) } +{ YDVAR(1, VAR_DLV_ANCHOR) } YY_BREAK case 83: YY_RULE_SETUP #line 284 "util/configlexer.lex" -{ YDVAR(1, VAR_TRUSTED_KEYS_FILE) } +{ YDVAR(1, VAR_DLV_ANCHOR_FILE) } YY_BREAK case 84: YY_RULE_SETUP #line 285 "util/configlexer.lex" -{ YDVAR(1, VAR_TRUST_ANCHOR) } +{ YDVAR(1, VAR_TRUST_ANCHOR_FILE) } YY_BREAK case 85: YY_RULE_SETUP #line 286 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_OVERRIDE_DATE) } +{ YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) } YY_BREAK case 86: YY_RULE_SETUP #line 287 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_SIG_SKEW_MIN) } +{ YDVAR(1, VAR_TRUSTED_KEYS_FILE) } YY_BREAK case 87: YY_RULE_SETUP #line 288 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_SIG_SKEW_MAX) } +{ YDVAR(1, VAR_TRUST_ANCHOR) } YY_BREAK case 88: YY_RULE_SETUP #line 289 "util/configlexer.lex" -{ YDVAR(1, VAR_BOGUS_TTL) } +{ YDVAR(1, VAR_VAL_OVERRIDE_DATE) } YY_BREAK case 89: YY_RULE_SETUP #line 290 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) } +{ YDVAR(1, VAR_VAL_SIG_SKEW_MIN) } YY_BREAK case 90: YY_RULE_SETUP #line 291 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_PERMISSIVE_MODE) } +{ YDVAR(1, VAR_VAL_SIG_SKEW_MAX) } YY_BREAK case 91: YY_RULE_SETUP #line 292 "util/configlexer.lex" -{ YDVAR(1, VAR_IGNORE_CD_FLAG) } +{ YDVAR(1, VAR_BOGUS_TTL) } YY_BREAK case 92: YY_RULE_SETUP #line 293 "util/configlexer.lex" -{ YDVAR(1, VAR_VAL_LOG_LEVEL) } +{ YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) } YY_BREAK case 93: YY_RULE_SETUP #line 294 "util/configlexer.lex" -{ YDVAR(1, VAR_KEY_CACHE_SIZE) } +{ YDVAR(1, VAR_VAL_PERMISSIVE_MODE) } YY_BREAK case 94: YY_RULE_SETUP #line 295 "util/configlexer.lex" -{ YDVAR(1, VAR_KEY_CACHE_SLABS) } +{ YDVAR(1, VAR_IGNORE_CD_FLAG) } YY_BREAK case 95: YY_RULE_SETUP #line 296 "util/configlexer.lex" -{ YDVAR(1, VAR_NEG_CACHE_SIZE) } +{ YDVAR(1, VAR_VAL_LOG_LEVEL) } YY_BREAK case 96: YY_RULE_SETUP #line 297 "util/configlexer.lex" -{ - YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) } +{ YDVAR(1, VAR_KEY_CACHE_SIZE) } YY_BREAK case 97: YY_RULE_SETUP -#line 299 "util/configlexer.lex" -{ YDVAR(1, VAR_ADD_HOLDDOWN) } +#line 298 "util/configlexer.lex" +{ YDVAR(1, VAR_KEY_CACHE_SLABS) } YY_BREAK case 98: YY_RULE_SETUP -#line 300 "util/configlexer.lex" -{ YDVAR(1, VAR_DEL_HOLDDOWN) } +#line 299 "util/configlexer.lex" +{ YDVAR(1, VAR_NEG_CACHE_SIZE) } YY_BREAK case 99: YY_RULE_SETUP -#line 301 "util/configlexer.lex" -{ YDVAR(1, VAR_KEEP_MISSING) } +#line 300 "util/configlexer.lex" +{ + YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) } YY_BREAK case 100: YY_RULE_SETUP #line 302 "util/configlexer.lex" -{ YDVAR(1, VAR_USE_SYSLOG) } +{ YDVAR(1, VAR_ADD_HOLDDOWN) } YY_BREAK case 101: YY_RULE_SETUP #line 303 "util/configlexer.lex" -{ YDVAR(1, VAR_LOG_TIME_ASCII) } +{ YDVAR(1, VAR_DEL_HOLDDOWN) } YY_BREAK case 102: YY_RULE_SETUP #line 304 "util/configlexer.lex" -{ YDVAR(1, VAR_LOG_QUERIES) } +{ YDVAR(1, VAR_KEEP_MISSING) } YY_BREAK case 103: YY_RULE_SETUP #line 305 "util/configlexer.lex" -{ YDVAR(2, VAR_LOCAL_ZONE) } +{ YDVAR(1, VAR_USE_SYSLOG) } YY_BREAK case 104: YY_RULE_SETUP #line 306 "util/configlexer.lex" -{ YDVAR(1, VAR_LOCAL_DATA) } +{ YDVAR(1, VAR_LOG_TIME_ASCII) } YY_BREAK case 105: YY_RULE_SETUP #line 307 "util/configlexer.lex" -{ YDVAR(1, VAR_LOCAL_DATA_PTR) } +{ YDVAR(1, VAR_LOG_QUERIES) } YY_BREAK case 106: YY_RULE_SETUP #line 308 "util/configlexer.lex" -{ YDVAR(1, VAR_STATISTICS_INTERVAL) } +{ YDVAR(2, VAR_LOCAL_ZONE) } YY_BREAK case 107: YY_RULE_SETUP #line 309 "util/configlexer.lex" -{ YDVAR(1, VAR_STATISTICS_CUMULATIVE) } +{ YDVAR(1, VAR_LOCAL_DATA) } YY_BREAK case 108: YY_RULE_SETUP #line 310 "util/configlexer.lex" -{ YDVAR(1, VAR_EXTENDED_STATISTICS) } +{ YDVAR(1, VAR_LOCAL_DATA_PTR) } YY_BREAK case 109: YY_RULE_SETUP #line 311 "util/configlexer.lex" -{ YDVAR(0, VAR_REMOTE_CONTROL) } +{ YDVAR(1, VAR_STATISTICS_INTERVAL) } YY_BREAK case 110: YY_RULE_SETUP #line 312 "util/configlexer.lex" -{ YDVAR(1, VAR_CONTROL_ENABLE) } +{ YDVAR(1, VAR_STATISTICS_CUMULATIVE) } YY_BREAK case 111: YY_RULE_SETUP #line 313 "util/configlexer.lex" -{ YDVAR(1, VAR_CONTROL_INTERFACE) } +{ YDVAR(1, VAR_EXTENDED_STATISTICS) } YY_BREAK case 112: YY_RULE_SETUP #line 314 "util/configlexer.lex" -{ YDVAR(1, VAR_CONTROL_PORT) } +{ YDVAR(0, VAR_REMOTE_CONTROL) } YY_BREAK case 113: YY_RULE_SETUP #line 315 "util/configlexer.lex" -{ YDVAR(1, VAR_SERVER_KEY_FILE) } +{ YDVAR(1, VAR_CONTROL_ENABLE) } YY_BREAK case 114: YY_RULE_SETUP #line 316 "util/configlexer.lex" -{ YDVAR(1, VAR_SERVER_CERT_FILE) } +{ YDVAR(1, VAR_CONTROL_INTERFACE) } YY_BREAK case 115: YY_RULE_SETUP #line 317 "util/configlexer.lex" -{ YDVAR(1, VAR_CONTROL_KEY_FILE) } +{ YDVAR(1, VAR_CONTROL_PORT) } YY_BREAK case 116: YY_RULE_SETUP #line 318 "util/configlexer.lex" -{ YDVAR(1, VAR_CONTROL_CERT_FILE) } +{ YDVAR(1, VAR_SERVER_KEY_FILE) } YY_BREAK case 117: YY_RULE_SETUP #line 319 "util/configlexer.lex" -{ YDVAR(1, VAR_PYTHON_SCRIPT) } +{ YDVAR(1, VAR_SERVER_CERT_FILE) } YY_BREAK case 118: YY_RULE_SETUP #line 320 "util/configlexer.lex" -{ YDVAR(0, VAR_PYTHON) } +{ YDVAR(1, VAR_CONTROL_KEY_FILE) } YY_BREAK case 119: YY_RULE_SETUP #line 321 "util/configlexer.lex" -{ YDVAR(1, VAR_DOMAIN_INSECURE) } +{ YDVAR(1, VAR_CONTROL_CERT_FILE) } YY_BREAK case 120: YY_RULE_SETUP #line 322 "util/configlexer.lex" -{ YDVAR(1, VAR_MINIMAL_RESPONSES) } +{ YDVAR(1, VAR_PYTHON_SCRIPT) } YY_BREAK case 121: YY_RULE_SETUP #line 323 "util/configlexer.lex" -{ YDVAR(1, VAR_RRSET_ROUNDROBIN) } +{ YDVAR(0, VAR_PYTHON) } YY_BREAK case 122: YY_RULE_SETUP #line 324 "util/configlexer.lex" -{ YDVAR(1, VAR_MAX_UDP_SIZE) } +{ YDVAR(1, VAR_DOMAIN_INSECURE) } YY_BREAK case 123: -/* rule 123 can match eol */ YY_RULE_SETUP #line 325 "util/configlexer.lex" -{ LEXOUT(("NL\n")); cfg_parser->line++; } +{ YDVAR(1, VAR_MINIMAL_RESPONSES) } YY_BREAK -/* Quoted strings. Strip leading and ending quotes */ case 124: YY_RULE_SETUP +#line 326 "util/configlexer.lex" +{ YDVAR(1, VAR_RRSET_ROUNDROBIN) } + YY_BREAK +case 125: +YY_RULE_SETUP +#line 327 "util/configlexer.lex" +{ YDVAR(1, VAR_MAX_UDP_SIZE) } + YY_BREAK +case 126: +/* rule 126 can match eol */ +YY_RULE_SETUP #line 328 "util/configlexer.lex" +{ LEXOUT(("NL\n")); cfg_parser->line++; } + YY_BREAK +/* Quoted strings. Strip leading and ending quotes */ +case 127: +YY_RULE_SETUP +#line 331 "util/configlexer.lex" { BEGIN(quotedstring); LEXOUT(("QS ")); } YY_BREAK case YY_STATE_EOF(quotedstring): -#line 329 "util/configlexer.lex" +#line 332 "util/configlexer.lex" { yyerror("EOF inside quoted string"); if(--num_args == 0) { BEGIN(INITIAL); } else { BEGIN(val); } } YY_BREAK -case 125: +case 128: YY_RULE_SETUP -#line 334 "util/configlexer.lex" +#line 337 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 126: -/* rule 126 can match eol */ +case 129: +/* rule 129 can match eol */ YY_RULE_SETUP -#line 335 "util/configlexer.lex" +#line 338 "util/configlexer.lex" { yyerror("newline inside quoted string, no end \""); cfg_parser->line++; BEGIN(INITIAL); } YY_BREAK -case 127: +case 130: YY_RULE_SETUP -#line 337 "util/configlexer.lex" +#line 340 "util/configlexer.lex" { LEXOUT(("QE ")); if(--num_args == 0) { BEGIN(INITIAL); } @@ -2892,34 +2940,34 @@ YY_RULE_SETUP } YY_BREAK /* Single Quoted strings. Strip leading and ending quotes */ -case 128: +case 131: YY_RULE_SETUP -#line 349 "util/configlexer.lex" +#line 352 "util/configlexer.lex" { BEGIN(singlequotedstr); LEXOUT(("SQS ")); } YY_BREAK case YY_STATE_EOF(singlequotedstr): -#line 350 "util/configlexer.lex" +#line 353 "util/configlexer.lex" { yyerror("EOF inside quoted string"); if(--num_args == 0) { BEGIN(INITIAL); } else { BEGIN(val); } } YY_BREAK -case 129: +case 132: YY_RULE_SETUP -#line 355 "util/configlexer.lex" +#line 358 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 130: -/* rule 130 can match eol */ +case 133: +/* rule 133 can match eol */ YY_RULE_SETUP -#line 356 "util/configlexer.lex" +#line 359 "util/configlexer.lex" { yyerror("newline inside quoted string, no end '"); cfg_parser->line++; BEGIN(INITIAL); } YY_BREAK -case 131: +case 134: YY_RULE_SETUP -#line 358 "util/configlexer.lex" +#line 361 "util/configlexer.lex" { LEXOUT(("SQE ")); if(--num_args == 0) { BEGIN(INITIAL); } @@ -2932,38 +2980,38 @@ YY_RULE_SETUP } YY_BREAK /* include: directive */ -case 132: +case 135: YY_RULE_SETUP -#line 370 "util/configlexer.lex" +#line 373 "util/configlexer.lex" { LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); } YY_BREAK case YY_STATE_EOF(include): -#line 372 "util/configlexer.lex" +#line 375 "util/configlexer.lex" { yyerror("EOF inside include directive"); BEGIN(inc_prev); } YY_BREAK -case 133: +case 136: YY_RULE_SETUP -#line 376 "util/configlexer.lex" +#line 379 "util/configlexer.lex" { LEXOUT(("ISP ")); /* ignore */ } YY_BREAK -case 134: -/* rule 134 can match eol */ +case 137: +/* rule 137 can match eol */ YY_RULE_SETUP -#line 377 "util/configlexer.lex" +#line 380 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK -case 135: +case 138: YY_RULE_SETUP -#line 378 "util/configlexer.lex" +#line 381 "util/configlexer.lex" { LEXOUT(("IQS ")); BEGIN(include_quoted); } YY_BREAK -case 136: +case 139: YY_RULE_SETUP -#line 379 "util/configlexer.lex" +#line 382 "util/configlexer.lex" { LEXOUT(("Iunquotedstr(%s) ", yytext)); config_start_include_glob(yytext); @@ -2971,27 +3019,27 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(include_quoted): -#line 384 "util/configlexer.lex" +#line 387 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(inc_prev); } YY_BREAK -case 137: +case 140: YY_RULE_SETUP -#line 388 "util/configlexer.lex" +#line 391 "util/configlexer.lex" { LEXOUT(("ISTR(%s) ", yytext)); yymore(); } YY_BREAK -case 138: -/* rule 138 can match eol */ +case 141: +/* rule 141 can match eol */ YY_RULE_SETUP -#line 389 "util/configlexer.lex" +#line 392 "util/configlexer.lex" { yyerror("newline before \" in include name"); cfg_parser->line++; BEGIN(inc_prev); } YY_BREAK -case 139: +case 142: YY_RULE_SETUP -#line 391 "util/configlexer.lex" +#line 394 "util/configlexer.lex" { LEXOUT(("IQE ")); yytext[yyleng - 1] = '\0'; @@ -3001,7 +3049,7 @@ YY_RULE_SETUP YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(val): -#line 397 "util/configlexer.lex" +#line 400 "util/configlexer.lex" { LEXOUT(("LEXEOF ")); yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ @@ -3013,33 +3061,33 @@ case YY_STATE_EOF(val): } } YY_BREAK -case 140: +case 143: YY_RULE_SETUP -#line 408 "util/configlexer.lex" +#line 411 "util/configlexer.lex" { LEXOUT(("unquotedstr(%s) ", yytext)); if(--num_args == 0) { BEGIN(INITIAL); } yylval.str = strdup(yytext); return STRING_ARG; } YY_BREAK -case 141: +case 144: YY_RULE_SETUP -#line 412 "util/configlexer.lex" +#line 415 "util/configlexer.lex" { ub_c_error_msg("unknown keyword '%s'", yytext); } YY_BREAK -case 142: +case 145: YY_RULE_SETUP -#line 416 "util/configlexer.lex" +#line 419 "util/configlexer.lex" { ub_c_error_msg("stray '%s'", yytext); } YY_BREAK -case 143: +case 146: YY_RULE_SETUP -#line 420 "util/configlexer.lex" +#line 423 "util/configlexer.lex" ECHO; YY_BREAK -#line 3041 "<stdout>" +#line 3089 "<stdout>" case YY_END_OF_BUFFER: { @@ -3329,7 +3377,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1355 ) + if ( yy_current_state >= 1383 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -3357,11 +3405,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1355 ) + if ( yy_current_state >= 1383 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1354); + yy_is_jam = (yy_current_state == 1382); return yy_is_jam ? 0 : yy_current_state; } @@ -3994,7 +4042,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 420 "util/configlexer.lex" +#line 423 "util/configlexer.lex" diff --git a/util/configlexer.lex b/util/configlexer.lex index d3b081342011..b36c8af88427 100644 --- a/util/configlexer.lex +++ b/util/configlexer.lex @@ -221,10 +221,12 @@ ssl-service-pem{COLON} { YDVAR(1, VAR_SSL_SERVICE_PEM) } ssl-port{COLON} { YDVAR(1, VAR_SSL_PORT) } do-daemonize{COLON} { YDVAR(1, VAR_DO_DAEMONIZE) } interface{COLON} { YDVAR(1, VAR_INTERFACE) } +ip-address{COLON} { YDVAR(1, VAR_INTERFACE) } outgoing-interface{COLON} { YDVAR(1, VAR_OUTGOING_INTERFACE) } interface-automatic{COLON} { YDVAR(1, VAR_INTERFACE_AUTOMATIC) } so-rcvbuf{COLON} { YDVAR(1, VAR_SO_RCVBUF) } so-sndbuf{COLON} { YDVAR(1, VAR_SO_SNDBUF) } +so-reuseport{COLON} { YDVAR(1, VAR_SO_REUSEPORT) } chroot{COLON} { YDVAR(1, VAR_CHROOT) } username{COLON} { YDVAR(1, VAR_USERNAME) } directory{COLON} { YDVAR(1, VAR_DIRECTORY) } @@ -246,6 +248,7 @@ infra-cache-numhosts{COLON} { YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) } infra-cache-lame-size{COLON} { YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) } num-queries-per-thread{COLON} { YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) } jostle-timeout{COLON} { YDVAR(1, VAR_JOSTLE_TIMEOUT) } +delay-close{COLON} { YDVAR(1, VAR_DELAY_CLOSE) } target-fetch-policy{COLON} { YDVAR(1, VAR_TARGET_FETCH_POLICY) } harden-short-bufsize{COLON} { YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) } harden-large-queries{COLON} { YDVAR(1, VAR_HARDEN_LARGE_QUERIES) } diff --git a/util/configparser.c b/util/configparser.c index f5d04f216efe..3ea82b20a54c 100644 --- a/util/configparser.c +++ b/util/configparser.c @@ -242,19 +242,21 @@ extern int yydebug; VAR_PREFETCH = 370, VAR_PREFETCH_KEY = 371, VAR_SO_SNDBUF = 372, - VAR_HARDEN_BELOW_NXDOMAIN = 373, - VAR_IGNORE_CD_FLAG = 374, - VAR_LOG_QUERIES = 375, - VAR_TCP_UPSTREAM = 376, - VAR_SSL_UPSTREAM = 377, - VAR_SSL_SERVICE_KEY = 378, - VAR_SSL_SERVICE_PEM = 379, - VAR_SSL_PORT = 380, - VAR_FORWARD_FIRST = 381, - VAR_STUB_FIRST = 382, - VAR_MINIMAL_RESPONSES = 383, - VAR_RRSET_ROUNDROBIN = 384, - VAR_MAX_UDP_SIZE = 385 + VAR_SO_REUSEPORT = 373, + VAR_HARDEN_BELOW_NXDOMAIN = 374, + VAR_IGNORE_CD_FLAG = 375, + VAR_LOG_QUERIES = 376, + VAR_TCP_UPSTREAM = 377, + VAR_SSL_UPSTREAM = 378, + VAR_SSL_SERVICE_KEY = 379, + VAR_SSL_SERVICE_PEM = 380, + VAR_SSL_PORT = 381, + VAR_FORWARD_FIRST = 382, + VAR_STUB_FIRST = 383, + VAR_MINIMAL_RESPONSES = 384, + VAR_RRSET_ROUNDROBIN = 385, + VAR_MAX_UDP_SIZE = 386, + VAR_DELAY_CLOSE = 387 }; #endif /* Tokens. */ @@ -373,19 +375,21 @@ extern int yydebug; #define VAR_PREFETCH 370 #define VAR_PREFETCH_KEY 371 #define VAR_SO_SNDBUF 372 -#define VAR_HARDEN_BELOW_NXDOMAIN 373 -#define VAR_IGNORE_CD_FLAG 374 -#define VAR_LOG_QUERIES 375 -#define VAR_TCP_UPSTREAM 376 -#define VAR_SSL_UPSTREAM 377 -#define VAR_SSL_SERVICE_KEY 378 -#define VAR_SSL_SERVICE_PEM 379 -#define VAR_SSL_PORT 380 -#define VAR_FORWARD_FIRST 381 -#define VAR_STUB_FIRST 382 -#define VAR_MINIMAL_RESPONSES 383 -#define VAR_RRSET_ROUNDROBIN 384 -#define VAR_MAX_UDP_SIZE 385 +#define VAR_SO_REUSEPORT 373 +#define VAR_HARDEN_BELOW_NXDOMAIN 374 +#define VAR_IGNORE_CD_FLAG 375 +#define VAR_LOG_QUERIES 376 +#define VAR_TCP_UPSTREAM 377 +#define VAR_SSL_UPSTREAM 378 +#define VAR_SSL_SERVICE_KEY 379 +#define VAR_SSL_SERVICE_PEM 380 +#define VAR_SSL_PORT 381 +#define VAR_FORWARD_FIRST 382 +#define VAR_STUB_FIRST 383 +#define VAR_MINIMAL_RESPONSES 384 +#define VAR_RRSET_ROUNDROBIN 385 +#define VAR_MAX_UDP_SIZE 386 +#define VAR_DELAY_CLOSE 387 @@ -399,7 +403,7 @@ typedef union YYSTYPE /* Line 350 of yacc.c */ -#line 403 "util/configparser.c" +#line 407 "util/configparser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -427,7 +431,7 @@ int yyparse (); /* Copy the second part of user declarations. */ /* Line 353 of yacc.c */ -#line 431 "util/configparser.c" +#line 435 "util/configparser.c" #ifdef short # undef short @@ -647,20 +651,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 239 +#define YYLAST 244 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 131 +#define YYNTOKENS 133 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 134 +#define YYNNTS 136 /* YYNRULES -- Number of rules. */ -#define YYNRULES 255 +#define YYNRULES 259 /* YYNRULES -- Number of states. */ -#define YYNSTATES 374 +#define YYNSTATES 380 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 385 +#define YYMAXUTOK 387 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -706,7 +710,7 @@ static const yytype_uint8 yytranslate[] = 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130 + 125, 126, 127, 128, 129, 130, 131, 132 }; #if YYDEBUG @@ -725,89 +729,90 @@ static const yytype_uint16 yyprhs[] = 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, - 224, 226, 228, 231, 232, 234, 236, 238, 240, 242, - 244, 247, 248, 250, 252, 254, 256, 259, 262, 265, - 268, 271, 274, 277, 280, 283, 286, 289, 292, 295, - 298, 301, 304, 307, 310, 313, 316, 319, 322, 325, - 328, 331, 334, 337, 340, 343, 346, 349, 352, 355, - 358, 361, 364, 367, 370, 373, 376, 379, 382, 385, - 388, 391, 394, 397, 400, 403, 406, 409, 412, 415, - 418, 421, 424, 427, 430, 433, 436, 439, 442, 445, - 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, - 478, 482, 485, 488, 491, 494, 497, 500, 503, 506, - 509, 512, 515, 518, 521, 524, 527, 530, 533, 536, - 540, 543, 546, 549, 552, 555, 558, 561, 564, 567, - 570, 573, 576, 579, 582, 584, 587, 588, 590, 592, - 594, 596, 598, 600, 602, 605, 608, 611, 614, 617, - 620, 623, 625, 628, 629, 631 + 224, 226, 228, 230, 232, 235, 236, 238, 240, 242, + 244, 246, 248, 251, 252, 254, 256, 258, 260, 263, + 266, 269, 272, 275, 278, 281, 284, 287, 290, 293, + 296, 299, 302, 305, 308, 311, 314, 317, 320, 323, + 326, 329, 332, 335, 338, 341, 344, 347, 350, 353, + 356, 359, 362, 365, 368, 371, 374, 377, 380, 383, + 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, + 416, 419, 422, 425, 428, 431, 434, 437, 440, 443, + 446, 449, 452, 455, 458, 461, 464, 467, 470, 473, + 476, 479, 482, 485, 488, 492, 495, 498, 501, 504, + 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, + 537, 540, 543, 546, 550, 553, 556, 559, 562, 565, + 568, 571, 574, 577, 580, 583, 586, 589, 592, 594, + 597, 598, 600, 602, 604, 606, 608, 610, 612, 615, + 618, 621, 624, 627, 630, 633, 635, 638, 639, 641 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 132, 0, -1, -1, 132, 133, -1, 134, 135, -1, - 137, 138, -1, 140, 141, -1, 261, 262, -1, 251, - 252, -1, 11, -1, 135, 136, -1, -1, 143, -1, - 144, -1, 148, -1, 151, -1, 157, -1, 158, -1, - 159, -1, 160, -1, 149, -1, 170, -1, 171, -1, - 172, -1, 173, -1, 174, -1, 191, -1, 192, -1, - 193, -1, 195, -1, 196, -1, 154, -1, 197, -1, - 198, -1, 201, -1, 199, -1, 200, -1, 202, -1, - 203, -1, 204, -1, 215, -1, 183, -1, 184, -1, - 185, -1, 186, -1, 205, -1, 218, -1, 179, -1, - 181, -1, 219, -1, 224, -1, 225, -1, 226, -1, - 155, -1, 190, -1, 233, -1, 234, -1, 180, -1, - 229, -1, 167, -1, 150, -1, 175, -1, 216, -1, - 222, -1, 206, -1, 217, -1, 236, -1, 237, -1, - 156, -1, 145, -1, 166, -1, 209, -1, 146, -1, - 152, -1, 153, -1, 176, -1, 177, -1, 235, -1, - 208, -1, 210, -1, 211, -1, 147, -1, 238, -1, - 194, -1, 214, -1, 168, -1, 182, -1, 220, -1, - 221, -1, 223, -1, 228, -1, 178, -1, 230, -1, - 231, -1, 232, -1, 187, -1, 189, -1, 212, -1, - 213, -1, 188, -1, 207, -1, 227, -1, 169, -1, - 161, -1, 162, -1, 163, -1, 164, -1, 165, -1, - 239, -1, 240, -1, 241, -1, 38, -1, 138, 139, - -1, -1, 242, -1, 243, -1, 244, -1, 246, -1, - 245, -1, 44, -1, 141, 142, -1, -1, 247, -1, - 248, -1, 249, -1, 250, -1, 13, 10, -1, 12, - 10, -1, 76, 10, -1, 79, 10, -1, 96, 10, - -1, 14, 10, -1, 16, 10, -1, 67, 10, -1, - 15, 10, -1, 80, 10, -1, 81, 10, -1, 31, - 10, -1, 60, 10, -1, 75, 10, -1, 17, 10, - -1, 18, 10, -1, 19, 10, -1, 20, 10, -1, - 121, 10, -1, 122, 10, -1, 123, 10, -1, 124, - 10, -1, 125, 10, -1, 77, 10, -1, 66, 10, - -1, 101, 10, -1, 120, 10, -1, 21, 10, -1, - 22, 10, -1, 23, 10, -1, 24, 10, -1, 25, - 10, -1, 68, 10, -1, 82, 10, -1, 83, 10, - -1, 109, 10, -1, 54, 10, -1, 64, 10, -1, - 55, 10, -1, 102, 10, -1, 48, 10, -1, 49, - 10, -1, 50, 10, -1, 51, 10, -1, 113, 10, - -1, 117, 10, -1, 114, 10, -1, 61, 10, -1, - 26, 10, -1, 27, 10, -1, 28, 10, -1, 98, + 134, 0, -1, -1, 134, 135, -1, 136, 137, -1, + 139, 140, -1, 142, 143, -1, 265, 266, -1, 255, + 256, -1, 11, -1, 137, 138, -1, -1, 145, -1, + 146, -1, 150, -1, 153, -1, 159, -1, 160, -1, + 161, -1, 162, -1, 151, -1, 172, -1, 173, -1, + 174, -1, 175, -1, 176, -1, 194, -1, 195, -1, + 196, -1, 199, -1, 200, -1, 156, -1, 201, -1, + 202, -1, 205, -1, 203, -1, 204, -1, 206, -1, + 207, -1, 208, -1, 219, -1, 185, -1, 186, -1, + 187, -1, 188, -1, 209, -1, 222, -1, 181, -1, + 183, -1, 223, -1, 228, -1, 229, -1, 230, -1, + 157, -1, 193, -1, 237, -1, 238, -1, 182, -1, + 233, -1, 169, -1, 152, -1, 177, -1, 220, -1, + 226, -1, 210, -1, 221, -1, 240, -1, 241, -1, + 158, -1, 147, -1, 168, -1, 213, -1, 148, -1, + 154, -1, 155, -1, 178, -1, 179, -1, 239, -1, + 212, -1, 214, -1, 215, -1, 149, -1, 242, -1, + 197, -1, 218, -1, 170, -1, 184, -1, 224, -1, + 225, -1, 227, -1, 232, -1, 180, -1, 234, -1, + 235, -1, 236, -1, 189, -1, 192, -1, 216, -1, + 217, -1, 190, -1, 211, -1, 231, -1, 171, -1, + 163, -1, 164, -1, 165, -1, 166, -1, 167, -1, + 243, -1, 244, -1, 245, -1, 191, -1, 198, -1, + 38, -1, 140, 141, -1, -1, 246, -1, 247, -1, + 248, -1, 250, -1, 249, -1, 44, -1, 143, 144, + -1, -1, 251, -1, 252, -1, 253, -1, 254, -1, + 13, 10, -1, 12, 10, -1, 76, 10, -1, 79, + 10, -1, 96, 10, -1, 14, 10, -1, 16, 10, + -1, 67, 10, -1, 15, 10, -1, 80, 10, -1, + 81, 10, -1, 31, 10, -1, 60, 10, -1, 75, + 10, -1, 17, 10, -1, 18, 10, -1, 19, 10, + -1, 20, 10, -1, 122, 10, -1, 123, 10, -1, + 124, 10, -1, 125, 10, -1, 126, 10, -1, 77, + 10, -1, 66, 10, -1, 101, 10, -1, 121, 10, + -1, 21, 10, -1, 22, 10, -1, 23, 10, -1, + 24, 10, -1, 25, 10, -1, 68, 10, -1, 82, + 10, -1, 83, 10, -1, 109, 10, -1, 54, 10, + -1, 64, 10, -1, 55, 10, -1, 102, 10, -1, + 48, 10, -1, 49, 10, -1, 50, 10, -1, 51, + 10, -1, 113, 10, -1, 117, 10, -1, 118, 10, + -1, 114, 10, -1, 61, 10, -1, 26, 10, -1, + 27, 10, -1, 28, 10, -1, 98, 10, -1, 132, 10, -1, 29, 10, -1, 30, 10, -1, 32, 10, -1, 33, 10, -1, 35, 10, -1, 36, 10, -1, 34, 10, -1, 41, 10, -1, 42, 10, -1, 43, - 10, -1, 52, 10, -1, 71, 10, -1, 118, 10, + 10, -1, 52, 10, -1, 71, 10, -1, 119, 10, -1, 85, 10, -1, 78, 10, -1, 86, 10, -1, 87, 10, -1, 115, 10, -1, 116, 10, -1, 100, 10, -1, 47, 10, -1, 69, 10, -1, 72, 10, 10, -1, 53, 10, -1, 56, 10, -1, 105, 10, -1, 106, 10, -1, 70, 10, -1, 107, 10, -1, - 57, 10, -1, 58, 10, -1, 59, 10, -1, 119, + 57, 10, -1, 58, 10, -1, 59, 10, -1, 120, 10, -1, 108, 10, -1, 65, 10, -1, 111, 10, -1, 112, 10, -1, 110, 10, -1, 62, 10, -1, 63, 10, -1, 84, 10, -1, 73, 10, 10, -1, - 74, 10, -1, 97, 10, -1, 128, 10, -1, 129, - 10, -1, 130, 10, -1, 37, 10, -1, 39, 10, - -1, 40, 10, -1, 127, 10, -1, 99, 10, -1, - 37, 10, -1, 45, 10, -1, 46, 10, -1, 126, - 10, -1, 88, -1, 252, 253, -1, -1, 254, -1, - 256, -1, 255, -1, 257, -1, 258, -1, 259, -1, - 260, -1, 89, 10, -1, 91, 10, -1, 90, 10, + 74, 10, -1, 97, 10, -1, 129, 10, -1, 130, + 10, -1, 131, 10, -1, 37, 10, -1, 39, 10, + -1, 40, 10, -1, 128, 10, -1, 99, 10, -1, + 37, 10, -1, 45, 10, -1, 46, 10, -1, 127, + 10, -1, 88, -1, 256, 257, -1, -1, 258, -1, + 260, -1, 259, -1, 261, -1, 262, -1, 263, -1, + 264, -1, 89, 10, -1, 91, 10, -1, 90, 10, -1, 92, 10, -1, 93, 10, -1, 94, 10, -1, - 95, 10, -1, 103, -1, 262, 263, -1, -1, 264, + 95, 10, -1, 103, -1, 266, 267, -1, -1, 268, -1, 104, 10, -1 }; @@ -825,21 +830,21 @@ static const yytype_uint16 yyrline[] = 154, 154, 155, 155, 156, 156, 157, 157, 158, 158, 158, 159, 159, 160, 160, 160, 161, 161, 161, 162, 162, 162, 163, 163, 163, 164, 164, 164, 165, 165, - 165, 167, 179, 180, 181, 181, 181, 181, 181, 183, - 195, 196, 197, 197, 197, 197, 199, 208, 217, 228, - 237, 246, 255, 268, 283, 292, 301, 310, 319, 328, - 337, 346, 355, 364, 373, 382, 391, 398, 405, 414, - 423, 437, 446, 455, 462, 469, 476, 484, 491, 498, - 505, 512, 520, 528, 536, 543, 550, 559, 568, 575, - 582, 590, 598, 611, 622, 630, 643, 652, 661, 669, - 682, 691, 699, 708, 716, 729, 736, 746, 756, 766, - 776, 786, 796, 806, 813, 820, 829, 838, 847, 854, - 864, 878, 885, 903, 916, 929, 938, 947, 956, 966, - 976, 985, 994, 1001, 1010, 1019, 1028, 1036, 1049, 1057, - 1079, 1086, 1101, 1111, 1121, 1128, 1138, 1145, 1152, 1161, - 1171, 1181, 1188, 1195, 1204, 1209, 1210, 1211, 1211, 1211, - 1212, 1212, 1212, 1213, 1215, 1225, 1234, 1241, 1248, 1255, - 1262, 1269, 1274, 1275, 1276, 1278 + 165, 166, 166, 168, 180, 181, 182, 182, 182, 182, + 182, 184, 196, 197, 198, 198, 198, 198, 200, 209, + 218, 229, 238, 247, 256, 269, 284, 293, 302, 311, + 320, 329, 338, 347, 356, 365, 374, 383, 392, 399, + 406, 415, 424, 438, 447, 456, 463, 470, 477, 485, + 492, 499, 506, 513, 521, 529, 537, 544, 551, 560, + 569, 576, 583, 591, 599, 609, 622, 633, 641, 654, + 663, 672, 681, 689, 702, 711, 719, 728, 736, 749, + 756, 766, 776, 786, 796, 806, 816, 826, 833, 840, + 849, 858, 867, 874, 884, 901, 908, 926, 939, 952, + 961, 970, 979, 989, 999, 1008, 1017, 1024, 1033, 1042, + 1051, 1059, 1072, 1080, 1102, 1109, 1124, 1134, 1144, 1151, + 1161, 1168, 1175, 1184, 1194, 1204, 1211, 1218, 1227, 1232, + 1233, 1234, 1234, 1234, 1235, 1235, 1235, 1236, 1238, 1248, + 1257, 1264, 1271, 1278, 1285, 1292, 1297, 1298, 1299, 1301 }; #endif @@ -885,21 +890,22 @@ static const char *const yytname[] = "VAR_VAL_LOG_LEVEL", "VAR_AUTO_TRUST_ANCHOR_FILE", "VAR_KEEP_MISSING", "VAR_ADD_HOLDDOWN", "VAR_DEL_HOLDDOWN", "VAR_SO_RCVBUF", "VAR_EDNS_BUFFER_SIZE", "VAR_PREFETCH", "VAR_PREFETCH_KEY", - "VAR_SO_SNDBUF", "VAR_HARDEN_BELOW_NXDOMAIN", "VAR_IGNORE_CD_FLAG", - "VAR_LOG_QUERIES", "VAR_TCP_UPSTREAM", "VAR_SSL_UPSTREAM", - "VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT", - "VAR_FORWARD_FIRST", "VAR_STUB_FIRST", "VAR_MINIMAL_RESPONSES", - "VAR_RRSET_ROUNDROBIN", "VAR_MAX_UDP_SIZE", "$accept", "toplevelvars", - "toplevelvar", "serverstart", "contents_server", "content_server", - "stubstart", "contents_stub", "content_stub", "forwardstart", - "contents_forward", "content_forward", "server_num_threads", - "server_verbosity", "server_statistics_interval", - "server_statistics_cumulative", "server_extended_statistics", - "server_port", "server_interface", "server_outgoing_interface", - "server_outgoing_range", "server_outgoing_port_permit", - "server_outgoing_port_avoid", "server_outgoing_num_tcp", - "server_incoming_num_tcp", "server_interface_automatic", "server_do_ip4", - "server_do_ip6", "server_do_udp", "server_do_tcp", "server_tcp_upstream", + "VAR_SO_SNDBUF", "VAR_SO_REUSEPORT", "VAR_HARDEN_BELOW_NXDOMAIN", + "VAR_IGNORE_CD_FLAG", "VAR_LOG_QUERIES", "VAR_TCP_UPSTREAM", + "VAR_SSL_UPSTREAM", "VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", + "VAR_SSL_PORT", "VAR_FORWARD_FIRST", "VAR_STUB_FIRST", + "VAR_MINIMAL_RESPONSES", "VAR_RRSET_ROUNDROBIN", "VAR_MAX_UDP_SIZE", + "VAR_DELAY_CLOSE", "$accept", "toplevelvars", "toplevelvar", + "serverstart", "contents_server", "content_server", "stubstart", + "contents_stub", "content_stub", "forwardstart", "contents_forward", + "content_forward", "server_num_threads", "server_verbosity", + "server_statistics_interval", "server_statistics_cumulative", + "server_extended_statistics", "server_port", "server_interface", + "server_outgoing_interface", "server_outgoing_range", + "server_outgoing_port_permit", "server_outgoing_port_avoid", + "server_outgoing_num_tcp", "server_incoming_num_tcp", + "server_interface_automatic", "server_do_ip4", "server_do_ip6", + "server_do_udp", "server_do_tcp", "server_tcp_upstream", "server_ssl_upstream", "server_ssl_service_key", "server_ssl_service_pem", "server_ssl_port", "server_do_daemonize", "server_use_syslog", "server_log_time_ascii", "server_log_queries", @@ -909,10 +915,11 @@ static const char *const yytname[] = "server_trust_anchor_file", "server_trusted_keys_file", "server_trust_anchor", "server_domain_insecure", "server_hide_identity", "server_hide_version", "server_identity", "server_version", - "server_so_rcvbuf", "server_so_sndbuf", "server_edns_buffer_size", - "server_msg_buffer_size", "server_msg_cache_size", - "server_msg_cache_slabs", "server_num_queries_per_thread", - "server_jostle_timeout", "server_rrset_cache_size", + "server_so_rcvbuf", "server_so_sndbuf", "server_so_reuseport", + "server_edns_buffer_size", "server_msg_buffer_size", + "server_msg_cache_size", "server_msg_cache_slabs", + "server_num_queries_per_thread", "server_jostle_timeout", + "server_delay_close", "server_rrset_cache_size", "server_rrset_cache_slabs", "server_infra_host_ttl", "server_infra_lame_ttl", "server_infra_cache_numhosts", "server_infra_cache_lame_size", "server_infra_cache_slabs", @@ -961,26 +968,26 @@ static const yytype_uint16 yytoknum[] = 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385 + 385, 386, 387 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { - 0, 131, 132, 132, 133, 133, 133, 133, 133, 134, - 135, 135, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 137, 138, 138, 139, 139, 139, 139, 139, 140, - 141, 141, 142, 142, 142, 142, 143, 144, 145, 146, + 0, 133, 134, 134, 135, 135, 135, 135, 135, 136, + 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 139, 140, 140, 141, 141, 141, 141, + 141, 142, 143, 143, 144, 144, 144, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, @@ -991,9 +998,9 @@ static const yytype_uint16 yyr1[] = 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 252, 253, 253, 253, - 253, 253, 253, 253, 254, 255, 256, 257, 258, 259, - 260, 261, 262, 262, 263, 264 + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 256, 257, 257, 257, 257, 257, 257, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 266, 267, 268 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1010,8 +1017,8 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, + 1, 1, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1019,21 +1026,21 @@ static const yytype_uint8 yyr2[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, + 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 1, 2, 0, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, - 2, 1, 2, 0, 1, 2 + 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, + 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 0, 1, 2 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_uint16 yydefact[] = { - 2, 0, 1, 9, 111, 119, 234, 251, 3, 11, - 113, 121, 236, 253, 4, 5, 6, 8, 7, 0, + 2, 0, 1, 9, 113, 121, 238, 255, 3, 11, + 115, 123, 240, 257, 4, 5, 6, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1043,52 +1050,52 @@ static const yytype_uint8 yydefact[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 12, - 13, 69, 72, 81, 14, 20, 60, 15, 73, 74, - 31, 53, 68, 16, 17, 18, 19, 103, 104, 105, - 106, 107, 70, 59, 85, 102, 21, 22, 23, 24, - 25, 61, 75, 76, 91, 47, 57, 48, 86, 41, - 42, 43, 44, 95, 99, 96, 54, 26, 27, 28, - 83, 29, 30, 32, 33, 35, 36, 34, 37, 38, - 39, 45, 64, 100, 78, 71, 79, 80, 97, 98, - 84, 40, 62, 65, 46, 49, 87, 88, 63, 89, - 50, 51, 52, 101, 90, 58, 92, 93, 94, 55, - 56, 77, 66, 67, 82, 108, 109, 110, 0, 0, - 0, 0, 0, 112, 114, 115, 116, 118, 117, 0, - 0, 0, 0, 120, 122, 123, 124, 125, 0, 0, - 0, 0, 0, 0, 0, 235, 237, 239, 238, 240, - 241, 242, 243, 0, 252, 254, 127, 126, 131, 134, - 132, 140, 141, 142, 143, 153, 154, 155, 156, 157, - 174, 175, 176, 178, 179, 137, 180, 181, 184, 182, - 183, 185, 186, 187, 198, 166, 167, 168, 169, 188, - 201, 162, 164, 202, 207, 208, 209, 138, 173, 216, - 217, 163, 212, 150, 133, 158, 199, 205, 189, 0, - 0, 220, 139, 128, 149, 192, 129, 135, 136, 159, - 160, 218, 191, 193, 194, 130, 221, 177, 197, 151, - 165, 203, 204, 206, 211, 161, 215, 213, 214, 170, - 172, 195, 196, 171, 190, 210, 152, 144, 145, 146, - 147, 148, 222, 223, 224, 225, 226, 227, 229, 228, - 230, 231, 232, 233, 244, 246, 245, 247, 248, 249, - 250, 255, 200, 219 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 12, 13, 69, 72, 81, 14, 20, 60, 15, + 73, 74, 31, 53, 68, 16, 17, 18, 19, 103, + 104, 105, 106, 107, 70, 59, 85, 102, 21, 22, + 23, 24, 25, 61, 75, 76, 91, 47, 57, 48, + 86, 41, 42, 43, 44, 95, 99, 111, 96, 54, + 26, 27, 28, 83, 112, 29, 30, 32, 33, 35, + 36, 34, 37, 38, 39, 45, 64, 100, 78, 71, + 79, 80, 97, 98, 84, 40, 62, 65, 46, 49, + 87, 88, 63, 89, 50, 51, 52, 101, 90, 58, + 92, 93, 94, 55, 56, 77, 66, 67, 82, 108, + 109, 110, 0, 0, 0, 0, 0, 114, 116, 117, + 118, 120, 119, 0, 0, 0, 0, 122, 124, 125, + 126, 127, 0, 0, 0, 0, 0, 0, 0, 239, + 241, 243, 242, 244, 245, 246, 247, 0, 256, 258, + 129, 128, 133, 136, 134, 142, 143, 144, 145, 155, + 156, 157, 158, 159, 177, 178, 179, 182, 183, 139, + 184, 185, 188, 186, 187, 189, 190, 191, 202, 168, + 169, 170, 171, 192, 205, 164, 166, 206, 211, 212, + 213, 140, 176, 220, 221, 165, 216, 152, 135, 160, + 203, 209, 193, 0, 0, 224, 141, 130, 151, 196, + 131, 137, 138, 161, 162, 222, 195, 197, 198, 132, + 225, 180, 201, 153, 167, 207, 208, 210, 215, 163, + 219, 217, 218, 172, 175, 199, 200, 173, 174, 194, + 214, 154, 146, 147, 148, 149, 150, 226, 227, 228, + 181, 229, 230, 231, 233, 232, 234, 235, 236, 237, + 248, 250, 249, 251, 252, 253, 254, 259, 204, 223 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 1, 8, 9, 14, 118, 10, 15, 223, 11, - 16, 233, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 224, 225, 226, 227, 228, 234, 235, 236, 237, - 12, 17, 245, 246, 247, 248, 249, 250, 251, 252, - 13, 18, 254, 255 + -1, 1, 8, 9, 14, 120, 10, 15, 227, 11, + 16, 237, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 228, 229, 230, 231, 232, 238, 239, + 240, 241, 12, 17, 249, 250, 251, 252, 253, 254, + 255, 256, 13, 18, 258, 259 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -1096,18 +1103,20 @@ static const yytype_int16 yydefgoto[] = #define YYPACT_NINF -80 static const yytype_int16 yypact[] = { - -80, 76, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -12, 40, 46, 32, -79, 16, - 17, 18, 22, 23, 24, 68, 71, 72, 105, 109, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 155, 156, 158, 159, 160, - 161, 163, 164, 165, 166, 167, 168, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, -80, -80, + -80, 115, -80, -80, -80, -80, -80, -80, -80, -80, + -80, -80, -80, -80, -12, 39, 46, 38, -79, 16, + 17, 18, 22, 23, 24, 67, 70, 71, 72, 77, + 106, 111, 112, 113, 114, 124, 125, 126, 127, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 144, 145, 146, 147, 148, 150, 151, + 152, 153, 154, 155, 156, 158, 159, 160, 161, 162, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, + -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, + -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, @@ -1116,24 +1125,22 @@ static const yytype_int16 yypact[] = -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, + -80, -80, 216, 217, 218, 219, 220, -80, -80, -80, + -80, -80, -80, 221, 222, 223, 224, -80, -80, -80, + -80, -80, 225, 226, 227, 228, 229, 230, 231, -80, + -80, -80, -80, -80, -80, -80, -80, 232, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, 211, 212, - 213, 214, 215, -80, -80, -80, -80, -80, -80, 216, - 217, 218, 219, -80, -80, -80, -80, -80, 220, 221, - 222, 223, 224, 225, 226, -80, -80, -80, -80, -80, - -80, -80, -80, 227, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, 228, - 229, -80, -80, -80, -80, -80, -80, -80, -80, -80, + -80, -80, -80, 233, 234, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80 + -80, -80, -80, -80, -80, -80, -80, -80, -80, -80 }; /* YYPGOTO[NTERM-NUM]. */ @@ -1152,7 +1159,7 @@ static const yytype_int8 yypgoto[] = -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80 + -80, -80, -80, -80, -80, -80 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1163,28 +1170,29 @@ static const yytype_uint16 yytable[] = { 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 253, 256, 257, 258, 44, - 45, 46, 259, 260, 261, 47, 48, 49, 50, 51, + 39, 40, 41, 42, 43, 257, 260, 261, 262, 44, + 45, 46, 263, 264, 265, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 2, 218, 262, 219, - 220, 263, 264, 229, 88, 89, 90, 3, 91, 92, - 93, 230, 231, 94, 95, 96, 97, 98, 99, 100, + 82, 83, 84, 85, 86, 87, 222, 266, 223, 224, + 267, 268, 269, 233, 88, 89, 90, 270, 91, 92, + 93, 234, 235, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 4, 265, 115, 116, 117, 266, - 5, 238, 239, 240, 241, 242, 243, 244, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 221, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 6, 302, 303, 222, 304, 305, - 306, 307, 232, 308, 309, 310, 311, 312, 313, 7, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 372, 373 + 111, 112, 113, 114, 115, 2, 271, 116, 117, 118, + 119, 272, 273, 274, 275, 0, 3, 242, 243, 244, + 245, 246, 247, 248, 276, 277, 278, 279, 225, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 4, 294, 295, 296, 297, 298, 5, + 299, 300, 301, 302, 303, 304, 305, 226, 306, 307, + 308, 309, 310, 236, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 339, 6, 340, 341, 342, 343, 344, 345, + 346, 347, 348, 349, 350, 351, 352, 353, 7, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379 }; #define yypact_value_is_default(yystate) \ @@ -1193,7 +1201,7 @@ static const yytype_uint16 yytable[] = #define yytable_value_is_error(yytable_value) \ YYID (0) -static const yytype_uint8 yycheck[] = +static const yytype_int16 yycheck[] = { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -1202,31 +1210,32 @@ static const yytype_uint8 yycheck[] = 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 0, 37, 10, 39, - 40, 10, 10, 37, 96, 97, 98, 11, 100, 101, + 82, 83, 84, 85, 86, 87, 37, 10, 39, 40, + 10, 10, 10, 37, 96, 97, 98, 10, 100, 101, 102, 45, 46, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 38, 10, 128, 129, 130, 10, - 44, 89, 90, 91, 92, 93, 94, 95, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 99, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 88, 10, 10, 127, 10, 10, - 10, 10, 126, 10, 10, 10, 10, 10, 10, 103, + 122, 123, 124, 125, 126, 0, 10, 129, 130, 131, + 132, 10, 10, 10, 10, -1, 11, 89, 90, 91, + 92, 93, 94, 95, 10, 10, 10, 10, 99, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 38, 10, 10, 10, 10, 10, 44, + 10, 10, 10, 10, 10, 10, 10, 128, 10, 10, + 10, 10, 10, 127, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 88, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 103, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 + 10, 10, 10, 10, 10 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { - 0, 132, 0, 11, 38, 44, 88, 103, 133, 134, - 137, 140, 251, 261, 135, 138, 141, 252, 262, 12, + 0, 134, 0, 11, 38, 44, 88, 103, 135, 136, + 139, 142, 255, 265, 137, 140, 143, 256, 266, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 41, 42, 43, 47, 48, 49, @@ -1236,8 +1245,8 @@ static const yytype_uint16 yystos[] = 80, 81, 82, 83, 84, 85, 86, 87, 96, 97, 98, 100, 101, 102, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 128, 129, 130, 136, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 121, 122, 123, 124, 125, 126, 129, 130, 131, 132, + 138, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, @@ -1246,11 +1255,11 @@ static const yytype_uint16 yystos[] = 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 37, 39, - 40, 99, 127, 139, 242, 243, 244, 245, 246, 37, - 45, 46, 126, 142, 247, 248, 249, 250, 89, 90, - 91, 92, 93, 94, 95, 253, 254, 255, 256, 257, - 258, 259, 260, 104, 263, 264, 10, 10, 10, 10, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 37, 39, 40, 99, 128, 141, 246, 247, + 248, 249, 250, 37, 45, 46, 127, 144, 251, 252, + 253, 254, 89, 90, 91, 92, 93, 94, 95, 257, + 258, 259, 260, 261, 262, 263, 264, 104, 267, 268, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, @@ -1262,7 +1271,7 @@ static const yytype_uint16 yystos[] = 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10 + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }; #define yyerrok (yyerrstatus = 0) @@ -2093,9 +2102,9 @@ yyreduce: } break; - case 111: + case 113: /* Line 1787 of yacc.c */ -#line 168 "util/configparser.y" +#line 169 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(stub_zone:)\n")); @@ -2108,9 +2117,9 @@ yyreduce: } break; - case 119: + case 121: /* Line 1787 of yacc.c */ -#line 184 "util/configparser.y" +#line 185 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(forward_zone:)\n")); @@ -2123,9 +2132,9 @@ yyreduce: } break; - case 126: + case 128: /* Line 1787 of yacc.c */ -#line 200 "util/configparser.y" +#line 201 "util/configparser.y" { OUTYY(("P(server_num_threads:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2135,9 +2144,9 @@ yyreduce: } break; - case 127: + case 129: /* Line 1787 of yacc.c */ -#line 209 "util/configparser.y" +#line 210 "util/configparser.y" { OUTYY(("P(server_verbosity:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2147,9 +2156,9 @@ yyreduce: } break; - case 128: + case 130: /* Line 1787 of yacc.c */ -#line 218 "util/configparser.y" +#line 219 "util/configparser.y" { OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "") == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) @@ -2161,9 +2170,9 @@ yyreduce: } break; - case 129: + case 131: /* Line 1787 of yacc.c */ -#line 229 "util/configparser.y" +#line 230 "util/configparser.y" { OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2173,9 +2182,9 @@ yyreduce: } break; - case 130: + case 132: /* Line 1787 of yacc.c */ -#line 238 "util/configparser.y" +#line 239 "util/configparser.y" { OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2185,9 +2194,9 @@ yyreduce: } break; - case 131: + case 133: /* Line 1787 of yacc.c */ -#line 247 "util/configparser.y" +#line 248 "util/configparser.y" { OUTYY(("P(server_port:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2197,9 +2206,9 @@ yyreduce: } break; - case 132: + case 134: /* Line 1787 of yacc.c */ -#line 256 "util/configparser.y" +#line 257 "util/configparser.y" { OUTYY(("P(server_interface:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->num_ifs == 0) @@ -2213,9 +2222,9 @@ yyreduce: } break; - case 133: + case 135: /* Line 1787 of yacc.c */ -#line 269 "util/configparser.y" +#line 270 "util/configparser.y" { OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->num_out_ifs == 0) @@ -2231,9 +2240,9 @@ yyreduce: } break; - case 134: + case 136: /* Line 1787 of yacc.c */ -#line 284 "util/configparser.y" +#line 285 "util/configparser.y" { OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2243,9 +2252,9 @@ yyreduce: } break; - case 135: + case 137: /* Line 1787 of yacc.c */ -#line 293 "util/configparser.y" +#line 294 "util/configparser.y" { OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 1, @@ -2255,9 +2264,9 @@ yyreduce: } break; - case 136: + case 138: /* Line 1787 of yacc.c */ -#line 302 "util/configparser.y" +#line 303 "util/configparser.y" { OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 0, @@ -2267,9 +2276,9 @@ yyreduce: } break; - case 137: + case 139: /* Line 1787 of yacc.c */ -#line 311 "util/configparser.y" +#line 312 "util/configparser.y" { OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2279,9 +2288,9 @@ yyreduce: } break; - case 138: + case 140: /* Line 1787 of yacc.c */ -#line 320 "util/configparser.y" +#line 321 "util/configparser.y" { OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2291,9 +2300,9 @@ yyreduce: } break; - case 139: + case 141: /* Line 1787 of yacc.c */ -#line 329 "util/configparser.y" +#line 330 "util/configparser.y" { OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2303,9 +2312,9 @@ yyreduce: } break; - case 140: + case 142: /* Line 1787 of yacc.c */ -#line 338 "util/configparser.y" +#line 339 "util/configparser.y" { OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2315,9 +2324,9 @@ yyreduce: } break; - case 141: + case 143: /* Line 1787 of yacc.c */ -#line 347 "util/configparser.y" +#line 348 "util/configparser.y" { OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2327,9 +2336,9 @@ yyreduce: } break; - case 142: + case 144: /* Line 1787 of yacc.c */ -#line 356 "util/configparser.y" +#line 357 "util/configparser.y" { OUTYY(("P(server_do_udp:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2339,9 +2348,9 @@ yyreduce: } break; - case 143: + case 145: /* Line 1787 of yacc.c */ -#line 365 "util/configparser.y" +#line 366 "util/configparser.y" { OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2351,9 +2360,9 @@ yyreduce: } break; - case 144: + case 146: /* Line 1787 of yacc.c */ -#line 374 "util/configparser.y" +#line 375 "util/configparser.y" { OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2363,9 +2372,9 @@ yyreduce: } break; - case 145: + case 147: /* Line 1787 of yacc.c */ -#line 383 "util/configparser.y" +#line 384 "util/configparser.y" { OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2375,9 +2384,9 @@ yyreduce: } break; - case 146: + case 148: /* Line 1787 of yacc.c */ -#line 392 "util/configparser.y" +#line 393 "util/configparser.y" { OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->ssl_service_key); @@ -2385,9 +2394,9 @@ yyreduce: } break; - case 147: + case 149: /* Line 1787 of yacc.c */ -#line 399 "util/configparser.y" +#line 400 "util/configparser.y" { OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->ssl_service_pem); @@ -2395,9 +2404,9 @@ yyreduce: } break; - case 148: + case 150: /* Line 1787 of yacc.c */ -#line 406 "util/configparser.y" +#line 407 "util/configparser.y" { OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2407,9 +2416,9 @@ yyreduce: } break; - case 149: + case 151: /* Line 1787 of yacc.c */ -#line 415 "util/configparser.y" +#line 416 "util/configparser.y" { OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2419,9 +2428,9 @@ yyreduce: } break; - case 150: + case 152: /* Line 1787 of yacc.c */ -#line 424 "util/configparser.y" +#line 425 "util/configparser.y" { OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2436,9 +2445,9 @@ yyreduce: } break; - case 151: + case 153: /* Line 1787 of yacc.c */ -#line 438 "util/configparser.y" +#line 439 "util/configparser.y" { OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2448,9 +2457,9 @@ yyreduce: } break; - case 152: + case 154: /* Line 1787 of yacc.c */ -#line 447 "util/configparser.y" +#line 448 "util/configparser.y" { OUTYY(("P(server_log_queries:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2460,9 +2469,9 @@ yyreduce: } break; - case 153: + case 155: /* Line 1787 of yacc.c */ -#line 456 "util/configparser.y" +#line 457 "util/configparser.y" { OUTYY(("P(server_chroot:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->chrootdir); @@ -2470,9 +2479,9 @@ yyreduce: } break; - case 154: + case 156: /* Line 1787 of yacc.c */ -#line 463 "util/configparser.y" +#line 464 "util/configparser.y" { OUTYY(("P(server_username:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->username); @@ -2480,9 +2489,9 @@ yyreduce: } break; - case 155: + case 157: /* Line 1787 of yacc.c */ -#line 470 "util/configparser.y" +#line 471 "util/configparser.y" { OUTYY(("P(server_directory:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->directory); @@ -2490,9 +2499,9 @@ yyreduce: } break; - case 156: + case 158: /* Line 1787 of yacc.c */ -#line 477 "util/configparser.y" +#line 478 "util/configparser.y" { OUTYY(("P(server_logfile:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->logfile); @@ -2501,9 +2510,9 @@ yyreduce: } break; - case 157: + case 159: /* Line 1787 of yacc.c */ -#line 485 "util/configparser.y" +#line 486 "util/configparser.y" { OUTYY(("P(server_pidfile:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->pidfile); @@ -2511,9 +2520,9 @@ yyreduce: } break; - case 158: + case 160: /* Line 1787 of yacc.c */ -#line 492 "util/configparser.y" +#line 493 "util/configparser.y" { OUTYY(("P(server_root_hints:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[(2) - (2)].str))) @@ -2521,9 +2530,9 @@ yyreduce: } break; - case 159: + case 161: /* Line 1787 of yacc.c */ -#line 499 "util/configparser.y" +#line 500 "util/configparser.y" { OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->dlv_anchor_file); @@ -2531,9 +2540,9 @@ yyreduce: } break; - case 160: + case 162: /* Line 1787 of yacc.c */ -#line 506 "util/configparser.y" +#line 507 "util/configparser.y" { OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[(2) - (2)].str))) @@ -2541,9 +2550,9 @@ yyreduce: } break; - case 161: + case 163: /* Line 1787 of yacc.c */ -#line 513 "util/configparser.y" +#line 514 "util/configparser.y" { OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -2552,9 +2561,9 @@ yyreduce: } break; - case 162: + case 164: /* Line 1787 of yacc.c */ -#line 521 "util/configparser.y" +#line 522 "util/configparser.y" { OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -2563,9 +2572,9 @@ yyreduce: } break; - case 163: + case 165: /* Line 1787 of yacc.c */ -#line 529 "util/configparser.y" +#line 530 "util/configparser.y" { OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -2574,9 +2583,9 @@ yyreduce: } break; - case 164: + case 166: /* Line 1787 of yacc.c */ -#line 537 "util/configparser.y" +#line 538 "util/configparser.y" { OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[(2) - (2)].str))) @@ -2584,9 +2593,9 @@ yyreduce: } break; - case 165: + case 167: /* Line 1787 of yacc.c */ -#line 544 "util/configparser.y" +#line 545 "util/configparser.y" { OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[(2) - (2)].str))) @@ -2594,9 +2603,9 @@ yyreduce: } break; - case 166: + case 168: /* Line 1787 of yacc.c */ -#line 551 "util/configparser.y" +#line 552 "util/configparser.y" { OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2606,9 +2615,9 @@ yyreduce: } break; - case 167: + case 169: /* Line 1787 of yacc.c */ -#line 560 "util/configparser.y" +#line 561 "util/configparser.y" { OUTYY(("P(server_hide_version:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2618,9 +2627,9 @@ yyreduce: } break; - case 168: + case 170: /* Line 1787 of yacc.c */ -#line 569 "util/configparser.y" +#line 570 "util/configparser.y" { OUTYY(("P(server_identity:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->identity); @@ -2628,9 +2637,9 @@ yyreduce: } break; - case 169: + case 171: /* Line 1787 of yacc.c */ -#line 576 "util/configparser.y" +#line 577 "util/configparser.y" { OUTYY(("P(server_version:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->version); @@ -2638,9 +2647,9 @@ yyreduce: } break; - case 170: + case 172: /* Line 1787 of yacc.c */ -#line 583 "util/configparser.y" +#line 584 "util/configparser.y" { OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_rcvbuf)) @@ -2649,9 +2658,9 @@ yyreduce: } break; - case 171: + case 173: /* Line 1787 of yacc.c */ -#line 591 "util/configparser.y" +#line 592 "util/configparser.y" { OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_sndbuf)) @@ -2660,9 +2669,22 @@ yyreduce: } break; - case 172: + case 174: +/* Line 1787 of yacc.c */ +#line 600 "util/configparser.y" + { + OUTYY(("P(server_so_reuseport:%s)\n", (yyvsp[(2) - (2)].str))); + if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->cfg->so_reuseport = + (strcmp((yyvsp[(2) - (2)].str), "yes")==0); + free((yyvsp[(2) - (2)].str)); + } + break; + + case 175: /* Line 1787 of yacc.c */ -#line 599 "util/configparser.y" +#line 610 "util/configparser.y" { OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2676,9 +2698,9 @@ yyreduce: } break; - case 173: + case 176: /* Line 1787 of yacc.c */ -#line 612 "util/configparser.y" +#line 623 "util/configparser.y" { OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2690,9 +2712,9 @@ yyreduce: } break; - case 174: + case 177: /* Line 1787 of yacc.c */ -#line 623 "util/configparser.y" +#line 634 "util/configparser.y" { OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->msg_cache_size)) @@ -2701,9 +2723,9 @@ yyreduce: } break; - case 175: + case 178: /* Line 1787 of yacc.c */ -#line 631 "util/configparser.y" +#line 642 "util/configparser.y" { OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2717,9 +2739,9 @@ yyreduce: } break; - case 176: + case 179: /* Line 1787 of yacc.c */ -#line 644 "util/configparser.y" +#line 655 "util/configparser.y" { OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2729,9 +2751,9 @@ yyreduce: } break; - case 177: + case 180: /* Line 1787 of yacc.c */ -#line 653 "util/configparser.y" +#line 664 "util/configparser.y" { OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2741,9 +2763,21 @@ yyreduce: } break; - case 178: + case 181: +/* Line 1787 of yacc.c */ +#line 673 "util/configparser.y" + { + OUTYY(("P(server_delay_close:%s)\n", (yyvsp[(2) - (2)].str))); + if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) + yyerror("number expected"); + else cfg_parser->cfg->delay_close = atoi((yyvsp[(2) - (2)].str)); + free((yyvsp[(2) - (2)].str)); + } + break; + + case 182: /* Line 1787 of yacc.c */ -#line 662 "util/configparser.y" +#line 682 "util/configparser.y" { OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->rrset_cache_size)) @@ -2752,9 +2786,9 @@ yyreduce: } break; - case 179: + case 183: /* Line 1787 of yacc.c */ -#line 670 "util/configparser.y" +#line 690 "util/configparser.y" { OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2768,9 +2802,9 @@ yyreduce: } break; - case 180: + case 184: /* Line 1787 of yacc.c */ -#line 683 "util/configparser.y" +#line 703 "util/configparser.y" { OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2780,9 +2814,9 @@ yyreduce: } break; - case 181: + case 185: /* Line 1787 of yacc.c */ -#line 692 "util/configparser.y" +#line 712 "util/configparser.y" { OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[(2) - (2)].str))); verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option " @@ -2791,9 +2825,9 @@ yyreduce: } break; - case 182: + case 186: /* Line 1787 of yacc.c */ -#line 700 "util/configparser.y" +#line 720 "util/configparser.y" { OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2803,9 +2837,9 @@ yyreduce: } break; - case 183: + case 187: /* Line 1787 of yacc.c */ -#line 709 "util/configparser.y" +#line 729 "util/configparser.y" { OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[(2) - (2)].str))); verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s " @@ -2814,9 +2848,9 @@ yyreduce: } break; - case 184: + case 188: /* Line 1787 of yacc.c */ -#line 717 "util/configparser.y" +#line 737 "util/configparser.y" { OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2830,9 +2864,9 @@ yyreduce: } break; - case 185: + case 189: /* Line 1787 of yacc.c */ -#line 730 "util/configparser.y" +#line 750 "util/configparser.y" { OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->target_fetch_policy); @@ -2840,9 +2874,9 @@ yyreduce: } break; - case 186: + case 190: /* Line 1787 of yacc.c */ -#line 737 "util/configparser.y" +#line 757 "util/configparser.y" { OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2853,9 +2887,9 @@ yyreduce: } break; - case 187: + case 191: /* Line 1787 of yacc.c */ -#line 747 "util/configparser.y" +#line 767 "util/configparser.y" { OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2866,9 +2900,9 @@ yyreduce: } break; - case 188: + case 192: /* Line 1787 of yacc.c */ -#line 757 "util/configparser.y" +#line 777 "util/configparser.y" { OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2879,9 +2913,9 @@ yyreduce: } break; - case 189: + case 193: /* Line 1787 of yacc.c */ -#line 767 "util/configparser.y" +#line 787 "util/configparser.y" { OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2892,9 +2926,9 @@ yyreduce: } break; - case 190: + case 194: /* Line 1787 of yacc.c */ -#line 777 "util/configparser.y" +#line 797 "util/configparser.y" { OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2905,9 +2939,9 @@ yyreduce: } break; - case 191: + case 195: /* Line 1787 of yacc.c */ -#line 787 "util/configparser.y" +#line 807 "util/configparser.y" { OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2918,9 +2952,9 @@ yyreduce: } break; - case 192: + case 196: /* Line 1787 of yacc.c */ -#line 797 "util/configparser.y" +#line 817 "util/configparser.y" { OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2931,9 +2965,9 @@ yyreduce: } break; - case 193: + case 197: /* Line 1787 of yacc.c */ -#line 807 "util/configparser.y" +#line 827 "util/configparser.y" { OUTYY(("P(server_private_address:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[(2) - (2)].str))) @@ -2941,9 +2975,9 @@ yyreduce: } break; - case 194: + case 198: /* Line 1787 of yacc.c */ -#line 814 "util/configparser.y" +#line 834 "util/configparser.y" { OUTYY(("P(server_private_domain:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[(2) - (2)].str))) @@ -2951,9 +2985,9 @@ yyreduce: } break; - case 195: + case 199: /* Line 1787 of yacc.c */ -#line 821 "util/configparser.y" +#line 841 "util/configparser.y" { OUTYY(("P(server_prefetch:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2963,9 +2997,9 @@ yyreduce: } break; - case 196: + case 200: /* Line 1787 of yacc.c */ -#line 830 "util/configparser.y" +#line 850 "util/configparser.y" { OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2975,9 +3009,9 @@ yyreduce: } break; - case 197: + case 201: /* Line 1787 of yacc.c */ -#line 839 "util/configparser.y" +#line 859 "util/configparser.y" { OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2987,9 +3021,9 @@ yyreduce: } break; - case 198: + case 202: /* Line 1787 of yacc.c */ -#line 848 "util/configparser.y" +#line 868 "util/configparser.y" { OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[(2) - (2)].str))) @@ -2997,9 +3031,9 @@ yyreduce: } break; - case 199: + case 203: /* Line 1787 of yacc.c */ -#line 855 "util/configparser.y" +#line 875 "util/configparser.y" { OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3010,15 +3044,18 @@ yyreduce: } break; - case 200: + case 204: /* Line 1787 of yacc.c */ -#line 865 "util/configparser.y" +#line 885 "util/configparser.y" { OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str))); if(strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && strcmp((yyvsp[(3) - (3)].str), "refuse")!=0 && + strcmp((yyvsp[(3) - (3)].str), "deny_non_local")!=0 && + strcmp((yyvsp[(3) - (3)].str), "refuse_non_local")!=0 && strcmp((yyvsp[(3) - (3)].str), "allow")!=0 && strcmp((yyvsp[(3) - (3)].str), "allow_snoop")!=0) { - yyerror("expected deny, refuse, allow or allow_snoop " + yyerror("expected deny, refuse, deny_non_local, " + "refuse_non_local, allow or allow_snoop " "in access control action"); } else { if(!cfg_str2list_insert(&cfg_parser->cfg->acls, (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str))) @@ -3027,9 +3064,9 @@ yyreduce: } break; - case 201: + case 205: /* Line 1787 of yacc.c */ -#line 879 "util/configparser.y" +#line 902 "util/configparser.y" { OUTYY(("P(server_module_conf:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->module_conf); @@ -3037,9 +3074,9 @@ yyreduce: } break; - case 202: + case 206: /* Line 1787 of yacc.c */ -#line 886 "util/configparser.y" +#line 909 "util/configparser.y" { OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[(2) - (2)].str))); if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) { @@ -3058,9 +3095,9 @@ yyreduce: } break; - case 203: + case 207: /* Line 1787 of yacc.c */ -#line 904 "util/configparser.y" +#line 927 "util/configparser.y" { OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[(2) - (2)].str))); if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) { @@ -3074,9 +3111,9 @@ yyreduce: } break; - case 204: + case 208: /* Line 1787 of yacc.c */ -#line 917 "util/configparser.y" +#line 940 "util/configparser.y" { OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[(2) - (2)].str))); if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) { @@ -3090,9 +3127,9 @@ yyreduce: } break; - case 205: + case 209: /* Line 1787 of yacc.c */ -#line 930 "util/configparser.y" +#line 953 "util/configparser.y" { OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3102,9 +3139,9 @@ yyreduce: } break; - case 206: + case 210: /* Line 1787 of yacc.c */ -#line 939 "util/configparser.y" +#line 962 "util/configparser.y" { OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3114,9 +3151,9 @@ yyreduce: } break; - case 207: + case 211: /* Line 1787 of yacc.c */ -#line 948 "util/configparser.y" +#line 971 "util/configparser.y" { OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3126,9 +3163,9 @@ yyreduce: } break; - case 208: + case 212: /* Line 1787 of yacc.c */ -#line 957 "util/configparser.y" +#line 980 "util/configparser.y" { OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3139,9 +3176,9 @@ yyreduce: } break; - case 209: + case 213: /* Line 1787 of yacc.c */ -#line 967 "util/configparser.y" +#line 990 "util/configparser.y" { OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3152,9 +3189,9 @@ yyreduce: } break; - case 210: + case 214: /* Line 1787 of yacc.c */ -#line 977 "util/configparser.y" +#line 1000 "util/configparser.y" { OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3164,9 +3201,9 @@ yyreduce: } break; - case 211: + case 215: /* Line 1787 of yacc.c */ -#line 986 "util/configparser.y" +#line 1009 "util/configparser.y" { OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3176,9 +3213,9 @@ yyreduce: } break; - case 212: + case 216: /* Line 1787 of yacc.c */ -#line 995 "util/configparser.y" +#line 1018 "util/configparser.y" { OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->val_nsec3_key_iterations); @@ -3186,9 +3223,9 @@ yyreduce: } break; - case 213: + case 217: /* Line 1787 of yacc.c */ -#line 1002 "util/configparser.y" +#line 1025 "util/configparser.y" { OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3198,9 +3235,9 @@ yyreduce: } break; - case 214: + case 218: /* Line 1787 of yacc.c */ -#line 1011 "util/configparser.y" +#line 1034 "util/configparser.y" { OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3210,9 +3247,9 @@ yyreduce: } break; - case 215: + case 219: /* Line 1787 of yacc.c */ -#line 1020 "util/configparser.y" +#line 1043 "util/configparser.y" { OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -3222,9 +3259,9 @@ yyreduce: } break; - case 216: + case 220: /* Line 1787 of yacc.c */ -#line 1029 "util/configparser.y" +#line 1052 "util/configparser.y" { OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->key_cache_size)) @@ -3233,9 +3270,9 @@ yyreduce: } break; - case 217: + case 221: /* Line 1787 of yacc.c */ -#line 1037 "util/configparser.y" +#line 1060 "util/configparser.y" { OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -3249,9 +3286,9 @@ yyreduce: } break; - case 218: + case 222: /* Line 1787 of yacc.c */ -#line 1050 "util/configparser.y" +#line 1073 "util/configparser.y" { OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->neg_cache_size)) @@ -3260,9 +3297,9 @@ yyreduce: } break; - case 219: + case 223: /* Line 1787 of yacc.c */ -#line 1058 "util/configparser.y" +#line 1081 "util/configparser.y" { OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str))); if(strcmp((yyvsp[(3) - (3)].str), "static")!=0 && strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && @@ -3285,9 +3322,9 @@ yyreduce: } break; - case 220: + case 224: /* Line 1787 of yacc.c */ -#line 1080 "util/configparser.y" +#line 1103 "util/configparser.y" { OUTYY(("P(server_local_data:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[(2) - (2)].str))) @@ -3295,9 +3332,9 @@ yyreduce: } break; - case 221: + case 225: /* Line 1787 of yacc.c */ -#line 1087 "util/configparser.y" +#line 1110 "util/configparser.y" { char* ptr; OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[(2) - (2)].str))); @@ -3313,9 +3350,9 @@ yyreduce: } break; - case 222: + case 226: /* Line 1787 of yacc.c */ -#line 1102 "util/configparser.y" +#line 1125 "util/configparser.y" { OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3326,9 +3363,9 @@ yyreduce: } break; - case 223: + case 227: /* Line 1787 of yacc.c */ -#line 1112 "util/configparser.y" +#line 1135 "util/configparser.y" { OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3339,9 +3376,9 @@ yyreduce: } break; - case 224: + case 228: /* Line 1787 of yacc.c */ -#line 1122 "util/configparser.y" +#line 1145 "util/configparser.y" { OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[(2) - (2)].str))); cfg_parser->cfg->max_udp_size = atoi((yyvsp[(2) - (2)].str)); @@ -3349,9 +3386,9 @@ yyreduce: } break; - case 225: + case 229: /* Line 1787 of yacc.c */ -#line 1129 "util/configparser.y" +#line 1152 "util/configparser.y" { OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->stubs->name) @@ -3362,9 +3399,9 @@ yyreduce: } break; - case 226: + case 230: /* Line 1787 of yacc.c */ -#line 1139 "util/configparser.y" +#line 1162 "util/configparser.y" { OUTYY(("P(stub-host:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[(2) - (2)].str))) @@ -3372,9 +3409,9 @@ yyreduce: } break; - case 227: + case 231: /* Line 1787 of yacc.c */ -#line 1146 "util/configparser.y" +#line 1169 "util/configparser.y" { OUTYY(("P(stub-addr:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[(2) - (2)].str))) @@ -3382,9 +3419,9 @@ yyreduce: } break; - case 228: + case 232: /* Line 1787 of yacc.c */ -#line 1153 "util/configparser.y" +#line 1176 "util/configparser.y" { OUTYY(("P(stub-first:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3394,9 +3431,9 @@ yyreduce: } break; - case 229: + case 233: /* Line 1787 of yacc.c */ -#line 1162 "util/configparser.y" +#line 1185 "util/configparser.y" { OUTYY(("P(stub-prime:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3407,9 +3444,9 @@ yyreduce: } break; - case 230: + case 234: /* Line 1787 of yacc.c */ -#line 1172 "util/configparser.y" +#line 1195 "util/configparser.y" { OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->forwards->name) @@ -3420,9 +3457,9 @@ yyreduce: } break; - case 231: + case 235: /* Line 1787 of yacc.c */ -#line 1182 "util/configparser.y" +#line 1205 "util/configparser.y" { OUTYY(("P(forward-host:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[(2) - (2)].str))) @@ -3430,9 +3467,9 @@ yyreduce: } break; - case 232: + case 236: /* Line 1787 of yacc.c */ -#line 1189 "util/configparser.y" +#line 1212 "util/configparser.y" { OUTYY(("P(forward-addr:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[(2) - (2)].str))) @@ -3440,9 +3477,9 @@ yyreduce: } break; - case 233: + case 237: /* Line 1787 of yacc.c */ -#line 1196 "util/configparser.y" +#line 1219 "util/configparser.y" { OUTYY(("P(forward-first:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3452,17 +3489,17 @@ yyreduce: } break; - case 234: + case 238: /* Line 1787 of yacc.c */ -#line 1205 "util/configparser.y" +#line 1228 "util/configparser.y" { OUTYY(("\nP(remote-control:)\n")); } break; - case 244: + case 248: /* Line 1787 of yacc.c */ -#line 1216 "util/configparser.y" +#line 1239 "util/configparser.y" { OUTYY(("P(control_enable:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -3473,9 +3510,9 @@ yyreduce: } break; - case 245: + case 249: /* Line 1787 of yacc.c */ -#line 1226 "util/configparser.y" +#line 1249 "util/configparser.y" { OUTYY(("P(control_port:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -3485,9 +3522,9 @@ yyreduce: } break; - case 246: + case 250: /* Line 1787 of yacc.c */ -#line 1235 "util/configparser.y" +#line 1258 "util/configparser.y" { OUTYY(("P(control_interface:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[(2) - (2)].str))) @@ -3495,9 +3532,9 @@ yyreduce: } break; - case 247: + case 251: /* Line 1787 of yacc.c */ -#line 1242 "util/configparser.y" +#line 1265 "util/configparser.y" { OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->server_key_file); @@ -3505,9 +3542,9 @@ yyreduce: } break; - case 248: + case 252: /* Line 1787 of yacc.c */ -#line 1249 "util/configparser.y" +#line 1272 "util/configparser.y" { OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->server_cert_file); @@ -3515,9 +3552,9 @@ yyreduce: } break; - case 249: + case 253: /* Line 1787 of yacc.c */ -#line 1256 "util/configparser.y" +#line 1279 "util/configparser.y" { OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->control_key_file); @@ -3525,9 +3562,9 @@ yyreduce: } break; - case 250: + case 254: /* Line 1787 of yacc.c */ -#line 1263 "util/configparser.y" +#line 1286 "util/configparser.y" { OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->control_cert_file); @@ -3535,17 +3572,17 @@ yyreduce: } break; - case 251: + case 255: /* Line 1787 of yacc.c */ -#line 1270 "util/configparser.y" +#line 1293 "util/configparser.y" { OUTYY(("\nP(python:)\n")); } break; - case 255: + case 259: /* Line 1787 of yacc.c */ -#line 1279 "util/configparser.y" +#line 1302 "util/configparser.y" { OUTYY(("P(python-script:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->python_script); @@ -3555,7 +3592,7 @@ yyreduce: /* Line 1787 of yacc.c */ -#line 3559 "util/configparser.c" +#line 3596 "util/configparser.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3785,7 +3822,7 @@ yyreturn: /* Line 2048 of yacc.c */ -#line 1284 "util/configparser.y" +#line 1307 "util/configparser.y" /* parse helper routines could be here */ diff --git a/util/configparser.h b/util/configparser.h index b59fe311edbc..3a7f74ea4e99 100644 --- a/util/configparser.h +++ b/util/configparser.h @@ -161,19 +161,21 @@ extern int yydebug; VAR_PREFETCH = 370, VAR_PREFETCH_KEY = 371, VAR_SO_SNDBUF = 372, - VAR_HARDEN_BELOW_NXDOMAIN = 373, - VAR_IGNORE_CD_FLAG = 374, - VAR_LOG_QUERIES = 375, - VAR_TCP_UPSTREAM = 376, - VAR_SSL_UPSTREAM = 377, - VAR_SSL_SERVICE_KEY = 378, - VAR_SSL_SERVICE_PEM = 379, - VAR_SSL_PORT = 380, - VAR_FORWARD_FIRST = 381, - VAR_STUB_FIRST = 382, - VAR_MINIMAL_RESPONSES = 383, - VAR_RRSET_ROUNDROBIN = 384, - VAR_MAX_UDP_SIZE = 385 + VAR_SO_REUSEPORT = 373, + VAR_HARDEN_BELOW_NXDOMAIN = 374, + VAR_IGNORE_CD_FLAG = 375, + VAR_LOG_QUERIES = 376, + VAR_TCP_UPSTREAM = 377, + VAR_SSL_UPSTREAM = 378, + VAR_SSL_SERVICE_KEY = 379, + VAR_SSL_SERVICE_PEM = 380, + VAR_SSL_PORT = 381, + VAR_FORWARD_FIRST = 382, + VAR_STUB_FIRST = 383, + VAR_MINIMAL_RESPONSES = 384, + VAR_RRSET_ROUNDROBIN = 385, + VAR_MAX_UDP_SIZE = 386, + VAR_DELAY_CLOSE = 387 }; #endif /* Tokens. */ @@ -292,19 +294,21 @@ extern int yydebug; #define VAR_PREFETCH 370 #define VAR_PREFETCH_KEY 371 #define VAR_SO_SNDBUF 372 -#define VAR_HARDEN_BELOW_NXDOMAIN 373 -#define VAR_IGNORE_CD_FLAG 374 -#define VAR_LOG_QUERIES 375 -#define VAR_TCP_UPSTREAM 376 -#define VAR_SSL_UPSTREAM 377 -#define VAR_SSL_SERVICE_KEY 378 -#define VAR_SSL_SERVICE_PEM 379 -#define VAR_SSL_PORT 380 -#define VAR_FORWARD_FIRST 381 -#define VAR_STUB_FIRST 382 -#define VAR_MINIMAL_RESPONSES 383 -#define VAR_RRSET_ROUNDROBIN 384 -#define VAR_MAX_UDP_SIZE 385 +#define VAR_SO_REUSEPORT 373 +#define VAR_HARDEN_BELOW_NXDOMAIN 374 +#define VAR_IGNORE_CD_FLAG 375 +#define VAR_LOG_QUERIES 376 +#define VAR_TCP_UPSTREAM 377 +#define VAR_SSL_UPSTREAM 378 +#define VAR_SSL_SERVICE_KEY 379 +#define VAR_SSL_SERVICE_PEM 380 +#define VAR_SSL_PORT 381 +#define VAR_FORWARD_FIRST 382 +#define VAR_STUB_FIRST 383 +#define VAR_MINIMAL_RESPONSES 384 +#define VAR_RRSET_ROUNDROBIN 385 +#define VAR_MAX_UDP_SIZE 386 +#define VAR_DELAY_CLOSE 387 @@ -318,7 +322,7 @@ typedef union YYSTYPE /* Line 2049 of yacc.c */ -#line 322 "util/configparser.h" +#line 326 "util/configparser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/util/configparser.y b/util/configparser.y index 4a0cc1697a7d..74b5b79ee83a 100644 --- a/util/configparser.y +++ b/util/configparser.y @@ -23,16 +23,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ %{ @@ -101,11 +101,11 @@ extern struct config_parser_state* cfg_parser; %token VAR_VAL_SIG_SKEW_MAX VAR_CACHE_MIN_TTL VAR_VAL_LOG_LEVEL %token VAR_AUTO_TRUST_ANCHOR_FILE VAR_KEEP_MISSING VAR_ADD_HOLDDOWN %token VAR_DEL_HOLDDOWN VAR_SO_RCVBUF VAR_EDNS_BUFFER_SIZE VAR_PREFETCH -%token VAR_PREFETCH_KEY VAR_SO_SNDBUF VAR_HARDEN_BELOW_NXDOMAIN +%token VAR_PREFETCH_KEY VAR_SO_SNDBUF VAR_SO_REUSEPORT VAR_HARDEN_BELOW_NXDOMAIN %token VAR_IGNORE_CD_FLAG VAR_LOG_QUERIES VAR_TCP_UPSTREAM VAR_SSL_UPSTREAM %token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT VAR_FORWARD_FIRST %token VAR_STUB_FIRST VAR_MINIMAL_RESPONSES VAR_RRSET_ROUNDROBIN -%token VAR_MAX_UDP_SIZE +%token VAR_MAX_UDP_SIZE VAR_DELAY_CLOSE %% toplevelvars: /* empty */ | toplevelvars toplevelvar ; @@ -162,7 +162,8 @@ content_server: server_num_threads | server_verbosity | server_port | server_so_sndbuf | server_harden_below_nxdomain | server_ignore_cd_flag | server_log_queries | server_tcp_upstream | server_ssl_upstream | server_ssl_service_key | server_ssl_service_pem | server_ssl_port | - server_minimal_responses | server_rrset_roundrobin | server_max_udp_size + server_minimal_responses | server_rrset_roundrobin | server_max_udp_size | + server_so_reuseport | server_delay_close ; stubstart: VAR_STUB_ZONE { @@ -595,6 +596,16 @@ server_so_sndbuf: VAR_SO_SNDBUF STRING_ARG free($2); } ; +server_so_reuseport: VAR_SO_REUSEPORT STRING_ARG + { + OUTYY(("P(server_so_reuseport:%s)\n", $2)); + if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->cfg->so_reuseport = + (strcmp($2, "yes")==0); + free($2); + } + ; server_edns_buffer_size: VAR_EDNS_BUFFER_SIZE STRING_ARG { OUTYY(("P(server_edns_buffer_size:%s)\n", $2)); @@ -658,6 +669,15 @@ server_jostle_timeout: VAR_JOSTLE_TIMEOUT STRING_ARG free($2); } ; +server_delay_close: VAR_DELAY_CLOSE STRING_ARG + { + OUTYY(("P(server_delay_close:%s)\n", $2)); + if(atoi($2) == 0 && strcmp($2, "0") != 0) + yyerror("number expected"); + else cfg_parser->cfg->delay_close = atoi($2); + free($2); + } + ; server_rrset_cache_size: VAR_RRSET_CACHE_SIZE STRING_ARG { OUTYY(("P(server_rrset_cache_size:%s)\n", $2)); @@ -865,9 +885,12 @@ server_access_control: VAR_ACCESS_CONTROL STRING_ARG STRING_ARG { OUTYY(("P(server_access_control:%s %s)\n", $2, $3)); if(strcmp($3, "deny")!=0 && strcmp($3, "refuse")!=0 && + strcmp($3, "deny_non_local")!=0 && + strcmp($3, "refuse_non_local")!=0 && strcmp($3, "allow")!=0 && strcmp($3, "allow_snoop")!=0) { - yyerror("expected deny, refuse, allow or allow_snoop " + yyerror("expected deny, refuse, deny_non_local, " + "refuse_non_local, allow or allow_snoop " "in access control action"); } else { if(!cfg_str2list_insert(&cfg_parser->cfg->acls, $2, $3)) diff --git a/util/data/dname.c b/util/data/dname.c index d2b299744fb1..76f2e6458264 100644 --- a/util/data/dname.c +++ b/util/data/dname.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -45,17 +45,18 @@ #include "util/data/msgparse.h" #include "util/log.h" #include "util/storage/lookup3.h" +#include "ldns/sbuffer.h" /* determine length of a dname in buffer, no compression pointers allowed */ size_t -query_dname_len(ldns_buffer* query) +query_dname_len(sldns_buffer* query) { size_t len = 0; size_t labellen; while(1) { - if(ldns_buffer_remaining(query) < 1) + if(sldns_buffer_remaining(query) < 1) return 0; /* parse error, need label len */ - labellen = ldns_buffer_read_u8(query); + labellen = sldns_buffer_read_u8(query); if(labellen&0xc0) return 0; /* no compression allowed in queries */ len += labellen + 1; @@ -63,9 +64,9 @@ query_dname_len(ldns_buffer* query) return 0; /* too long */ if(labellen == 0) return len; - if(ldns_buffer_remaining(query) < labellen) + if(sldns_buffer_remaining(query) < labellen) return 0; /* parse error, need content */ - ldns_buffer_skip(query, (ssize_t)labellen); + sldns_buffer_skip(query, (ssize_t)labellen); } } @@ -145,31 +146,31 @@ query_dname_tolower(uint8_t* dname) } void -pkt_dname_tolower(ldns_buffer* pkt, uint8_t* dname) +pkt_dname_tolower(sldns_buffer* pkt, uint8_t* dname) { uint8_t lablen; int count = 0; - if(dname >= ldns_buffer_end(pkt)) + if(dname >= sldns_buffer_end(pkt)) return; lablen = *dname++; while(lablen) { if(LABEL_IS_PTR(lablen)) { if((size_t)PTR_OFFSET(lablen, *dname) - >= ldns_buffer_limit(pkt)) + >= sldns_buffer_limit(pkt)) return; - dname = ldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; if(count++ > MAX_COMPRESS_PTRS) return; continue; } - if(dname+lablen >= ldns_buffer_end(pkt)) + if(dname+lablen >= sldns_buffer_end(pkt)) return; while(lablen--) { *dname = (uint8_t)tolower((int)*dname); dname++; } - if(dname >= ldns_buffer_end(pkt)) + if(dname >= sldns_buffer_end(pkt)) return; lablen = *dname++; } @@ -177,7 +178,7 @@ pkt_dname_tolower(ldns_buffer* pkt, uint8_t* dname) size_t -pkt_dname_len(ldns_buffer* pkt) +pkt_dname_len(sldns_buffer* pkt) { size_t len = 0; int ptrcount = 0; @@ -188,22 +189,22 @@ pkt_dname_len(ldns_buffer* pkt) /* check compression pointers, loops, out of bounds */ while(1) { /* read next label */ - if(ldns_buffer_remaining(pkt) < 1) + if(sldns_buffer_remaining(pkt) < 1) return 0; - labellen = ldns_buffer_read_u8(pkt); + labellen = sldns_buffer_read_u8(pkt); if(LABEL_IS_PTR(labellen)) { /* compression ptr */ uint16_t ptr; - if(ldns_buffer_remaining(pkt) < 1) + if(sldns_buffer_remaining(pkt) < 1) return 0; - ptr = PTR_OFFSET(labellen, ldns_buffer_read_u8(pkt)); + ptr = PTR_OFFSET(labellen, sldns_buffer_read_u8(pkt)); if(ptrcount++ > MAX_COMPRESS_PTRS) return 0; /* loop! */ - if(ldns_buffer_limit(pkt) <= ptr) + if(sldns_buffer_limit(pkt) <= ptr) return 0; /* out of bounds! */ if(!endpos) - endpos = ldns_buffer_position(pkt); - ldns_buffer_set_position(pkt, ptr); + endpos = sldns_buffer_position(pkt); + sldns_buffer_set_position(pkt, ptr); } else { /* label contents */ if(labellen > 0x3f) @@ -215,19 +216,19 @@ pkt_dname_len(ldns_buffer* pkt) /* end of dname */ break; } - if(ldns_buffer_remaining(pkt) < labellen) + if(sldns_buffer_remaining(pkt) < labellen) return 0; - ldns_buffer_skip(pkt, (ssize_t)labellen); + sldns_buffer_skip(pkt, (ssize_t)labellen); } } if(endpos) - ldns_buffer_set_position(pkt, endpos); + sldns_buffer_set_position(pkt, endpos); return len; } int -dname_pkt_compare(ldns_buffer* pkt, uint8_t* d1, uint8_t* d2) +dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2) { uint8_t len1, len2; log_assert(pkt && d1 && d2); @@ -236,12 +237,12 @@ dname_pkt_compare(ldns_buffer* pkt, uint8_t* d1, uint8_t* d2) while( len1 != 0 || len2 != 0 ) { /* resolve ptrs */ if(LABEL_IS_PTR(len1)) { - d1 = ldns_buffer_at(pkt, PTR_OFFSET(len1, *d1)); + d1 = sldns_buffer_at(pkt, PTR_OFFSET(len1, *d1)); len1 = *d1++; continue; } if(LABEL_IS_PTR(len2)) { - d2 = ldns_buffer_at(pkt, PTR_OFFSET(len2, *d2)); + d2 = sldns_buffer_at(pkt, PTR_OFFSET(len2, *d2)); len2 = *d2++; continue; } @@ -290,7 +291,7 @@ dname_query_hash(uint8_t* dname, hashvalue_t h) } hashvalue_t -dname_pkt_hash(ldns_buffer* pkt, uint8_t* dname, hashvalue_t h) +dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_t h) { uint8_t labuf[LDNS_MAX_LABELLEN+1]; uint8_t lablen; @@ -301,7 +302,7 @@ dname_pkt_hash(ldns_buffer* pkt, uint8_t* dname, hashvalue_t h) while(lablen) { if(LABEL_IS_PTR(lablen)) { /* follow pointer */ - dname = ldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; } @@ -317,7 +318,7 @@ dname_pkt_hash(ldns_buffer* pkt, uint8_t* dname, hashvalue_t h) return h; } -void dname_pkt_copy(ldns_buffer* pkt, uint8_t* to, uint8_t* dname) +void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname) { /* copy over the dname and decompress it at the same time */ size_t len = 0; @@ -326,7 +327,7 @@ void dname_pkt_copy(ldns_buffer* pkt, uint8_t* to, uint8_t* dname) while(lablen) { if(LABEL_IS_PTR(lablen)) { /* follow pointer */ - dname = ldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; } @@ -347,7 +348,7 @@ void dname_pkt_copy(ldns_buffer* pkt, uint8_t* to, uint8_t* dname) *to = 0; } -void dname_print(FILE* out, ldns_buffer* pkt, uint8_t* dname) +void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname) { uint8_t lablen; if(!out) out = stdout; @@ -363,7 +364,7 @@ void dname_print(FILE* out, ldns_buffer* pkt, uint8_t* dname) fputs("??compressionptr??", out); return; } - dname = ldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; } @@ -517,21 +518,21 @@ dname_lab_cmp(uint8_t* d1, int labs1, uint8_t* d2, int labs2, int* mlabs) } int -dname_buffer_write(ldns_buffer* pkt, uint8_t* dname) +dname_buffer_write(sldns_buffer* pkt, uint8_t* dname) { uint8_t lablen; - if(ldns_buffer_remaining(pkt) < 1) + if(sldns_buffer_remaining(pkt) < 1) return 0; lablen = *dname++; - ldns_buffer_write_u8(pkt, lablen); + sldns_buffer_write_u8(pkt, lablen); while(lablen) { - if(ldns_buffer_remaining(pkt) < (size_t)lablen+1) + if(sldns_buffer_remaining(pkt) < (size_t)lablen+1) return 0; - ldns_buffer_write(pkt, dname, lablen); + sldns_buffer_write(pkt, dname, lablen); dname += lablen; lablen = *dname++; - ldns_buffer_write_u8(pkt, lablen); + sldns_buffer_write_u8(pkt, lablen); } return 1; } diff --git a/util/data/dname.h b/util/data/dname.h index b942848a9dc7..ae2fbadc1d85 100644 --- a/util/data/dname.h +++ b/util/data/dname.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -45,6 +45,7 @@ #ifndef UTIL_DATA_DNAME_H #define UTIL_DATA_DNAME_H #include "util/storage/lruhash.h" +struct sldns_buffer; /** max number of compression ptrs to follow */ #define MAX_COMPRESS_PTRS 256 @@ -55,7 +56,7 @@ * at end, position is at end of the dname. * @return: 0 on parse failure, or length including ending 0 of dname. */ -size_t query_dname_len(ldns_buffer* query); +size_t query_dname_len(struct sldns_buffer* query); /** * Determine if dname in memory is correct. no compression ptrs allowed. @@ -74,7 +75,7 @@ void query_dname_tolower(uint8_t* dname); * is unchanged. * @param dname: start of dname in packet. */ -void pkt_dname_tolower(ldns_buffer* pkt, uint8_t* dname); +void pkt_dname_tolower(struct sldns_buffer* pkt, uint8_t* dname); /** * Compare query dnames (uncompressed storage). The Dnames passed do not @@ -106,7 +107,7 @@ int query_dname_compare(uint8_t* d1, uint8_t* d2); * Compression pointers are followed and checked for loops. * The uncompressed wireformat length is returned. */ -size_t pkt_dname_len(ldns_buffer* pkt); +size_t pkt_dname_len(struct sldns_buffer* pkt); /** * Compare dnames in packet (compressed). Dnames must be valid. @@ -117,7 +118,7 @@ size_t pkt_dname_len(ldns_buffer* pkt); * @return: -1, 0, or +1 depending on comparison results. * Sort order is first difference found. not the canonical ordering. */ -int dname_pkt_compare(ldns_buffer* pkt, uint8_t* d1, uint8_t* d2); +int dname_pkt_compare(struct sldns_buffer* pkt, uint8_t* d1, uint8_t* d2); /** * Hash dname, label by label, lowercasing, into hashvalue. @@ -138,7 +139,7 @@ hashvalue_t dname_query_hash(uint8_t* dname, hashvalue_t h); * @return: result hash value. * Result is the same as dname_query_hash, even if compression is used. */ -hashvalue_t dname_pkt_hash(ldns_buffer* pkt, uint8_t* dname, hashvalue_t h); +hashvalue_t dname_pkt_hash(struct sldns_buffer* pkt, uint8_t* dname, hashvalue_t h); /** * Copy over a valid dname and decompress it. @@ -146,7 +147,7 @@ hashvalue_t dname_pkt_hash(ldns_buffer* pkt, uint8_t* dname, hashvalue_t h); * @param to: buffer of size from pkt_len function to hold result. * @param dname: pointer into packet where dname starts. */ -void dname_pkt_copy(ldns_buffer* pkt, uint8_t* to, uint8_t* dname); +void dname_pkt_copy(struct sldns_buffer* pkt, uint8_t* to, uint8_t* dname); /** * Copy over a valid dname to a packet. @@ -154,7 +155,7 @@ void dname_pkt_copy(ldns_buffer* pkt, uint8_t* to, uint8_t* dname); * @param dname: dname to copy. * @return: 0 if not enough space in buffer. */ -int dname_buffer_write(ldns_buffer* pkt, uint8_t* dname); +int dname_buffer_write(struct sldns_buffer* pkt, uint8_t* dname); /** * Count the number of labels in an uncompressed dname in memory. @@ -216,7 +217,7 @@ int dname_subdomain_c(uint8_t* d1, uint8_t* d2); * @param pkt: if not NULL, the packet for resolving compression ptrs. * @param dname: pointer to (start of) dname. */ -void dname_print(FILE* out, ldns_buffer* pkt, uint8_t* dname); +void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname); /** * Debug helper. Print dname to given string buffer (string buffer must diff --git a/util/data/msgencode.c b/util/data/msgencode.c index 33f14b4dacc8..26b5deabe4dc 100644 --- a/util/data/msgencode.c +++ b/util/data/msgencode.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -40,7 +40,6 @@ */ #include "config.h" -#include <ldns/wire2host.h> #include "util/data/msgencode.h" #include "util/data/msgreply.h" #include "util/data/msgparse.h" @@ -48,6 +47,7 @@ #include "util/log.h" #include "util/regional.h" #include "util/net_help.h" +#include "ldns/sbuffer.h" /** return code that means the function ran out of memory. negative so it does * not conflict with DNS rcodes. */ @@ -243,7 +243,7 @@ compress_tree_store(uint8_t* dname, int labs, size_t offset, /** compress a domain name */ static int -write_compressed_dname(ldns_buffer* pkt, uint8_t* dname, int labs, +write_compressed_dname(sldns_buffer* pkt, uint8_t* dname, int labs, struct compress_tree_node* p) { /* compress it */ @@ -253,32 +253,32 @@ write_compressed_dname(ldns_buffer* pkt, uint8_t* dname, int labs, if(labs == 1) { /* write root label */ - if(ldns_buffer_remaining(pkt) < 1) + if(sldns_buffer_remaining(pkt) < 1) return 0; - ldns_buffer_write_u8(pkt, 0); + sldns_buffer_write_u8(pkt, 0); return 1; } /* copy the first couple of labels */ while(labcopy--) { lablen = *dname++; - if(ldns_buffer_remaining(pkt) < (size_t)lablen+1) + if(sldns_buffer_remaining(pkt) < (size_t)lablen+1) return 0; - ldns_buffer_write_u8(pkt, lablen); - ldns_buffer_write(pkt, dname, lablen); + sldns_buffer_write_u8(pkt, lablen); + sldns_buffer_write(pkt, dname, lablen); dname += lablen; } /* insert compression ptr */ - if(ldns_buffer_remaining(pkt) < 2) + if(sldns_buffer_remaining(pkt) < 2) return 0; ptr = PTR_CREATE(p->offset); - ldns_buffer_write_u16(pkt, ptr); + sldns_buffer_write_u16(pkt, ptr); return 1; } /** compress owner name of RR, return RETVAL_OUTMEM RETVAL_TRUNC */ static int -compress_owner(struct ub_packed_rrset_key* key, ldns_buffer* pkt, +compress_owner(struct ub_packed_rrset_key* key, sldns_buffer* pkt, struct regional* region, struct compress_tree_node** tree, size_t owner_pos, uint16_t* owner_ptr, int owner_labs) { @@ -296,13 +296,13 @@ compress_owner(struct ub_packed_rrset_key* key, ldns_buffer* pkt, owner_labs, p)) return RETVAL_TRUNC; /* check if typeclass+4 ttl + rdatalen is available */ - if(ldns_buffer_remaining(pkt) < 4+4+2) + if(sldns_buffer_remaining(pkt) < 4+4+2) return RETVAL_TRUNC; } else { /* no compress */ - if(ldns_buffer_remaining(pkt) < key->rk.dname_len+4+4+2) + if(sldns_buffer_remaining(pkt) < key->rk.dname_len+4+4+2) return RETVAL_TRUNC; - ldns_buffer_write(pkt, key->rk.dname, + sldns_buffer_write(pkt, key->rk.dname, key->rk.dname_len); if(owner_pos <= PTR_MAX_OFFSET) *owner_ptr = htons(PTR_CREATE(owner_pos)); @@ -313,13 +313,13 @@ compress_owner(struct ub_packed_rrset_key* key, ldns_buffer* pkt, } else { /* always compress 2nd-further RRs in RRset */ if(owner_labs == 1) { - if(ldns_buffer_remaining(pkt) < 1+4+4+2) + if(sldns_buffer_remaining(pkt) < 1+4+4+2) return RETVAL_TRUNC; - ldns_buffer_write_u8(pkt, 0); + sldns_buffer_write_u8(pkt, 0); } else { - if(ldns_buffer_remaining(pkt) < 2+4+4+2) + if(sldns_buffer_remaining(pkt) < 2+4+4+2) return RETVAL_TRUNC; - ldns_buffer_write(pkt, owner_ptr, 2); + sldns_buffer_write(pkt, owner_ptr, 2); } } return RETVAL_OK; @@ -327,12 +327,12 @@ compress_owner(struct ub_packed_rrset_key* key, ldns_buffer* pkt, /** compress any domain name to the packet, return RETVAL_* */ static int -compress_any_dname(uint8_t* dname, ldns_buffer* pkt, int labs, +compress_any_dname(uint8_t* dname, sldns_buffer* pkt, int labs, struct regional* region, struct compress_tree_node** tree) { struct compress_tree_node* p; struct compress_tree_node** insertpt = NULL; - size_t pos = ldns_buffer_position(pkt); + size_t pos = sldns_buffer_position(pkt); if((p = compress_tree_lookup(tree, dname, labs, &insertpt))) { if(!write_compressed_dname(pkt, dname, labs, p)) return RETVAL_TRUNC; @@ -346,27 +346,27 @@ compress_any_dname(uint8_t* dname, ldns_buffer* pkt, int labs, } /** return true if type needs domain name compression in rdata */ -static const ldns_rr_descriptor* +static const sldns_rr_descriptor* type_rdata_compressable(struct ub_packed_rrset_key* key) { uint16_t t = ntohs(key->rk.type); - if(ldns_rr_descript(t) && - ldns_rr_descript(t)->_compress == LDNS_RR_COMPRESS) - return ldns_rr_descript(t); + if(sldns_rr_descript(t) && + sldns_rr_descript(t)->_compress == LDNS_RR_COMPRESS) + return sldns_rr_descript(t); return 0; } /** compress domain names in rdata, return RETVAL_* */ static int -compress_rdata(ldns_buffer* pkt, uint8_t* rdata, size_t todolen, +compress_rdata(sldns_buffer* pkt, uint8_t* rdata, size_t todolen, struct regional* region, struct compress_tree_node** tree, - const ldns_rr_descriptor* desc) + const sldns_rr_descriptor* desc) { int labs, r, rdf = 0; - size_t dname_len, len, pos = ldns_buffer_position(pkt); + size_t dname_len, len, pos = sldns_buffer_position(pkt); uint8_t count = desc->_dname_count; - ldns_buffer_skip(pkt, 2); /* rdata len fill in later */ + sldns_buffer_skip(pkt, 2); /* rdata len fill in later */ /* space for rdatalen checked for already */ rdata += 2; todolen -= 2; @@ -390,9 +390,9 @@ compress_rdata(ldns_buffer* pkt, uint8_t* rdata, size_t todolen, } if(len) { /* copy over */ - if(ldns_buffer_remaining(pkt) < len) + if(sldns_buffer_remaining(pkt) < len) return RETVAL_TRUNC; - ldns_buffer_write(pkt, rdata, len); + sldns_buffer_write(pkt, rdata, len); todolen -= len; rdata += len; } @@ -400,19 +400,19 @@ compress_rdata(ldns_buffer* pkt, uint8_t* rdata, size_t todolen, } /* copy remainder */ if(todolen > 0) { - if(ldns_buffer_remaining(pkt) < todolen) + if(sldns_buffer_remaining(pkt) < todolen) return RETVAL_TRUNC; - ldns_buffer_write(pkt, rdata, todolen); + sldns_buffer_write(pkt, rdata, todolen); } /* set rdata len */ - ldns_buffer_write_u16_at(pkt, pos, ldns_buffer_position(pkt)-pos-2); + sldns_buffer_write_u16_at(pkt, pos, sldns_buffer_position(pkt)-pos-2); return RETVAL_OK; } /** Returns true if RR type should be included */ static int -rrset_belongs_in_reply(ldns_pkt_section s, uint16_t rrtype, uint16_t qtype, +rrset_belongs_in_reply(sldns_pkt_section s, uint16_t rrtype, uint16_t qtype, int dnssec) { if(dnssec) @@ -440,10 +440,10 @@ rrset_belongs_in_reply(ldns_pkt_section s, uint16_t rrtype, uint16_t qtype, /** store rrset in buffer in wireformat, return RETVAL_* */ static int -packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, +packed_rrset_encode(struct ub_packed_rrset_key* key, sldns_buffer* pkt, uint16_t* num_rrs, time_t timenow, struct regional* region, int do_data, int do_sig, struct compress_tree_node** tree, - ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) + sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) { size_t i, j, owner_pos; int r, owner_labs; @@ -456,10 +456,10 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, return RETVAL_OK; owner_labs = dname_count_labels(key->rk.dname); - owner_pos = ldns_buffer_position(pkt); + owner_pos = sldns_buffer_position(pkt); if(do_data) { - const ldns_rr_descriptor* c = type_rdata_compressable(key); + const sldns_rr_descriptor* c = type_rdata_compressable(key); for(i=0; i<data->count; i++) { /* rrset roundrobin */ j = (i + rr_offset) % data->count; @@ -467,11 +467,11 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, owner_pos, &owner_ptr, owner_labs)) != RETVAL_OK) return r; - ldns_buffer_write(pkt, &key->rk.type, 2); - ldns_buffer_write(pkt, &key->rk.rrset_class, 2); + sldns_buffer_write(pkt, &key->rk.type, 2); + sldns_buffer_write(pkt, &key->rk.rrset_class, 2); if(data->rr_ttl[j] < timenow) - ldns_buffer_write_u32(pkt, 0); - else ldns_buffer_write_u32(pkt, + sldns_buffer_write_u32(pkt, 0); + else sldns_buffer_write_u32(pkt, data->rr_ttl[j]-timenow); if(c) { if((r=compress_rdata(pkt, data->rr_data[j], @@ -479,9 +479,9 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, != RETVAL_OK) return r; } else { - if(ldns_buffer_remaining(pkt) < data->rr_len[j]) + if(sldns_buffer_remaining(pkt) < data->rr_len[j]) return RETVAL_TRUNC; - ldns_buffer_write(pkt, data->rr_data[j], + sldns_buffer_write(pkt, data->rr_data[j], data->rr_len[j]); } } @@ -491,28 +491,28 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, size_t total = data->count+data->rrsig_count; for(i=data->count; i<total; i++) { if(owner_ptr && owner_labs != 1) { - if(ldns_buffer_remaining(pkt) < + if(sldns_buffer_remaining(pkt) < 2+4+4+data->rr_len[i]) return RETVAL_TRUNC; - ldns_buffer_write(pkt, &owner_ptr, 2); + sldns_buffer_write(pkt, &owner_ptr, 2); } else { if((r=compress_any_dname(key->rk.dname, pkt, owner_labs, region, tree)) != RETVAL_OK) return r; - if(ldns_buffer_remaining(pkt) < + if(sldns_buffer_remaining(pkt) < 4+4+data->rr_len[i]) return RETVAL_TRUNC; } - ldns_buffer_write_u16(pkt, LDNS_RR_TYPE_RRSIG); - ldns_buffer_write(pkt, &key->rk.rrset_class, 2); + sldns_buffer_write_u16(pkt, LDNS_RR_TYPE_RRSIG); + sldns_buffer_write(pkt, &key->rk.rrset_class, 2); if(data->rr_ttl[i] < timenow) - ldns_buffer_write_u32(pkt, 0); - else ldns_buffer_write_u32(pkt, + sldns_buffer_write_u32(pkt, 0); + else sldns_buffer_write_u32(pkt, data->rr_ttl[i]-timenow); /* rrsig rdata cannot be compressed, perform 100+ byte * memcopy. */ - ldns_buffer_write(pkt, data->rr_data[i], + sldns_buffer_write(pkt, data->rr_data[i], data->rr_len[i]); } } @@ -528,9 +528,9 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt, /** store msg section in wireformat buffer, return RETVAL_* */ static int insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, - ldns_buffer* pkt, size_t rrsets_before, time_t timenow, + sldns_buffer* pkt, size_t rrsets_before, time_t timenow, struct regional* region, struct compress_tree_node** tree, - ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) + sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset) { int r; size_t i, setstart; @@ -539,36 +539,36 @@ insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, if(s == LDNS_SECTION_ANSWER && qtype == LDNS_RR_TYPE_ANY) dnssec = 1; /* include all types in ANY answer */ for(i=0; i<num_rrsets; i++) { - setstart = ldns_buffer_position(pkt); + setstart = sldns_buffer_position(pkt); if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], pkt, num_rrs, timenow, region, 1, 1, tree, s, qtype, dnssec, rr_offset)) != RETVAL_OK) { /* Bad, but if due to size must set TC bit */ /* trim off the rrset neatly. */ - ldns_buffer_set_position(pkt, setstart); + sldns_buffer_set_position(pkt, setstart); return r; } } } else { for(i=0; i<num_rrsets; i++) { - setstart = ldns_buffer_position(pkt); + setstart = sldns_buffer_position(pkt); if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], pkt, num_rrs, timenow, region, 1, 0, tree, s, qtype, dnssec, rr_offset)) != RETVAL_OK) { - ldns_buffer_set_position(pkt, setstart); + sldns_buffer_set_position(pkt, setstart); return r; } } if(dnssec) for(i=0; i<num_rrsets; i++) { - setstart = ldns_buffer_position(pkt); + setstart = sldns_buffer_position(pkt); if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i], pkt, num_rrs, timenow, region, 0, 1, tree, s, qtype, dnssec, rr_offset)) != RETVAL_OK) { - ldns_buffer_set_position(pkt, setstart); + sldns_buffer_set_position(pkt, setstart); return r; } } @@ -579,21 +579,21 @@ insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, /** store query section in wireformat buffer, return RETVAL */ static int insert_query(struct query_info* qinfo, struct compress_tree_node** tree, - ldns_buffer* buffer, struct regional* region) + sldns_buffer* buffer, struct regional* region) { - if(ldns_buffer_remaining(buffer) < + if(sldns_buffer_remaining(buffer) < qinfo->qname_len+sizeof(uint16_t)*2) return RETVAL_TRUNC; /* buffer too small */ /* the query is the first name inserted into the tree */ if(!compress_tree_store(qinfo->qname, dname_count_labels(qinfo->qname), - ldns_buffer_position(buffer), region, NULL, tree)) + sldns_buffer_position(buffer), region, NULL, tree)) return RETVAL_OUTMEM; - if(ldns_buffer_current(buffer) == qinfo->qname) - ldns_buffer_skip(buffer, (ssize_t)qinfo->qname_len); - else ldns_buffer_write(buffer, qinfo->qname, qinfo->qname_len); - ldns_buffer_write_u16(buffer, qinfo->qtype); - ldns_buffer_write_u16(buffer, qinfo->qclass); + if(sldns_buffer_current(buffer) == qinfo->qname) + sldns_buffer_skip(buffer, (ssize_t)qinfo->qname_len); + else sldns_buffer_write(buffer, qinfo->qname, qinfo->qname_len); + sldns_buffer_write_u16(buffer, qinfo->qtype); + sldns_buffer_write_u16(buffer, qinfo->qclass); return RETVAL_OK; } @@ -624,7 +624,7 @@ positive_answer(struct reply_info* rep, uint16_t qtype) { int reply_info_encode(struct query_info* qinfo, struct reply_info* rep, - uint16_t id, uint16_t flags, ldns_buffer* buffer, time_t timenow, + uint16_t id, uint16_t flags, sldns_buffer* buffer, time_t timenow, struct regional* region, uint16_t udpsize, int dnssec) { uint16_t ancount=0, nscount=0, arcount=0; @@ -632,17 +632,17 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, int r; size_t rr_offset; - ldns_buffer_clear(buffer); - if(udpsize < ldns_buffer_limit(buffer)) - ldns_buffer_set_limit(buffer, udpsize); - if(ldns_buffer_remaining(buffer) < LDNS_HEADER_SIZE) + sldns_buffer_clear(buffer); + if(udpsize < sldns_buffer_limit(buffer)) + sldns_buffer_set_limit(buffer, udpsize); + if(sldns_buffer_remaining(buffer) < LDNS_HEADER_SIZE) return 0; - ldns_buffer_write(buffer, &id, sizeof(uint16_t)); - ldns_buffer_write_u16(buffer, flags); - ldns_buffer_write_u16(buffer, rep->qdcount); + sldns_buffer_write(buffer, &id, sizeof(uint16_t)); + sldns_buffer_write_u16(buffer, flags); + sldns_buffer_write_u16(buffer, rep->qdcount); /* set an, ns, ar counts to zero in case of small packets */ - ldns_buffer_write(buffer, "\000\000\000\000\000\000", 6); + sldns_buffer_write(buffer, "\000\000\000\000\000\000", 6); /* insert query section */ if(rep->qdcount) { @@ -650,9 +650,9 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, RETVAL_OK) { if(r == RETVAL_TRUNC) { /* create truncated message */ - ldns_buffer_write_u16_at(buffer, 4, 0); - LDNS_TC_SET(ldns_buffer_begin(buffer)); - ldns_buffer_flip(buffer); + sldns_buffer_write_u16_at(buffer, 4, 0); + LDNS_TC_SET(sldns_buffer_begin(buffer)); + sldns_buffer_flip(buffer); return 1; } return 0; @@ -668,14 +668,14 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, dnssec, rr_offset)) != RETVAL_OK) { if(r == RETVAL_TRUNC) { /* create truncated message */ - ldns_buffer_write_u16_at(buffer, 6, ancount); - LDNS_TC_SET(ldns_buffer_begin(buffer)); - ldns_buffer_flip(buffer); + sldns_buffer_write_u16_at(buffer, 6, ancount); + LDNS_TC_SET(sldns_buffer_begin(buffer)); + sldns_buffer_flip(buffer); return 1; } return 0; } - ldns_buffer_write_u16_at(buffer, 6, ancount); + sldns_buffer_write_u16_at(buffer, 6, ancount); /* if response is positive answer, auth/add sections are not required */ if( ! (MINIMAL_RESPONSES && positive_answer(rep, qinfo->qtype)) ) { @@ -686,14 +686,14 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, dnssec, rr_offset)) != RETVAL_OK) { if(r == RETVAL_TRUNC) { /* create truncated message */ - ldns_buffer_write_u16_at(buffer, 8, nscount); - LDNS_TC_SET(ldns_buffer_begin(buffer)); - ldns_buffer_flip(buffer); + sldns_buffer_write_u16_at(buffer, 8, nscount); + LDNS_TC_SET(sldns_buffer_begin(buffer)); + sldns_buffer_flip(buffer); return 1; } return 0; } - ldns_buffer_write_u16_at(buffer, 8, nscount); + sldns_buffer_write_u16_at(buffer, 8, nscount); /* insert add section */ if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer, @@ -702,15 +702,15 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, dnssec, rr_offset)) != RETVAL_OK) { if(r == RETVAL_TRUNC) { /* no need to set TC bit, this is the additional */ - ldns_buffer_write_u16_at(buffer, 10, arcount); - ldns_buffer_flip(buffer); + sldns_buffer_write_u16_at(buffer, 10, arcount); + sldns_buffer_flip(buffer); return 1; } return 0; } - ldns_buffer_write_u16_at(buffer, 10, arcount); + sldns_buffer_write_u16_at(buffer, 10, arcount); } - ldns_buffer_flip(buffer); + sldns_buffer_flip(buffer); return 1; } @@ -724,31 +724,31 @@ calc_edns_field_size(struct edns_data* edns) } void -attach_edns_record(ldns_buffer* pkt, struct edns_data* edns) +attach_edns_record(sldns_buffer* pkt, struct edns_data* edns) { size_t len; if(!edns || !edns->edns_present) return; /* inc additional count */ - ldns_buffer_write_u16_at(pkt, 10, - ldns_buffer_read_u16_at(pkt, 10) + 1); - len = ldns_buffer_limit(pkt); - ldns_buffer_clear(pkt); - ldns_buffer_set_position(pkt, len); + sldns_buffer_write_u16_at(pkt, 10, + sldns_buffer_read_u16_at(pkt, 10) + 1); + len = sldns_buffer_limit(pkt); + sldns_buffer_clear(pkt); + sldns_buffer_set_position(pkt, len); /* write EDNS record */ - ldns_buffer_write_u8(pkt, 0); /* '.' label */ - ldns_buffer_write_u16(pkt, LDNS_RR_TYPE_OPT); /* type */ - ldns_buffer_write_u16(pkt, edns->udp_size); /* class */ - ldns_buffer_write_u8(pkt, edns->ext_rcode); /* ttl */ - ldns_buffer_write_u8(pkt, edns->edns_version); - ldns_buffer_write_u16(pkt, edns->bits); - ldns_buffer_write_u16(pkt, 0); /* rdatalen */ - ldns_buffer_flip(pkt); + sldns_buffer_write_u8(pkt, 0); /* '.' label */ + sldns_buffer_write_u16(pkt, LDNS_RR_TYPE_OPT); /* type */ + sldns_buffer_write_u16(pkt, edns->udp_size); /* class */ + sldns_buffer_write_u8(pkt, edns->ext_rcode); /* ttl */ + sldns_buffer_write_u8(pkt, edns->edns_version); + sldns_buffer_write_u16(pkt, edns->bits); + sldns_buffer_write_u16(pkt, 0); /* rdatalen */ + sldns_buffer_flip(pkt); } int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, - uint16_t id, uint16_t qflags, ldns_buffer* pkt, time_t timenow, + uint16_t id, uint16_t qflags, sldns_buffer* pkt, time_t timenow, int cached, struct regional* region, uint16_t udpsize, struct edns_data* edns, int dnssec, int secure) { @@ -786,54 +786,54 @@ reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, } void -qinfo_query_encode(ldns_buffer* pkt, struct query_info* qinfo) +qinfo_query_encode(sldns_buffer* pkt, struct query_info* qinfo) { uint16_t flags = 0; /* QUERY, NOERROR */ - ldns_buffer_clear(pkt); - log_assert(ldns_buffer_remaining(pkt) >= 12+255+4/*max query*/); - ldns_buffer_skip(pkt, 2); /* id done later */ - ldns_buffer_write_u16(pkt, flags); - ldns_buffer_write_u16(pkt, 1); /* query count */ - ldns_buffer_write(pkt, "\000\000\000\000\000\000", 6); /* counts */ - ldns_buffer_write(pkt, qinfo->qname, qinfo->qname_len); - ldns_buffer_write_u16(pkt, qinfo->qtype); - ldns_buffer_write_u16(pkt, qinfo->qclass); - ldns_buffer_flip(pkt); + sldns_buffer_clear(pkt); + log_assert(sldns_buffer_remaining(pkt) >= 12+255+4/*max query*/); + sldns_buffer_skip(pkt, 2); /* id done later */ + sldns_buffer_write_u16(pkt, flags); + sldns_buffer_write_u16(pkt, 1); /* query count */ + sldns_buffer_write(pkt, "\000\000\000\000\000\000", 6); /* counts */ + sldns_buffer_write(pkt, qinfo->qname, qinfo->qname_len); + sldns_buffer_write_u16(pkt, qinfo->qtype); + sldns_buffer_write_u16(pkt, qinfo->qclass); + sldns_buffer_flip(pkt); } void -error_encode(ldns_buffer* buf, int r, struct query_info* qinfo, +error_encode(sldns_buffer* buf, int r, struct query_info* qinfo, uint16_t qid, uint16_t qflags, struct edns_data* edns) { uint16_t flags; - ldns_buffer_clear(buf); - ldns_buffer_write(buf, &qid, sizeof(uint16_t)); + sldns_buffer_clear(buf); + sldns_buffer_write(buf, &qid, sizeof(uint16_t)); flags = (uint16_t)(BIT_QR | BIT_RA | r); /* QR and retcode*/ flags |= (qflags & (BIT_RD|BIT_CD)); /* copy RD and CD bit */ - ldns_buffer_write_u16(buf, flags); + sldns_buffer_write_u16(buf, flags); if(qinfo) flags = 1; else flags = 0; - ldns_buffer_write_u16(buf, flags); + sldns_buffer_write_u16(buf, flags); flags = 0; - ldns_buffer_write(buf, &flags, sizeof(uint16_t)); - ldns_buffer_write(buf, &flags, sizeof(uint16_t)); - ldns_buffer_write(buf, &flags, sizeof(uint16_t)); + sldns_buffer_write(buf, &flags, sizeof(uint16_t)); + sldns_buffer_write(buf, &flags, sizeof(uint16_t)); + sldns_buffer_write(buf, &flags, sizeof(uint16_t)); if(qinfo) { - if(ldns_buffer_current(buf) == qinfo->qname) - ldns_buffer_skip(buf, (ssize_t)qinfo->qname_len); - else ldns_buffer_write(buf, qinfo->qname, qinfo->qname_len); - ldns_buffer_write_u16(buf, qinfo->qtype); - ldns_buffer_write_u16(buf, qinfo->qclass); + if(sldns_buffer_current(buf) == qinfo->qname) + sldns_buffer_skip(buf, (ssize_t)qinfo->qname_len); + else sldns_buffer_write(buf, qinfo->qname, qinfo->qname_len); + sldns_buffer_write_u16(buf, qinfo->qtype); + sldns_buffer_write_u16(buf, qinfo->qclass); } - ldns_buffer_flip(buf); + sldns_buffer_flip(buf); if(edns) { struct edns_data es = *edns; es.edns_version = EDNS_ADVERTISED_VERSION; es.udp_size = EDNS_ADVERTISED_SIZE; es.ext_rcode = 0; es.bits &= EDNS_DO; - if(ldns_buffer_limit(buf) + calc_edns_field_size(&es) > + if(sldns_buffer_limit(buf) + calc_edns_field_size(&es) > edns->udp_size) return; attach_edns_record(buf, &es); diff --git a/util/data/msgencode.h b/util/data/msgencode.h index 13f0c1b4d334..eea129d98d59 100644 --- a/util/data/msgencode.h +++ b/util/data/msgencode.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -42,6 +42,7 @@ #ifndef UTIL_DATA_MSGENCODE_H #define UTIL_DATA_MSGENCODE_H +struct sldns_buffer; struct query_info; struct reply_info; struct regional; @@ -66,7 +67,7 @@ struct edns_data; * @return: 0 on error (server failure). */ int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, - uint16_t id, uint16_t qflags, ldns_buffer* dest, time_t timenow, + uint16_t id, uint16_t qflags, struct sldns_buffer* dest, time_t timenow, int cached, struct regional* region, uint16_t udpsize, struct edns_data* edns, int dnssec, int secure); @@ -88,7 +89,7 @@ int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, * 0 on error: malloc failure (no log_err has been done). */ int reply_info_encode(struct query_info* qinfo, struct reply_info* rep, - uint16_t id, uint16_t flags, ldns_buffer* buffer, time_t timenow, + uint16_t id, uint16_t flags, struct sldns_buffer* buffer, time_t timenow, struct regional* region, uint16_t udpsize, int dnssec); /** @@ -96,7 +97,7 @@ int reply_info_encode(struct query_info* qinfo, struct reply_info* rep, * @param pkt: where to store the packet. * @param qinfo: query info. */ -void qinfo_query_encode(ldns_buffer* pkt, struct query_info* qinfo); +void qinfo_query_encode(struct sldns_buffer* pkt, struct query_info* qinfo); /** * Estimate size of EDNS record in packet. EDNS record will be no larger. @@ -111,7 +112,7 @@ uint16_t calc_edns_field_size(struct edns_data* edns); * @param pkt: packet added to. * @param edns: if NULL or present=0, nothing is added to the packet. */ -void attach_edns_record(ldns_buffer* pkt, struct edns_data* edns); +void attach_edns_record(struct sldns_buffer* pkt, struct edns_data* edns); /** * Encode an error. With QR and RA set. @@ -124,7 +125,7 @@ void attach_edns_record(ldns_buffer* pkt, struct edns_data* edns); * @param edns: if not NULL, this is the query edns info, * and an edns reply is attached. Only attached if EDNS record fits reply. */ -void error_encode(ldns_buffer* pkt, int r, struct query_info* qinfo, +void error_encode(struct sldns_buffer* pkt, int r, struct query_info* qinfo, uint16_t qid, uint16_t qflags, struct edns_data* edns); #endif /* UTIL_DATA_MSGENCODE_H */ diff --git a/util/data/msgparse.c b/util/data/msgparse.c index 2791ae560865..abe778a89fb6 100644 --- a/util/data/msgparse.c +++ b/util/data/msgparse.c @@ -21,37 +21,40 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file * Routines for message parsing a packet buffer to a descriptive structure. */ #include "config.h" -#include <ldns/ldns.h> #include "util/data/msgparse.h" #include "util/data/dname.h" #include "util/data/packed_rrset.h" #include "util/storage/lookup3.h" #include "util/regional.h" +#include "ldns/rrdef.h" +#include "ldns/sbuffer.h" +#include "ldns/parseutil.h" +#include "ldns/wire2str.h" /** smart comparison of (compressed, valid) dnames from packet */ static int -smart_compare(ldns_buffer* pkt, uint8_t* dnow, +smart_compare(sldns_buffer* pkt, uint8_t* dnow, uint8_t* dprfirst, uint8_t* dprlast) { if(LABEL_IS_PTR(*dnow)) { /* ptr points to a previous dname */ - uint8_t* p = ldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); + uint8_t* p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); if( p == dprfirst || p == dprlast ) return 0; /* prev dname is also a ptr, both ptrs are the same. */ @@ -68,7 +71,7 @@ smart_compare(ldns_buffer* pkt, uint8_t* dnow, static struct rrset_parse* new_rrset(struct msg_parse* msg, uint8_t* dname, size_t dnamelen, uint16_t type, uint16_t dclass, hashvalue_t hash, - uint32_t rrset_flags, ldns_pkt_section section, + uint32_t rrset_flags, sldns_pkt_section section, struct regional* region) { struct rrset_parse* p = regional_alloc(region, sizeof(*p)); @@ -99,52 +102,52 @@ new_rrset(struct msg_parse* msg, uint8_t* dname, size_t dnamelen, /** See if next rrset is nsec at zone apex */ static int -nsec_at_apex(ldns_buffer* pkt) +nsec_at_apex(sldns_buffer* pkt) { /* we are at ttl position in packet. */ - size_t pos = ldns_buffer_position(pkt); + size_t pos = sldns_buffer_position(pkt); uint16_t rdatalen; - if(ldns_buffer_remaining(pkt) < 7) /* ttl+len+root */ + if(sldns_buffer_remaining(pkt) < 7) /* ttl+len+root */ return 0; /* eek! */ - ldns_buffer_skip(pkt, 4); /* ttl */; - rdatalen = ldns_buffer_read_u16(pkt); - if(ldns_buffer_remaining(pkt) < rdatalen) { - ldns_buffer_set_position(pkt, pos); + sldns_buffer_skip(pkt, 4); /* ttl */; + rdatalen = sldns_buffer_read_u16(pkt); + if(sldns_buffer_remaining(pkt) < rdatalen) { + sldns_buffer_set_position(pkt, pos); return 0; /* parse error happens later */ } /* must validate the nsec next domain name format */ if(pkt_dname_len(pkt) == 0) { - ldns_buffer_set_position(pkt, pos); + sldns_buffer_set_position(pkt, pos); return 0; /* parse error */ } /* see if SOA bit is set. */ - if(ldns_buffer_position(pkt) < pos+4+rdatalen) { + if(sldns_buffer_position(pkt) < pos+4+rdatalen) { /* nsec type bitmap contains items */ uint8_t win, blen, bits; /* need: windownum, bitmap len, firstbyte */ - if(ldns_buffer_position(pkt)+3 > pos+4+rdatalen) { - ldns_buffer_set_position(pkt, pos); + if(sldns_buffer_position(pkt)+3 > pos+4+rdatalen) { + sldns_buffer_set_position(pkt, pos); return 0; /* malformed nsec */ } - win = ldns_buffer_read_u8(pkt); - blen = ldns_buffer_read_u8(pkt); - bits = ldns_buffer_read_u8(pkt); + win = sldns_buffer_read_u8(pkt); + blen = sldns_buffer_read_u8(pkt); + bits = sldns_buffer_read_u8(pkt); /* 0window always first window. bitlen >=1 or parse error really. bit 0x2 is SOA. */ if(win == 0 && blen >= 1 && (bits & 0x02)) { - ldns_buffer_set_position(pkt, pos); + sldns_buffer_set_position(pkt, pos); return 1; } } - ldns_buffer_set_position(pkt, pos); + sldns_buffer_set_position(pkt, pos); return 0; } /** Calculate rrset flags */ static uint32_t -pkt_rrset_flags(ldns_buffer* pkt, uint16_t type, ldns_pkt_section sec) +pkt_rrset_flags(sldns_buffer* pkt, uint16_t type, sldns_pkt_section sec) { uint32_t f = 0; if(type == LDNS_RR_TYPE_NSEC && nsec_at_apex(pkt)) { @@ -156,7 +159,7 @@ pkt_rrset_flags(ldns_buffer* pkt, uint16_t type, ldns_pkt_section sec) } hashvalue_t -pkt_hash_rrset(ldns_buffer* pkt, uint8_t* dname, uint16_t type, +pkt_hash_rrset(sldns_buffer* pkt, uint8_t* dname, uint16_t type, uint16_t dclass, uint32_t rrset_flags) { /* note this MUST be identical to rrset_key_hash in packed_rrset.c */ @@ -171,7 +174,7 @@ pkt_hash_rrset(ldns_buffer* pkt, uint8_t* dname, uint16_t type, /** create partial dname hash for rrset hash */ static hashvalue_t -pkt_hash_rrset_first(ldns_buffer* pkt, uint8_t* dname) +pkt_hash_rrset_first(sldns_buffer* pkt, uint8_t* dname) { /* works together with pkt_hash_rrset_rest */ /* note this MUST be identical to rrset_key_hash in packed_rrset.c */ @@ -197,7 +200,7 @@ pkt_hash_rrset_rest(hashvalue_t dname_h, uint16_t type, uint16_t dclass, /** compare rrset_parse with data */ static int -rrset_parse_equals(struct rrset_parse* p, ldns_buffer* pkt, hashvalue_t h, +rrset_parse_equals(struct rrset_parse* p, sldns_buffer* pkt, hashvalue_t h, uint32_t rrset_flags, uint8_t* dname, size_t dnamelen, uint16_t type, uint16_t dclass) { @@ -210,7 +213,7 @@ rrset_parse_equals(struct rrset_parse* p, ldns_buffer* pkt, hashvalue_t h, struct rrset_parse* -msgparse_hashtable_lookup(struct msg_parse* msg, ldns_buffer* pkt, +msgparse_hashtable_lookup(struct msg_parse* msg, sldns_buffer* pkt, hashvalue_t h, uint32_t rrset_flags, uint8_t* dname, size_t dnamelen, uint16_t type, uint16_t dclass) { @@ -226,26 +229,26 @@ msgparse_hashtable_lookup(struct msg_parse* msg, ldns_buffer* pkt, /** return type networkformat that rrsig in packet covers */ static int -pkt_rrsig_covered(ldns_buffer* pkt, uint8_t* here, uint16_t* type) +pkt_rrsig_covered(sldns_buffer* pkt, uint8_t* here, uint16_t* type) { - size_t pos = ldns_buffer_position(pkt); - ldns_buffer_set_position(pkt, (size_t)(here-ldns_buffer_begin(pkt))); + size_t pos = sldns_buffer_position(pkt); + sldns_buffer_set_position(pkt, (size_t)(here-sldns_buffer_begin(pkt))); /* ttl + len + size of small rrsig(rootlabel, no signature) */ - if(ldns_buffer_remaining(pkt) < 4+2+19) + if(sldns_buffer_remaining(pkt) < 4+2+19) return 0; - ldns_buffer_skip(pkt, 4); /* ttl */ - if(ldns_buffer_read_u16(pkt) < 19) /* too short */ { - ldns_buffer_set_position(pkt, pos); + sldns_buffer_skip(pkt, 4); /* ttl */ + if(sldns_buffer_read_u16(pkt) < 19) /* too short */ { + sldns_buffer_set_position(pkt, pos); return 0; } - *type = ldns_buffer_read_u16(pkt); - ldns_buffer_set_position(pkt, pos); + *type = sldns_buffer_read_u16(pkt); + sldns_buffer_set_position(pkt, pos); return 1; } /** true if covered type equals prevtype */ static int -pkt_rrsig_covered_equals(ldns_buffer* pkt, uint8_t* here, uint16_t type) +pkt_rrsig_covered_equals(sldns_buffer* pkt, uint8_t* here, uint16_t type) { uint16_t t; if(pkt_rrsig_covered(pkt, here, &t) && t == type) @@ -270,7 +273,7 @@ msgparse_bucket_remove(struct msg_parse* msg, struct rrset_parse* rrset) /** change section of rrset from previous to current section */ static void change_section(struct msg_parse* msg, struct rrset_parse* rrset, - ldns_pkt_section section) + sldns_pkt_section section) { struct rrset_parse *p, *prev; /* remove from list */ @@ -313,7 +316,7 @@ change_section(struct msg_parse* msg, struct rrset_parse* rrset, /** see if rrset of type RRSIG contains sig over given type */ static int -rrset_has_sigover(ldns_buffer* pkt, struct rrset_parse* rrset, uint16_t type, +rrset_has_sigover(sldns_buffer* pkt, struct rrset_parse* rrset, uint16_t type, int* hasother) { int res = 0; @@ -330,7 +333,7 @@ rrset_has_sigover(ldns_buffer* pkt, struct rrset_parse* rrset, uint16_t type, /** move rrsigs from sigset to dataset */ static int -moveover_rrsigs(ldns_buffer* pkt, struct regional* region, +moveover_rrsigs(sldns_buffer* pkt, struct regional* region, struct rrset_parse* sigset, struct rrset_parse* dataset, int duplicate) { struct rr_parse* sig = sigset->rr_first; @@ -380,8 +383,8 @@ moveover_rrsigs(ldns_buffer* pkt, struct regional* region, /** change an rrsig rrset for use as data rrset */ static struct rrset_parse* change_rrsig_rrset(struct rrset_parse* sigset, struct msg_parse* msg, - ldns_buffer* pkt, uint16_t datatype, uint32_t rrset_flags, - int hasother, ldns_pkt_section section, struct regional* region) + sldns_buffer* pkt, uint16_t datatype, uint32_t rrset_flags, + int hasother, sldns_pkt_section section, struct regional* region) { struct rrset_parse* dataset = sigset; hashvalue_t hash = pkt_hash_rrset(pkt, sigset->dname, datatype, @@ -450,13 +453,13 @@ change_rrsig_rrset(struct rrset_parse* sigset, struct msg_parse* msg, * @return 0 on out of memory. */ static int -find_rrset(struct msg_parse* msg, ldns_buffer* pkt, uint8_t* dname, +find_rrset(struct msg_parse* msg, sldns_buffer* pkt, uint8_t* dname, size_t dnamelen, uint16_t type, uint16_t dclass, hashvalue_t* hash, uint32_t* rrset_flags, uint8_t** prev_dname_first, uint8_t** prev_dname_last, size_t* prev_dnamelen, uint16_t* prev_type, uint16_t* prev_dclass, struct rrset_parse** rrset_prev, - ldns_pkt_section section, struct regional* region) + sldns_pkt_section section, struct regional* region) { hashvalue_t dname_h = pkt_hash_rrset_first(pkt, dname); uint16_t covtype; @@ -473,7 +476,7 @@ find_rrset(struct msg_parse* msg, ldns_buffer* pkt, uint8_t* dname, } /* check if rrsig over previous item */ if(type == LDNS_RR_TYPE_RRSIG && dclass == *prev_dclass && - pkt_rrsig_covered_equals(pkt, ldns_buffer_current(pkt), + pkt_rrsig_covered_equals(pkt, sldns_buffer_current(pkt), *prev_type) && smart_compare(pkt, dname, *prev_dname_first, *prev_dname_last) == 0) { @@ -487,7 +490,7 @@ find_rrset(struct msg_parse* msg, ldns_buffer* pkt, uint8_t* dname, /* if rrsig - try to lookup matching data set first */ if(type == LDNS_RR_TYPE_RRSIG && pkt_rrsig_covered(pkt, - ldns_buffer_current(pkt), &covtype)) { + sldns_buffer_current(pkt), &covtype)) { *hash = pkt_hash_rrset_rest(dname_h, covtype, dclass, *rrset_flags); *rrset_prev = msgparse_hashtable_lookup(msg, pkt, *hash, @@ -568,27 +571,27 @@ find_rrset(struct msg_parse* msg, ldns_buffer* pkt, uint8_t* dname, * @return: 0 if OK, or rcode on error. */ static int -parse_query_section(ldns_buffer* pkt, struct msg_parse* msg) +parse_query_section(sldns_buffer* pkt, struct msg_parse* msg) { if(msg->qdcount == 0) return 0; if(msg->qdcount > 1) return LDNS_RCODE_FORMERR; log_assert(msg->qdcount == 1); - if(ldns_buffer_remaining(pkt) <= 0) + if(sldns_buffer_remaining(pkt) <= 0) return LDNS_RCODE_FORMERR; - msg->qname = ldns_buffer_current(pkt); + msg->qname = sldns_buffer_current(pkt); if((msg->qname_len = pkt_dname_len(pkt)) == 0) return LDNS_RCODE_FORMERR; - if(ldns_buffer_remaining(pkt) < sizeof(uint16_t)*2) + if(sldns_buffer_remaining(pkt) < sizeof(uint16_t)*2) return LDNS_RCODE_FORMERR; - msg->qtype = ldns_buffer_read_u16(pkt); - msg->qclass = ldns_buffer_read_u16(pkt); + msg->qtype = sldns_buffer_read_u16(pkt); + msg->qclass = sldns_buffer_read_u16(pkt); return 0; } size_t -get_rdf_size(ldns_rdf_type rdf) +get_rdf_size(sldns_rdf_type rdf) { switch(rdf) { case LDNS_RDF_TYPE_CLASS: @@ -614,7 +617,7 @@ get_rdf_size(ldns_rdf_type rdf) return 16; break; default: - log_assert(false); /* add type above */ + log_assert(0); /* add type above */ /* only types that appear before a domain * * name are needed. rest is simply copied. */ } @@ -623,16 +626,16 @@ get_rdf_size(ldns_rdf_type rdf) /** calculate the size of one rr */ static int -calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr) +calc_size(sldns_buffer* pkt, uint16_t type, struct rr_parse* rr) { - const ldns_rr_descriptor* desc; + const sldns_rr_descriptor* desc; uint16_t pkt_len; /* length of rr inside the packet */ rr->size = sizeof(uint16_t); /* the rdatalen */ - ldns_buffer_skip(pkt, 4); /* skip ttl */ - pkt_len = ldns_buffer_read_u16(pkt); - if(ldns_buffer_remaining(pkt) < pkt_len) + sldns_buffer_skip(pkt, 4); /* skip ttl */ + pkt_len = sldns_buffer_read_u16(pkt); + if(sldns_buffer_remaining(pkt) < pkt_len) return 0; - desc = ldns_rr_descript(type); + desc = sldns_rr_descript(type); if(pkt_len > 0 && desc && desc->_dname_count > 0) { int count = (int)desc->_dname_count; int rdf = 0; @@ -643,12 +646,12 @@ calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr) switch(desc->_wireformat[rdf]) { case LDNS_RDF_TYPE_DNAME: /* decompress every domain name */ - oldpos = ldns_buffer_position(pkt); + oldpos = sldns_buffer_position(pkt); if((len = pkt_dname_len(pkt)) == 0) return 0; /* malformed dname */ - if(ldns_buffer_position(pkt)-oldpos > pkt_len) + if(sldns_buffer_position(pkt)-oldpos > pkt_len) return 0; /* dname exceeds rdata */ - pkt_len -= ldns_buffer_position(pkt)-oldpos; + pkt_len -= sldns_buffer_position(pkt)-oldpos; rr->size += len; count--; len = 0; @@ -658,7 +661,7 @@ calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr) /* NOTREACHED, due to 'while(>0)' */ return 0; /* len byte exceeds rdata */ } - len = ldns_buffer_current(pkt)[0] + 1; + len = sldns_buffer_current(pkt)[0] + 1; break; default: len = get_rdf_size(desc->_wireformat[rdf]); @@ -667,7 +670,7 @@ calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr) if(pkt_len < len) return 0; /* exceeds rdata */ pkt_len -= len; - ldns_buffer_skip(pkt, (ssize_t)len); + sldns_buffer_skip(pkt, (ssize_t)len); rr->size += len; } rdf++; @@ -675,41 +678,41 @@ calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr) } /* remaining rdata */ rr->size += pkt_len; - ldns_buffer_skip(pkt, (ssize_t)pkt_len); + sldns_buffer_skip(pkt, (ssize_t)pkt_len); return 1; } /** skip rr ttl and rdata */ static int -skip_ttl_rdata(ldns_buffer* pkt) +skip_ttl_rdata(sldns_buffer* pkt) { uint16_t rdatalen; - if(ldns_buffer_remaining(pkt) < 6) /* ttl + rdatalen */ + if(sldns_buffer_remaining(pkt) < 6) /* ttl + rdatalen */ return 0; - ldns_buffer_skip(pkt, 4); /* ttl */ - rdatalen = ldns_buffer_read_u16(pkt); - if(ldns_buffer_remaining(pkt) < rdatalen) + sldns_buffer_skip(pkt, 4); /* ttl */ + rdatalen = sldns_buffer_read_u16(pkt); + if(sldns_buffer_remaining(pkt) < rdatalen) return 0; - ldns_buffer_skip(pkt, (ssize_t)rdatalen); + sldns_buffer_skip(pkt, (ssize_t)rdatalen); return 1; } /** see if RRSIG is a duplicate of another */ static int -sig_is_double(ldns_buffer* pkt, struct rrset_parse* rrset, uint8_t* ttldata) +sig_is_double(sldns_buffer* pkt, struct rrset_parse* rrset, uint8_t* ttldata) { uint16_t rlen, siglen; - size_t pos = ldns_buffer_position(pkt); + size_t pos = sldns_buffer_position(pkt); struct rr_parse* sig; - if(ldns_buffer_remaining(pkt) < 6) + if(sldns_buffer_remaining(pkt) < 6) return 0; - ldns_buffer_skip(pkt, 4); /* ttl */ - rlen = ldns_buffer_read_u16(pkt); - if(ldns_buffer_remaining(pkt) < rlen) { - ldns_buffer_set_position(pkt, pos); + sldns_buffer_skip(pkt, 4); /* ttl */ + rlen = sldns_buffer_read_u16(pkt); + if(sldns_buffer_remaining(pkt) < rlen) { + sldns_buffer_set_position(pkt, pos); return 0; } - ldns_buffer_set_position(pkt, pos); + sldns_buffer_set_position(pkt, pos); sig = rrset->rrsig_first; while(sig) { @@ -738,9 +741,9 @@ sig_is_double(ldns_buffer* pkt, struct rrset_parse* rrset, uint8_t* ttldata) /** Add rr (from packet here) to rrset, skips rr */ static int -add_rr_to_rrset(struct rrset_parse* rrset, ldns_buffer* pkt, +add_rr_to_rrset(struct rrset_parse* rrset, sldns_buffer* pkt, struct msg_parse* msg, struct regional* region, - ldns_pkt_section section, uint16_t type) + sldns_pkt_section section, uint16_t type) { struct rr_parse* rr; /* check section of rrset. */ @@ -764,7 +767,7 @@ add_rr_to_rrset(struct rrset_parse* rrset, ldns_buffer* pkt, if( (msg->qtype == LDNS_RR_TYPE_RRSIG || msg->qtype == LDNS_RR_TYPE_ANY) - && sig_is_double(pkt, rrset, ldns_buffer_current(pkt))) { + && sig_is_double(pkt, rrset, sldns_buffer_current(pkt))) { if(!skip_ttl_rdata(pkt)) return LDNS_RCODE_FORMERR; return 0; @@ -774,7 +777,7 @@ add_rr_to_rrset(struct rrset_parse* rrset, ldns_buffer* pkt, if(!(rr = (struct rr_parse*)regional_alloc(region, sizeof(*rr)))) return LDNS_RCODE_SERVFAIL; rr->outside_packet = 0; - rr->ttl_data = ldns_buffer_current(pkt); + rr->ttl_data = sldns_buffer_current(pkt); rr->next = 0; if(type == LDNS_RR_TYPE_RRSIG && rrset->type != LDNS_RR_TYPE_RRSIG) { if(rrset->rrsig_last) @@ -810,8 +813,8 @@ add_rr_to_rrset(struct rrset_parse* rrset, ldns_buffer* pkt, * @return: 0 if OK, or rcode on error. */ static int -parse_section(ldns_buffer* pkt, struct msg_parse* msg, - struct regional* region, ldns_pkt_section section, +parse_section(sldns_buffer* pkt, struct msg_parse* msg, + struct regional* region, sldns_pkt_section section, uint16_t num_rrs, size_t* num_rrsets) { uint16_t i; @@ -826,39 +829,39 @@ parse_section(ldns_buffer* pkt, struct msg_parse* msg, if(num_rrs == 0) return 0; - if(ldns_buffer_remaining(pkt) <= 0) + if(sldns_buffer_remaining(pkt) <= 0) return LDNS_RCODE_FORMERR; for(i=0; i<num_rrs; i++) { /* parse this RR. */ - dname = ldns_buffer_current(pkt); + dname = sldns_buffer_current(pkt); if((dnamelen = pkt_dname_len(pkt)) == 0) return LDNS_RCODE_FORMERR; - if(ldns_buffer_remaining(pkt) < 10) /* type, class, ttl, len */ + if(sldns_buffer_remaining(pkt) < 10) /* type, class, ttl, len */ return LDNS_RCODE_FORMERR; - type = ldns_buffer_read_u16(pkt); - ldns_buffer_read(pkt, &dclass, sizeof(dclass)); + type = sldns_buffer_read_u16(pkt); + sldns_buffer_read(pkt, &dclass, sizeof(dclass)); if(0) { /* debug show what is being parsed. */ if(type == LDNS_RR_TYPE_RRSIG) { uint16_t t; if(pkt_rrsig_covered(pkt, - ldns_buffer_current(pkt), &t)) + sldns_buffer_current(pkt), &t)) fprintf(stderr, "parse of %s(%d) [%s(%d)]", - ldns_rr_descript(type)? - ldns_rr_descript(type)->_name: "??", + sldns_rr_descript(type)? + sldns_rr_descript(type)->_name: "??", (int)type, - ldns_rr_descript(t)? - ldns_rr_descript(t)->_name: "??", + sldns_rr_descript(t)? + sldns_rr_descript(t)->_name: "??", (int)t); } else fprintf(stderr, "parse of %s(%d)", - ldns_rr_descript(type)? - ldns_rr_descript(type)->_name: "??", + sldns_rr_descript(type)? + sldns_rr_descript(type)->_name: "??", (int)type); fprintf(stderr, " %s(%d) ", - ldns_lookup_by_id(ldns_rr_classes, - (int)ntohs(dclass))?ldns_lookup_by_id( - ldns_rr_classes, (int)ntohs(dclass))->name: + sldns_lookup_by_id(sldns_rr_classes, + (int)ntohs(dclass))?sldns_lookup_by_id( + sldns_rr_classes, (int)ntohs(dclass))->name: "??", (int)ntohs(dclass)); dname_print(stderr, pkt, dname); fprintf(stderr, "\n"); @@ -882,8 +885,8 @@ parse_section(ldns_buffer* pkt, struct msg_parse* msg, fprintf(stderr, "is part of existing: "); dname_print(stderr, pkt, rrset->dname); fprintf(stderr, " type %s(%d)\n", - ldns_rr_descript(rrset->type)? - ldns_rr_descript(rrset->type)->_name: "??", + sldns_rr_descript(rrset->type)? + sldns_rr_descript(rrset->type)->_name: "??", (int)rrset->type); } /* add to rrset. */ @@ -895,18 +898,18 @@ parse_section(ldns_buffer* pkt, struct msg_parse* msg, } int -parse_packet(ldns_buffer* pkt, struct msg_parse* msg, struct regional* region) +parse_packet(sldns_buffer* pkt, struct msg_parse* msg, struct regional* region) { int ret; - if(ldns_buffer_remaining(pkt) < LDNS_HEADER_SIZE) + if(sldns_buffer_remaining(pkt) < LDNS_HEADER_SIZE) return LDNS_RCODE_FORMERR; /* read the header */ - ldns_buffer_read(pkt, &msg->id, sizeof(uint16_t)); - msg->flags = ldns_buffer_read_u16(pkt); - msg->qdcount = ldns_buffer_read_u16(pkt); - msg->ancount = ldns_buffer_read_u16(pkt); - msg->nscount = ldns_buffer_read_u16(pkt); - msg->arcount = ldns_buffer_read_u16(pkt); + sldns_buffer_read(pkt, &msg->id, sizeof(uint16_t)); + msg->flags = sldns_buffer_read_u16(pkt); + msg->qdcount = sldns_buffer_read_u16(pkt); + msg->ancount = sldns_buffer_read_u16(pkt); + msg->nscount = sldns_buffer_read_u16(pkt); + msg->arcount = sldns_buffer_read_u16(pkt); if(msg->qdcount > 1) return LDNS_RCODE_FORMERR; if((ret = parse_query_section(pkt, msg)) != 0) @@ -917,13 +920,13 @@ parse_packet(ldns_buffer* pkt, struct msg_parse* msg, struct regional* region) if((ret = parse_section(pkt, msg, region, LDNS_SECTION_AUTHORITY, msg->nscount, &msg->ns_rrsets)) != 0) return ret; - if(ldns_buffer_remaining(pkt) == 0 && msg->arcount == 1) { + if(sldns_buffer_remaining(pkt) == 0 && msg->arcount == 1) { /* BIND accepts leniently that an EDNS record is missing. * so, we do too. */ } else if((ret = parse_section(pkt, msg, region, LDNS_SECTION_ADDITIONAL, msg->arcount, &msg->ar_rrsets)) != 0) return ret; - /* if(ldns_buffer_remaining(pkt) > 0) { */ + /* if(sldns_buffer_remaining(pkt) > 0) { */ /* there is spurious data at end of packet. ignore */ /* } */ msg->rrset_count = msg->an_rrsets + msg->ns_rrsets + msg->ar_rrsets; @@ -981,23 +984,23 @@ parse_extract_edns(struct msg_parse* msg, struct edns_data* edns) edns->edns_present = 1; edns->ext_rcode = found->rr_last->ttl_data[0]; edns->edns_version = found->rr_last->ttl_data[1]; - edns->bits = ldns_read_uint16(&found->rr_last->ttl_data[2]); + edns->bits = sldns_read_uint16(&found->rr_last->ttl_data[2]); edns->udp_size = ntohs(found->rrset_class); /* ignore rdata and rrsigs */ return 0; } int -parse_edns_from_pkt(ldns_buffer* pkt, struct edns_data* edns) +parse_edns_from_pkt(sldns_buffer* pkt, struct edns_data* edns) { - log_assert(LDNS_QDCOUNT(ldns_buffer_begin(pkt)) == 1); - log_assert(LDNS_ANCOUNT(ldns_buffer_begin(pkt)) == 0); - log_assert(LDNS_NSCOUNT(ldns_buffer_begin(pkt)) == 0); + log_assert(LDNS_QDCOUNT(sldns_buffer_begin(pkt)) == 1); + log_assert(LDNS_ANCOUNT(sldns_buffer_begin(pkt)) == 0); + log_assert(LDNS_NSCOUNT(sldns_buffer_begin(pkt)) == 0); /* check edns section is present */ - if(LDNS_ARCOUNT(ldns_buffer_begin(pkt)) > 1) { + if(LDNS_ARCOUNT(sldns_buffer_begin(pkt)) > 1) { return LDNS_RCODE_FORMERR; } - if(LDNS_ARCOUNT(ldns_buffer_begin(pkt)) == 0) { + if(LDNS_ARCOUNT(sldns_buffer_begin(pkt)) == 0) { memset(edns, 0, sizeof(*edns)); edns->udp_size = 512; return 0; @@ -1005,15 +1008,15 @@ parse_edns_from_pkt(ldns_buffer* pkt, struct edns_data* edns) /* domain name must be the root of length 1. */ if(pkt_dname_len(pkt) != 1) return LDNS_RCODE_FORMERR; - if(ldns_buffer_remaining(pkt) < 10) /* type, class, ttl, rdatalen */ + if(sldns_buffer_remaining(pkt) < 10) /* type, class, ttl, rdatalen */ return LDNS_RCODE_FORMERR; - if(ldns_buffer_read_u16(pkt) != LDNS_RR_TYPE_OPT) + if(sldns_buffer_read_u16(pkt) != LDNS_RR_TYPE_OPT) return LDNS_RCODE_FORMERR; edns->edns_present = 1; - edns->udp_size = ldns_buffer_read_u16(pkt); /* class is udp size */ - edns->ext_rcode = ldns_buffer_read_u8(pkt); /* ttl used for bits */ - edns->edns_version = ldns_buffer_read_u8(pkt); - edns->bits = ldns_buffer_read_u16(pkt); + edns->udp_size = sldns_buffer_read_u16(pkt); /* class is udp size */ + edns->ext_rcode = sldns_buffer_read_u8(pkt); /* ttl used for bits */ + edns->edns_version = sldns_buffer_read_u8(pkt); + edns->bits = sldns_buffer_read_u16(pkt); /* ignore rdata and rrsigs */ return 0; } diff --git a/util/data/msgparse.h b/util/data/msgparse.h index 83d2aaaa6ea7..221a45aadd7b 100644 --- a/util/data/msgparse.h +++ b/util/data/msgparse.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file @@ -63,7 +63,9 @@ #ifndef UTIL_DATA_MSGPARSE_H #define UTIL_DATA_MSGPARSE_H #include "util/storage/lruhash.h" -#include <ldns/packet.h> +#include "ldns/pkthdr.h" +#include "ldns/rrdef.h" +struct sldns_buffer; struct rrset_parse; struct rr_parse; struct regional; @@ -137,7 +139,7 @@ struct rrset_parse { /** which section was it found in: one of * LDNS_SECTION_ANSWER, LDNS_SECTION_AUTHORITY, LDNS_SECTION_ADDITIONAL */ - ldns_pkt_section section; + sldns_pkt_section section; /** start of (possibly compressed) dname in packet */ uint8_t* dname; /** length of the dname uncompressed wireformat */ @@ -219,7 +221,7 @@ struct edns_data { * @param rdf: the rdf type from the descriptor. * @return: size in octets. 0 on failure. */ -size_t get_rdf_size(ldns_rdf_type rdf); +size_t get_rdf_size(sldns_rdf_type rdf); /** * Parse the packet. @@ -229,7 +231,7 @@ size_t get_rdf_size(ldns_rdf_type rdf); * @param region: how to alloc results. * @return: 0 if OK, or rcode on error. */ -int parse_packet(ldns_buffer* pkt, struct msg_parse* msg, +int parse_packet(struct sldns_buffer* pkt, struct msg_parse* msg, struct regional* region); /** @@ -259,7 +261,7 @@ int parse_extract_edns(struct msg_parse* msg, struct edns_data* edns); * @return: 0 on success, or an RCODE on error. * RCODE formerr if OPT is badly formatted and so on. */ -int parse_edns_from_pkt(ldns_buffer* pkt, struct edns_data* edns); +int parse_edns_from_pkt(struct sldns_buffer* pkt, struct edns_data* edns); /** * Calculate hash value for rrset in packet. @@ -270,7 +272,7 @@ int parse_edns_from_pkt(ldns_buffer* pkt, struct edns_data* edns); * @param rrset_flags: rrset flags (same as packed_rrset flags). * @return hash value */ -hashvalue_t pkt_hash_rrset(ldns_buffer* pkt, uint8_t* dname, uint16_t type, +hashvalue_t pkt_hash_rrset(struct sldns_buffer* pkt, uint8_t* dname, uint16_t type, uint16_t dclass, uint32_t rrset_flags); /** @@ -286,7 +288,7 @@ hashvalue_t pkt_hash_rrset(ldns_buffer* pkt, uint8_t* dname, uint16_t type, * @return NULL or the rrset_parse if found. */ struct rrset_parse* msgparse_hashtable_lookup(struct msg_parse* msg, - ldns_buffer* pkt, hashvalue_t h, uint32_t rrset_flags, + struct sldns_buffer* pkt, hashvalue_t h, uint32_t rrset_flags, uint8_t* dname, size_t dnamelen, uint16_t type, uint16_t dclass); /** diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 004d6c928f57..cfdf3fe11031 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -40,7 +40,6 @@ */ #include "config.h" -#include <ldns/ldns.h> #include "util/data/msgreply.h" #include "util/storage/lookup3.h" #include "util/log.h" @@ -51,6 +50,8 @@ #include "util/regional.h" #include "util/data/msgparse.h" #include "util/data/msgencode.h" +#include "ldns/sbuffer.h" +#include "ldns/wire2str.h" /** MAX TTL default for messages and rrsets */ time_t MAX_TTL = 3600 * 24 * 10; /* ten days */ @@ -59,7 +60,7 @@ time_t MIN_TTL = 0; /** allocate qinfo, return 0 on error */ static int -parse_create_qinfo(ldns_buffer* pkt, struct msg_parse* msg, +parse_create_qinfo(sldns_buffer* pkt, struct msg_parse* msg, struct query_info* qinf, struct regional* region) { if(msg->qname) { @@ -153,13 +154,13 @@ repinfo_alloc_rrset_keys(struct reply_info* rep, struct alloc_cache* alloc, /** do the rdata copy */ static int -rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, +rdata_copy(sldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, struct rr_parse* rr, time_t* rr_ttl, uint16_t type) { uint16_t pkt_len; - const ldns_rr_descriptor* desc; + const sldns_rr_descriptor* desc; - *rr_ttl = ldns_read_uint32(rr->ttl_data); + *rr_ttl = sldns_read_uint32(rr->ttl_data); /* RFC 2181 Section 8. if msb of ttl is set treat as if zero. */ if(*rr_ttl & 0x80000000U) *rr_ttl = 0; @@ -174,18 +175,18 @@ rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, return 1; } - ldns_buffer_set_position(pkt, (size_t) - (rr->ttl_data - ldns_buffer_begin(pkt) + sizeof(uint32_t))); + sldns_buffer_set_position(pkt, (size_t) + (rr->ttl_data - sldns_buffer_begin(pkt) + sizeof(uint32_t))); /* insert decompressed size into rdata len stored in memory */ /* -2 because rdatalen bytes are not included. */ pkt_len = htons(rr->size - 2); memmove(to, &pkt_len, sizeof(uint16_t)); to += 2; /* read packet rdata len */ - pkt_len = ldns_buffer_read_u16(pkt); - if(ldns_buffer_remaining(pkt) < pkt_len) + pkt_len = sldns_buffer_read_u16(pkt); + if(sldns_buffer_remaining(pkt) < pkt_len) return 0; - desc = ldns_rr_descript(type); + desc = sldns_rr_descript(type); if(pkt_len > 0 && desc && desc->_dname_count > 0) { int count = (int)desc->_dname_count; int rdf = 0; @@ -195,25 +196,25 @@ rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, while(pkt_len > 0 && count) { switch(desc->_wireformat[rdf]) { case LDNS_RDF_TYPE_DNAME: - oldpos = ldns_buffer_position(pkt); + oldpos = sldns_buffer_position(pkt); dname_pkt_copy(pkt, to, - ldns_buffer_current(pkt)); + sldns_buffer_current(pkt)); to += pkt_dname_len(pkt); - pkt_len -= ldns_buffer_position(pkt)-oldpos; + pkt_len -= sldns_buffer_position(pkt)-oldpos; count--; len = 0; break; case LDNS_RDF_TYPE_STR: - len = ldns_buffer_current(pkt)[0] + 1; + len = sldns_buffer_current(pkt)[0] + 1; break; default: len = get_rdf_size(desc->_wireformat[rdf]); break; } if(len) { - memmove(to, ldns_buffer_current(pkt), len); + memmove(to, sldns_buffer_current(pkt), len); to += len; - ldns_buffer_skip(pkt, (ssize_t)len); + sldns_buffer_skip(pkt, (ssize_t)len); log_assert(len <= pkt_len); pkt_len -= len; } @@ -222,14 +223,14 @@ rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, } /* copy remaining rdata */ if(pkt_len > 0) - memmove(to, ldns_buffer_current(pkt), pkt_len); + memmove(to, sldns_buffer_current(pkt), pkt_len); return 1; } /** copy over the data into packed rrset */ static int -parse_rr_copy(ldns_buffer* pkt, struct rrset_parse* pset, +parse_rr_copy(sldns_buffer* pkt, struct rrset_parse* pset, struct packed_rrset_data* data) { size_t i; @@ -272,7 +273,7 @@ parse_rr_copy(ldns_buffer* pkt, struct rrset_parse* pset, /** create rrset return 0 on failure */ static int -parse_create_rrset(ldns_buffer* pkt, struct rrset_parse* pset, +parse_create_rrset(sldns_buffer* pkt, struct rrset_parse* pset, struct packed_rrset_data** data, struct regional* region) { /* allocate */ @@ -332,7 +333,7 @@ get_rrset_trust(struct msg_parse* msg, struct rrset_parse* rrset) } int -parse_copy_decompress_rrset(ldns_buffer* pkt, struct msg_parse* msg, +parse_copy_decompress_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct rrset_parse *pset, struct regional* region, struct ub_packed_rrset_key* pk) { @@ -370,7 +371,7 @@ parse_copy_decompress_rrset(ldns_buffer* pkt, struct msg_parse* msg, * @return 0 on failure. */ static int -parse_copy_decompress(ldns_buffer* pkt, struct msg_parse* msg, +parse_copy_decompress(sldns_buffer* pkt, struct msg_parse* msg, struct reply_info* rep, struct regional* region) { size_t i; @@ -397,7 +398,7 @@ parse_copy_decompress(ldns_buffer* pkt, struct msg_parse* msg, } int -parse_create_msg(ldns_buffer* pkt, struct msg_parse* msg, +parse_create_msg(sldns_buffer* pkt, struct msg_parse* msg, struct alloc_cache* alloc, struct query_info* qinf, struct reply_info** rep, struct regional* region) { @@ -413,7 +414,7 @@ parse_create_msg(ldns_buffer* pkt, struct msg_parse* msg, return 1; } -int reply_info_parse(ldns_buffer* pkt, struct alloc_cache* alloc, +int reply_info_parse(sldns_buffer* pkt, struct alloc_cache* alloc, struct query_info* qinf, struct reply_info** rep, struct regional* region, struct edns_data* edns) { @@ -428,7 +429,7 @@ int reply_info_parse(ldns_buffer* pkt, struct alloc_cache* alloc, } memset(msg, 0, sizeof(*msg)); - ldns_buffer_set_position(pkt, 0); + sldns_buffer_set_position(pkt, 0); if((ret = parse_packet(pkt, msg, region)) != 0) { return ret; } @@ -496,23 +497,23 @@ reply_info_parsedelete(struct reply_info* rep, struct alloc_cache* alloc) } int -query_info_parse(struct query_info* m, ldns_buffer* query) +query_info_parse(struct query_info* m, sldns_buffer* query) { - uint8_t* q = ldns_buffer_begin(query); + uint8_t* q = sldns_buffer_begin(query); /* minimum size: header + \0 + qtype + qclass */ - if(ldns_buffer_limit(query) < LDNS_HEADER_SIZE + 5) + if(sldns_buffer_limit(query) < LDNS_HEADER_SIZE + 5) return 0; if(LDNS_OPCODE_WIRE(q) != LDNS_PACKET_QUERY || - LDNS_QDCOUNT(q) != 1 || ldns_buffer_position(query) != 0) + LDNS_QDCOUNT(q) != 1 || sldns_buffer_position(query) != 0) return 0; - ldns_buffer_skip(query, LDNS_HEADER_SIZE); - m->qname = ldns_buffer_current(query); + sldns_buffer_skip(query, LDNS_HEADER_SIZE); + m->qname = sldns_buffer_current(query); if((m->qname_len = query_dname_len(query)) == 0) return 0; /* parse error */ - if(ldns_buffer_remaining(query) < 4) + if(sldns_buffer_remaining(query) < 4) return 0; /* need qtype, qclass */ - m->qtype = ldns_buffer_read_u16(query); - m->qclass = ldns_buffer_read_u16(query); + m->qtype = sldns_buffer_read_u16(query); + m->qclass = sldns_buffer_read_u16(query); return 1; } @@ -764,32 +765,23 @@ void log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* rep) { /* not particularly fast but flexible, make wireformat and print */ - ldns_buffer* buf = ldns_buffer_new(65535); + sldns_buffer* buf = sldns_buffer_new(65535); struct regional* region = regional_create(); if(!reply_info_encode(qinfo, rep, 0, rep->flags, buf, 0, region, 65535, 1)) { log_info("%s: log_dns_msg: out of memory", str); } else { - ldns_status s; - ldns_pkt* pkt = NULL; - s = ldns_buffer2pkt_wire(&pkt, buf); - if(s != LDNS_STATUS_OK) { - log_info("%s: log_dns_msg: ldns parse gave: %s", - str, ldns_get_errorstr_by_id(s)); + char* str = sldns_wire2str_pkt(sldns_buffer_begin(buf), + sldns_buffer_limit(buf)); + if(!str) { + log_info("%s: log_dns_msg: ldns tostr failed", str); } else { - ldns_buffer_clear(buf); - s = ldns_pkt2buffer_str(buf, pkt); - if(s != LDNS_STATUS_OK) { - log_info("%s: log_dns_msg: ldns tostr gave: %s", - str, ldns_get_errorstr_by_id(s)); - } else { - log_info("%s %s", - str, (char*)ldns_buffer_begin(buf)); - } + log_info("%s %s", + str, (char*)sldns_buffer_begin(buf)); } - ldns_pkt_free(pkt); + free(str); } - ldns_buffer_free(buf); + sldns_buffer_free(buf); regional_destroy(region); } diff --git a/util/data/msgreply.h b/util/data/msgreply.h index 6087c6b2057c..f920108f952d 100644 --- a/util/data/msgreply.h +++ b/util/data/msgreply.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -43,6 +43,7 @@ #define UTIL_DATA_MSGREPLY_H #include "util/storage/lruhash.h" #include "util/data/packed_rrset.h" +struct sldns_buffer; struct comm_reply; struct alloc_cache; struct iovec; @@ -201,7 +202,7 @@ struct msgreply_entry { * @param query: the wireformat packet query. starts with ID. * @return: 0 on format error. */ -int query_info_parse(struct query_info* m, ldns_buffer* query); +int query_info_parse(struct query_info* m, struct sldns_buffer* query); /** * Parse query reply. @@ -218,7 +219,7 @@ int query_info_parse(struct query_info* m, ldns_buffer* query); * o FORMERR for parse errors. * o SERVFAIL for memory allocation errors. */ -int reply_info_parse(ldns_buffer* pkt, struct alloc_cache* alloc, +int reply_info_parse(struct sldns_buffer* pkt, struct alloc_cache* alloc, struct query_info* qinf, struct reply_info** rep, struct regional* region, struct edns_data* edns); @@ -237,7 +238,7 @@ int reply_info_parse(ldns_buffer* pkt, struct alloc_cache* alloc, * and no rrset_ref array in the reply is built up. * @return 0 if allocation failed. */ -int parse_create_msg(ldns_buffer* pkt, struct msg_parse* msg, +int parse_create_msg(struct sldns_buffer* pkt, struct msg_parse* msg, struct alloc_cache* alloc, struct query_info* qinf, struct reply_info** rep, struct regional* region); @@ -322,7 +323,7 @@ struct reply_info* reply_info_copy(struct reply_info* rep, * Note that TTL will still be relative on return. * @return false on alloc failure. */ -int parse_copy_decompress_rrset(ldns_buffer* pkt, struct msg_parse* msg, +int parse_copy_decompress_rrset(struct sldns_buffer* pkt, struct msg_parse* msg, struct rrset_parse *pset, struct regional* region, struct ub_packed_rrset_key* pk); diff --git a/util/data/packed_rrset.c b/util/data/packed_rrset.c index 1bf2e8f00b81..8074685764b1 100644 --- a/util/data/packed_rrset.c +++ b/util/data/packed_rrset.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -40,7 +40,6 @@ */ #include "config.h" -#include <ldns/wire2host.h> #include "util/data/packed_rrset.h" #include "util/data/dname.h" #include "util/storage/lookup3.h" @@ -48,6 +47,9 @@ #include "util/alloc.h" #include "util/regional.h" #include "util/net_help.h" +#include "ldns/rrdef.h" +#include "ldns/sbuffer.h" +#include "ldns/wire2str.h" void ub_packed_rrset_parsedelete(struct ub_packed_rrset_key* pkey, @@ -205,7 +207,7 @@ get_cname_target(struct ub_packed_rrset_key* rrset, uint8_t** dname, return; if(d->rr_len[0] < 3) /* at least rdatalen + 0byte root label */ return; - len = ldns_read_uint16(d->rr_data[0]); + len = sldns_read_uint16(d->rr_data[0]); if(len != d->rr_len[0] - sizeof(uint16_t)) return; if(dname_valid(d->rr_data[0]+sizeof(uint16_t), len) != len) @@ -266,6 +268,52 @@ void log_rrset_key(enum verbosity_value v, const char* str, ntohs(rrset->rk.type), ntohs(rrset->rk.rrset_class)); } +int packed_rr_to_string(struct ub_packed_rrset_key* rrset, size_t i, + time_t now, char* dest, size_t dest_len) +{ + struct packed_rrset_data* d = (struct packed_rrset_data*)rrset-> + entry.data; + uint8_t rr[65535]; + size_t rlen = rrset->rk.dname_len + 2 + 2 + 4 + d->rr_len[i]; + log_assert(dest_len > 0 && dest); + if(rlen > dest_len) { + dest[0] = 0; + return 0; + } + memmove(rr, rrset->rk.dname, rrset->rk.dname_len); + if(i < d->count) + memmove(rr+rrset->rk.dname_len, &rrset->rk.type, 2); + else sldns_write_uint16(rr+rrset->rk.dname_len, LDNS_RR_TYPE_RRSIG); + memmove(rr+rrset->rk.dname_len+2, &rrset->rk.rrset_class, 2); + sldns_write_uint32(rr+rrset->rk.dname_len+4, + (uint32_t)(d->rr_ttl[i]-now)); + memmove(rr+rrset->rk.dname_len+8, d->rr_data[i], d->rr_len[i]); + if(sldns_wire2str_rr_buf(rr, rlen, dest, dest_len) == -1) { + log_info("rrbuf failure %d %s", (int)d->rr_len[i], dest); + dest[0] = 0; + return 0; + } + return 1; +} + +void log_packed_rrset(enum verbosity_value v, const char* str, + struct ub_packed_rrset_key* rrset) +{ + struct packed_rrset_data* d = (struct packed_rrset_data*)rrset-> + entry.data; + char buf[65535]; + size_t i; + if(verbosity < v) + return; + for(i=0; i<d->count+d->rrsig_count; i++) { + if(!packed_rr_to_string(rrset, i, 0, buf, sizeof(buf))) { + log_info("%s: rr %d wire2str-error", str, (int)i); + } else { + log_info("%s: %s", str, buf); + } + } +} + time_t ub_packed_rrset_ttl(struct ub_packed_rrset_key* key) { @@ -339,150 +387,3 @@ packed_rrset_copy_alloc(struct ub_packed_rrset_key* key, packed_rrset_ttl_add(dd, now); return dk; } - -struct ub_packed_rrset_key* -ub_packed_rrset_heap_key(ldns_rr_list* rrset) -{ - struct ub_packed_rrset_key* k; - ldns_rr* rr; - if(!rrset) - return NULL; - rr = ldns_rr_list_rr(rrset, 0); - if(!rr) - return NULL; - k = (struct ub_packed_rrset_key*)calloc(1, sizeof(*k)); - if(!k) - return NULL; - k->rk.type = htons(ldns_rr_get_type(rr)); - k->rk.rrset_class = htons(ldns_rr_get_class(rr)); - k->rk.dname_len = ldns_rdf_size(ldns_rr_owner(rr)); - k->rk.dname = memdup(ldns_rdf_data(ldns_rr_owner(rr)), - ldns_rdf_size(ldns_rr_owner(rr))); - if(!k->rk.dname) { - free(k); - return NULL; - } - return k; -} - -struct packed_rrset_data* -packed_rrset_heap_data(ldns_rr_list* rrset) -{ - struct packed_rrset_data* data; - size_t count=0, rrsig_count=0, len=0, i, j, total; - uint8_t* nextrdata; - if(!rrset || ldns_rr_list_rr_count(rrset)==0) - return NULL; - /* count sizes */ - for(i=0; i<ldns_rr_list_rr_count(rrset); i++) { - ldns_rr* rr = ldns_rr_list_rr(rrset, i); - if(ldns_rr_get_type(rr) == LDNS_RR_TYPE_RRSIG) - rrsig_count++; - else count++; - for(j=0; j<ldns_rr_rd_count(rr); j++) - len += ldns_rdf_size(ldns_rr_rdf(rr, j)); - len += 2; /* sizeof the rdlength */ - } - - /* allocate */ - total = count + rrsig_count; - len += sizeof(*data) + total*(sizeof(size_t) + sizeof(time_t) + - sizeof(uint8_t*)); - data = (struct packed_rrset_data*)calloc(1, len); - if(!data) - return NULL; - - /* fill it */ - data->ttl = ldns_rr_ttl(ldns_rr_list_rr(rrset, 0)); - data->count = count; - data->rrsig_count = rrsig_count; - data->rr_len = (size_t*)((uint8_t*)data + - sizeof(struct packed_rrset_data)); - data->rr_data = (uint8_t**)&(data->rr_len[total]); - data->rr_ttl = (time_t*)&(data->rr_data[total]); - nextrdata = (uint8_t*)&(data->rr_ttl[total]); - - /* fill out len, ttl, fields */ - for(i=0; i<total; i++) { - ldns_rr* rr = ldns_rr_list_rr(rrset, i); - data->rr_ttl[i] = ldns_rr_ttl(rr); - if(data->rr_ttl[i] < data->ttl) - data->ttl = data->rr_ttl[i]; - data->rr_len[i] = 2; /* the rdlength */ - for(j=0; j<ldns_rr_rd_count(rr); j++) - data->rr_len[i] += ldns_rdf_size(ldns_rr_rdf(rr, j)); - } - - /* fixup rest of ptrs */ - for(i=0; i<total; i++) { - data->rr_data[i] = nextrdata; - nextrdata += data->rr_len[i]; - } - - /* copy data in there */ - for(i=0; i<total; i++) { - ldns_rr* rr = ldns_rr_list_rr(rrset, i); - uint16_t rdlen = htons(data->rr_len[i]-2); - size_t p = sizeof(rdlen); - memmove(data->rr_data[i], &rdlen, p); - for(j=0; j<ldns_rr_rd_count(rr); j++) { - ldns_rdf* rd = ldns_rr_rdf(rr, j); - memmove(data->rr_data[i]+p, ldns_rdf_data(rd), - ldns_rdf_size(rd)); - p += ldns_rdf_size(rd); - } - } - - if(data->rrsig_count && data->count == 0) { - data->count = data->rrsig_count; /* rrset type is RRSIG */ - data->rrsig_count = 0; - } - return data; -} - -/** convert i'th rr to ldns_rr */ -static ldns_rr* -torr(struct ub_packed_rrset_key* k, ldns_buffer* buf, size_t i) -{ - struct packed_rrset_data* d = (struct packed_rrset_data*)k->entry.data; - ldns_rr* rr = NULL; - size_t pos = 0; - ldns_status s; - ldns_buffer_clear(buf); - ldns_buffer_write(buf, k->rk.dname, k->rk.dname_len); - if(i < d->count) - ldns_buffer_write(buf, &k->rk.type, sizeof(uint16_t)); - else ldns_buffer_write_u16(buf, LDNS_RR_TYPE_RRSIG); - ldns_buffer_write(buf, &k->rk.rrset_class, sizeof(uint16_t)); - ldns_buffer_write_u32(buf, d->rr_ttl[i]); - ldns_buffer_write(buf, d->rr_data[i], d->rr_len[i]); - ldns_buffer_flip(buf); - s = ldns_wire2rr(&rr, ldns_buffer_begin(buf), ldns_buffer_limit(buf), - &pos, LDNS_SECTION_ANSWER); - if(s == LDNS_STATUS_OK) - return rr; - return NULL; -} - -ldns_rr_list* -packed_rrset_to_rr_list(struct ub_packed_rrset_key* k, ldns_buffer* buf) -{ - struct packed_rrset_data* d = (struct packed_rrset_data*)k->entry.data; - ldns_rr_list* r = ldns_rr_list_new(); - size_t i; - if(!r) - return NULL; - for(i=0; i<d->count+d->rrsig_count; i++) { - ldns_rr* rr = torr(k, buf, i); - if(!rr) { - ldns_rr_list_deep_free(r); - return NULL; - } - if(!ldns_rr_list_push_rr(r, rr)) { - ldns_rr_free(rr); - ldns_rr_list_deep_free(r); - return NULL; - } - } - return r; -} diff --git a/util/data/packed_rrset.h b/util/data/packed_rrset.h index 9530aa604f12..4b0ef80cd747 100644 --- a/util/data/packed_rrset.h +++ b/util/data/packed_rrset.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -42,7 +42,6 @@ #ifndef UTIL_DATA_PACKED_RRSET_H #define UTIL_DATA_PACKED_RRSET_H #include "util/storage/lruhash.h" -#include <ldns/rr.h> struct alloc_cache; struct regional; @@ -382,6 +381,27 @@ const char* sec_status_to_string(enum sec_status s); void log_rrset_key(enum verbosity_value v, const char* str, struct ub_packed_rrset_key* rrset); +/** + * Convert RR from RRset to string. + * @param rrset: structure with data. + * @param i: index of rr or RRSIG. + * @param now: time that is subtracted from ttl before printout. Can be 0. + * @param dest: destination string buffer. Must be nonNULL. + * @param dest_len: length of dest buffer (>0). + * @return false on failure. + */ +int packed_rr_to_string(struct ub_packed_rrset_key* rrset, size_t i, + time_t now, char* dest, size_t dest_len); + +/** + * Print the string with prefix, one rr per line. + * @param v: at what verbosity level to print this. + * @param str: string of message. + * @param rrset: with name, and rdata, and rrsigs. + */ +void log_packed_rrset(enum verbosity_value v, const char* str, + struct ub_packed_rrset_key* rrset); + /** * Allocate rrset in region - no more locks needed * @param key: a (just from rrset cache looked up) rrset key + valid, @@ -405,30 +425,4 @@ struct ub_packed_rrset_key* packed_rrset_copy_alloc( struct ub_packed_rrset_key* key, struct alloc_cache* alloc, time_t now); -/** - * Create a ub_packed_rrset_key allocated on the heap. - * It therefore does not have the correct ID value, and cannot be used - * inside the cache. It can be used in storage outside of the cache. - * Keys for the cache have to be obtained from alloc.h . - * @param rrset: the ldns rr set. - * @return key allocated or NULL on failure. - */ -struct ub_packed_rrset_key* ub_packed_rrset_heap_key(ldns_rr_list* rrset); - -/** - * Create packed_rrset data on the heap. - * @param rrset: the ldns rr set with the data to copy. - * @return data allocated or NULL on failure. - */ -struct packed_rrset_data* packed_rrset_heap_data(ldns_rr_list* rrset); - -/** - * Convert packed rrset to ldns rr list. - * @param rrset: packed rrset. - * @param buf: scratch buffer. - * @return rr list or NULL on failure. - */ -ldns_rr_list* packed_rrset_to_rr_list(struct ub_packed_rrset_key* rrset, - ldns_buffer* buf); - #endif /* UTIL_DATA_PACKED_RRSET_H */ diff --git a/util/fptr_wlist.c b/util/fptr_wlist.c index 6bb95a5318bf..c8d3e5e9f351 100644 --- a/util/fptr_wlist.c +++ b/util/fptr_wlist.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -104,6 +104,7 @@ fptr_whitelist_comm_timer(void (*fptr)(void*)) { if(fptr == &pending_udp_timer_cb) return 1; else if(fptr == &outnet_tcptimer) return 1; + else if(fptr == &pending_udp_timer_delay_cb) return 1; else if(fptr == &worker_stat_timer_cb) return 1; else if(fptr == &worker_probe_timer_cb) return 1; #ifdef UB_ON_WINDOWS @@ -388,6 +389,7 @@ int fptr_whitelist_mesh_cb(mesh_cb_func_t fptr) { if(fptr == &libworker_fg_done_cb) return 1; else if(fptr == &libworker_bg_done_cb) return 1; + else if(fptr == &libworker_event_done_cb) return 1; else if(fptr == &probe_answer_cb) return 1; return 0; } diff --git a/util/fptr_wlist.h b/util/fptr_wlist.h index d204e9238849..b2925d6755d5 100644 --- a/util/fptr_wlist.h +++ b/util/fptr_wlist.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/iana_ports.inc b/util/iana_ports.inc index 3d607a7d4680..252203033ff6 100644 --- a/util/iana_ports.inc +++ b/util/iana_ports.inc @@ -4418,6 +4418,7 @@ 6350, 6355, 6360, +6363, 6370, 6382, 6389, @@ -4479,6 +4480,7 @@ 6627, 6628, 6633, +6634, 6653, 6657, 6670, @@ -4574,9 +4576,11 @@ 7170, 7171, 7174, +7181, 7200, 7201, 7227, +7235, 7262, 7272, 7273, @@ -4986,6 +4990,7 @@ 10007, 10008, 10009, +10023, 10050, 10051, 10080, @@ -5026,6 +5031,7 @@ 10990, 11000, 11001, +11095, 11106, 11108, 11111, @@ -5046,6 +5052,7 @@ 11371, 11600, 11720, +11723, 11751, 11796, 11876, @@ -5329,6 +5336,8 @@ 34963, 34964, 34980, +35001, +35004, 35355, 36001, 36865, @@ -5385,3 +5394,4 @@ 48129, 48556, 48619, +48653, diff --git a/util/locks.c b/util/locks.c index 425f9b9d4568..509895d02805 100644 --- a/util/locks.c +++ b/util/locks.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/locks.h b/util/locks.h index 91be5c3e26f8..d63e5f03201e 100644 --- a/util/locks.h +++ b/util/locks.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef UTIL_LOCKS_H diff --git a/util/log.c b/util/log.c index 9b2daea3208f..39d3118a0000 100644 --- a/util/log.c +++ b/util/log.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file @@ -40,6 +40,8 @@ #include "config.h" #include "util/log.h" #include "util/locks.h" +#include "ldns/sbuffer.h" +#include <stdarg.h> #ifdef HAVE_TIME_H #include <time.h> #endif @@ -228,7 +230,7 @@ log_vmsg(int pri, const char* type, ident, (int)getpid(), tid?*tid:0, type, message); } else #endif - fprintf(logfile, "[%lld] %s[%d:%x] %s: %s\n", (long long)now, + fprintf(logfile, "[" ARG_LL "d] %s[%d:%x] %s: %s\n", (long long)now, ident, (int)getpid(), tid?*tid:0, type, message); #ifdef UB_ON_WINDOWS /* line buffering does not work on windows */ @@ -345,11 +347,11 @@ log_hex(const char* msg, void* data, size_t length) log_hex_f(verbosity, msg, data, length); } -void log_buf(enum verbosity_value level, const char* msg, ldns_buffer* buf) +void log_buf(enum verbosity_value level, const char* msg, sldns_buffer* buf) { if(verbosity < level) return; - log_hex_f(level, msg, ldns_buffer_begin(buf), ldns_buffer_limit(buf)); + log_hex_f(level, msg, sldns_buffer_begin(buf), sldns_buffer_limit(buf)); } #ifdef USE_WINSOCK diff --git a/util/log.h b/util/log.h index 5ba1a0bc4d73..ea283da7b262 100644 --- a/util/log.h +++ b/util/log.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -41,7 +41,7 @@ #ifndef UTIL_LOG_H #define UTIL_LOG_H -#include <ldns/buffer.h> +struct sldns_buffer; /** * verbosity value: @@ -149,13 +149,13 @@ void log_warn(const char* format, ...) ATTR_FORMAT(printf, 1, 2); void log_hex(const char* msg, void* data, size_t length); /** - * Easy alternative for log_hex, takes a ldns_buffer. + * Easy alternative for log_hex, takes a sldns_buffer. * @param level: verbosity level for this message, compared to global * verbosity setting. * @param msg: string desc to print * @param buf: the buffer. */ -void log_buf(enum verbosity_value level, const char* msg, ldns_buffer* buf); +void log_buf(enum verbosity_value level, const char* msg, struct sldns_buffer* buf); /** * Log fatal error message, and exit the current process. diff --git a/util/mini_event.c b/util/mini_event.c index a03edf1b3c7b..40dca375a015 100644 --- a/util/mini_event.c +++ b/util/mini_event.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/util/mini_event.h b/util/mini_event.h index b04419123f8d..58bbc8073938 100644 --- a/util/mini_event.h +++ b/util/mini_event.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/module.c b/util/module.c index b45ec6fc878d..09e276c30152 100644 --- a/util/module.c +++ b/util/module.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file diff --git a/util/module.h b/util/module.h index 3ec25524b03b..dace1cf6ba24 100644 --- a/util/module.h +++ b/util/module.h @@ -21,22 +21,134 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file * * This file contains the interface for DNS handling modules. + * + * The module interface uses the DNS modules as state machines. The + * state machines are activated in sequence to operate on queries. Once + * they are done, the reply is passed back. In the usual setup the mesh + * is the caller of the state machines and once things are done sends replies + * and invokes result callbacks. + * + * The module provides a number of functions, listed in the module_func_block. + * The module is inited and destroyed and memory usage queries, for the + * module as a whole, for entire-module state (such as a cache). And per-query + * functions are called, operate to move the state machine and cleanup of + * the per-query state. + * + * Most per-query state should simply be allocated in the query region. + * This is destroyed at the end of the query. + * + * The module environment contains services and information and caches + * shared by the modules and the rest of the system. It also contains + * function pointers for module-specific tasks (like sending queries). + * + * *** Example module calls for a normal query + * + * In this example, the query does not need recursion, all the other data + * can be found in the cache. This makes the example shorter. + * + * At the start of the program the iterator module is initialised. + * The iterator module sets up its global state, such as donotquery lists + * and private address trees. + * + * A query comes in, and a mesh entry is created for it. The mesh + * starts the resolution process. The validator module is the first + * in the list of modules, and it is started on this new query. The + * operate() function is called. The validator decides it needs not do + * anything yet until there is a result and returns wait_module, that + * causes the next module in the list to be started. + * + * The next module is the iterator. It is started on the passed query and + * decides to perform a lookup. For this simple example, the delegation + * point information is available, and all the iterator wants to do is + * send a UDP query. The iterator uses env.send_query() to send the + * query. Then the iterator suspends (returns from the operate call). + * + * When the UDP reply comes back (and on errors and timeouts), the + * operate function is called for the query, on the iterator module, + * with the event that there is a reply. The iterator decides that this + * is enough, the work is done. It returns the value finished from the + * operate call, which causes the previous module to be started. + * + * The previous module, the validator module, is started with the event + * that the iterator module is done. The validator decides to validate + * the query. Once it is done (which could take recursive lookups, but + * in this example no recursive lookups are needed), it returns from the + * operate function with finished. + * + * There is no previous module from the validator module, and the mesh + * takes this to mean that the query is finally done. The mesh invokes + * callbacks and sends packets to queriers. + * + * If other modules had been waiting (recursively) on the answer to this + * query, then the mesh will tell them about it. It calls the inform_super + * routine on all the waiting modules, and once that is done it calls all of + * them with the operate() call. During inform_super the query that is done + * still exists and information can be copied from it (but the module should + * not really re-entry codepoints and services). During the operate call + * the modules can use stored state to continue operation with the results. + * (network buffers are used to contain the answer packet during the + * inform_super phase, but after that the network buffers will be cleared + * of their contents so that other tasks can be performed). + * + * *** Example module calls for recursion + * + * A module is called in operate, and it decides that it wants to perform + * recursion. That is, it wants the full state-machine-list to operate on + * a different query. It calls env.attach_sub() to create a new query state. + * The routine returns the newly created state, and potentially the module + * can edit the module-states for the newly created query (i.e. pass along + * some information, like delegation points). The module then suspends, + * returns from the operate routine. + * + * The mesh meanwhile will have the newly created query (or queries) on + * a waiting list, and will call operate() on this query (or queries). + * It starts again at the start of the module list for them. The query + * (or queries) continue to operate their state machines, until they are + * done. When they are done the mesh calls inform_super on the module that + * wanted the recursion. After that the mesh calls operate() on the module + * that wanted to do the recursion, and during this phase the module could, + * for example, decide to create more recursions. + * + * If the module decides it no longer wants the recursive information + * it can call detach_subs. Those queries will still run to completion, + * potentially filling the cache with information. Inform_super is not + * called any more. + * + * The iterator module will fetch items from the cache, so a recursion + * attempt may complete very quickly if the item is in cache. The calling + * module has to wait for completion or eventual timeout. A recursive query + * that times out returns a servfail rcode (servfail is also returned for + * other errors during the lookup). + * + * Results are passed in the qstate, the rcode member is used to pass + * errors without requiring memory allocation, so that the code can continue + * in out-of-memory conditions. If the rcode member is 0 (NOERROR) then + * the dns_msg entry contains a filled out message. This message may + * also contain an rcode that is nonzero, but in this case additional + * information (query, additional) can be passed along. + * + * The rcode and dns_msg are used to pass the result from the the rightmost + * module towards the leftmost modules and then towards the user. + * + * If you want to avoid recursion-cycles where queries need other queries + * that need the first one, use detect_cycle() to see if that will happen. + * */ #ifndef UTIL_MODULE_H @@ -44,6 +156,7 @@ #include "util/storage/lruhash.h" #include "util/data/msgreply.h" #include "util/data/msgparse.h" +struct sldns_buffer; struct alloc_cache; struct rrset_cache; struct key_cache; @@ -176,7 +289,7 @@ struct module_env { /** region for temporary usage. May be cleared after operate() call. */ struct regional* scratch; /** buffer for temporary usage. May be cleared after operate() call. */ - ldns_buffer* scratch_buffer; + struct sldns_buffer* scratch_buffer; /** internal data for daemon - worker thread. */ struct worker* worker; /** mesh area with query state dependencies */ diff --git a/util/net_help.c b/util/net_help.c index 64bd876dcbb1..7f6daab4a1b4 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file @@ -38,12 +38,13 @@ */ #include "config.h" -#include <ldns/ldns.h> #include "util/net_help.h" #include "util/log.h" #include "util/data/dname.h" #include "util/module.h" #include "util/regional.h" +#include "ldns/parseutil.h" +#include "ldns/wire2str.h" #include <fcntl.h> #ifdef HAVE_OPENSSL_SSL_H #include <openssl/ssl.h> @@ -159,7 +160,7 @@ log_addr(enum verbosity_value v, const char* str, default: break; } if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) { - strncpy(dest, "(inet_ntop error)", sizeof(dest)); + (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest)); } dest[sizeof(dest)-1] = 0; port = ntohs(((struct sockaddr_in*)addr)->sin_port); @@ -180,7 +181,7 @@ extstrtoaddr(const char* str, struct sockaddr_storage* addr, if(s-str >= MAX_ADDR_STRLEN) { return 0; } - strncpy(buf, str, MAX_ADDR_STRLEN); + (void)strlcpy(buf, str, sizeof(buf)); buf[s-str] = 0; port = atoi(s+1); if(port == 0 && strcmp(s+1,"0")!=0) { @@ -210,7 +211,7 @@ ipstrtoaddr(const char* ip, int port, struct sockaddr_storage* addr, if((s=strchr(ip, '%'))) { /* ip6%interface, rfc 4007 */ if(s-ip >= MAX_ADDR_STRLEN) return 0; - strncpy(buf, ip, MAX_ADDR_STRLEN); + (void)strlcpy(buf, ip, sizeof(buf)); buf[s-ip]=0; sa->sin6_scope_id = (uint32_t)atoi(s+1); ip = buf; @@ -280,15 +281,15 @@ log_nametypeclass(enum verbosity_value v, const char* str, uint8_t* name, else if(type == LDNS_RR_TYPE_MAILB) ts = "MAILB"; else if(type == LDNS_RR_TYPE_MAILA) ts = "MAILA"; else if(type == LDNS_RR_TYPE_ANY) ts = "ANY"; - else if(ldns_rr_descript(type) && ldns_rr_descript(type)->_name) - ts = ldns_rr_descript(type)->_name; + else if(sldns_rr_descript(type) && sldns_rr_descript(type)->_name) + ts = sldns_rr_descript(type)->_name; else { snprintf(t, sizeof(t), "TYPE%d", (int)type); ts = t; } - if(ldns_lookup_by_id(ldns_rr_classes, (int)dclass) && - ldns_lookup_by_id(ldns_rr_classes, (int)dclass)->name) - cs = ldns_lookup_by_id(ldns_rr_classes, (int)dclass)->name; + if(sldns_lookup_by_id(sldns_rr_classes, (int)dclass) && + sldns_lookup_by_id(sldns_rr_classes, (int)dclass)->name) + cs = sldns_lookup_by_id(sldns_rr_classes, (int)dclass)->name; else { snprintf(c, sizeof(c), "CLASS%d", (int)dclass); cs = c; @@ -316,7 +317,7 @@ void log_name_addr(enum verbosity_value v, const char* str, uint8_t* zone, default: break; } if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) { - strncpy(dest, "(inet_ntop error)", sizeof(dest)); + (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest)); } dest[sizeof(dest)-1] = 0; port = ntohs(((struct sockaddr_in*)addr)->sin_port); diff --git a/util/net_help.h b/util/net_help.h index 05b5087b4129..b92dd40e85d9 100644 --- a/util/net_help.h +++ b/util/net_help.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/netevent.c b/util/netevent.c index 193fa8714a7e..189aaa4e4ea0 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -39,11 +39,12 @@ * This file contains event notification functions. */ #include "config.h" -#include <ldns/wire2host.h> #include "util/netevent.h" #include "util/log.h" #include "util/net_help.h" #include "util/fptr_wlist.h" +#include "ldns/pkthdr.h" +#include "ldns/sbuffer.h" #ifdef HAVE_OPENSSL_SSL_H #include <openssl/ssl.h> #endif @@ -234,6 +235,23 @@ comm_base_create(int sigs) return b; } +struct comm_base* +comm_base_create_event(struct event_base* base) +{ + struct comm_base* b = (struct comm_base*)calloc(1, + sizeof(struct comm_base)); + if(!b) + return NULL; + b->eb = (struct internal_base*)calloc(1, sizeof(struct internal_base)); + if(!b->eb) { + free(b); + return NULL; + } + b->eb->base = base; + comm_base_now(b); + return b; +} + void comm_base_delete(struct comm_base* b) { @@ -258,6 +276,21 @@ comm_base_delete(struct comm_base* b) } void +comm_base_delete_no_base(struct comm_base* b) +{ + if(!b) + return; + if(b->eb->slow_accept_enabled) { + if(event_del(&b->eb->slow_accept) != 0) { + log_err("could not event_del slow_accept"); + } + } + b->eb->base = NULL; + free(b->eb); + free(b); +} + +void comm_base_timept(struct comm_base* b, time_t** tt, struct timeval** tv) { *tt = &b->eb->secs; @@ -346,18 +379,18 @@ int tcp_connect_errno_needs_log(struct sockaddr* addr, socklen_t addrlen) /* send a UDP reply */ int -comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet, +comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, struct sockaddr* addr, socklen_t addrlen) { ssize_t sent; log_assert(c->fd != -1); #ifdef UNBOUND_DEBUG - if(ldns_buffer_remaining(packet) == 0) + if(sldns_buffer_remaining(packet) == 0) log_err("error: send empty UDP packet"); #endif log_assert(addr && addrlen > 0); - sent = sendto(c->fd, (void*)ldns_buffer_begin(packet), - ldns_buffer_remaining(packet), 0, + sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), + sldns_buffer_remaining(packet), 0, addr, addrlen); if(sent == -1) { if(!udp_send_errno_needs_log(addr, addrlen)) @@ -371,9 +404,9 @@ comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet, log_addr(VERB_OPS, "remote address is", (struct sockaddr_storage*)addr, addrlen); return 0; - } else if((size_t)sent != ldns_buffer_remaining(packet)) { + } else if((size_t)sent != sldns_buffer_remaining(packet)) { log_err("sent %d in place of %d bytes", - (int)sent, (int)ldns_buffer_remaining(packet)); + (int)sent, (int)sldns_buffer_remaining(packet)); return 0; } return 1; @@ -391,7 +424,7 @@ static void p_ancil(const char* str, struct comm_reply* r) char buf[1024]; if(inet_ntop(AF_INET6, &r->pktinfo.v6info.ipi6_addr, buf, (socklen_t)sizeof(buf)) == 0) { - strncpy(buf, "(inet_ntop error)", sizeof(buf)); + (void)strlcpy(buf, "(inet_ntop error)", sizeof(buf)); } buf[sizeof(buf)-1]=0; log_info("%s: %s %d", str, buf, r->pktinfo.v6info.ipi6_ifindex); @@ -400,13 +433,13 @@ static void p_ancil(const char* str, struct comm_reply* r) char buf1[1024], buf2[1024]; if(inet_ntop(AF_INET, &r->pktinfo.v4info.ipi_addr, buf1, (socklen_t)sizeof(buf1)) == 0) { - strncpy(buf1, "(inet_ntop error)", sizeof(buf1)); + (void)strlcpy(buf1, "(inet_ntop error)", sizeof(buf1)); } buf1[sizeof(buf1)-1]=0; #ifdef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST if(inet_ntop(AF_INET, &r->pktinfo.v4info.ipi_spec_dst, buf2, (socklen_t)sizeof(buf2)) == 0) { - strncpy(buf2, "(inet_ntop error)", sizeof(buf2)); + (void)strlcpy(buf2, "(inet_ntop error)", sizeof(buf2)); } buf2[sizeof(buf2)-1]=0; #else @@ -418,7 +451,7 @@ static void p_ancil(const char* str, struct comm_reply* r) char buf1[1024]; if(inet_ntop(AF_INET, &r->pktinfo.v4addr, buf1, (socklen_t)sizeof(buf1)) == 0) { - strncpy(buf1, "(inet_ntop error)", sizeof(buf1)); + (void)strlcpy(buf1, "(inet_ntop error)", sizeof(buf1)); } buf1[sizeof(buf1)-1]=0; log_info("%s: %s", str, buf1); @@ -429,7 +462,7 @@ static void p_ancil(const char* str, struct comm_reply* r) /** send a UDP reply over specified interface*/ static int -comm_point_send_udp_msg_if(struct comm_point *c, ldns_buffer* packet, +comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet, struct sockaddr* addr, socklen_t addrlen, struct comm_reply* r) { #if defined(AF_INET6) && defined(IPV6_PKTINFO) && defined(HAVE_SENDMSG) @@ -443,15 +476,15 @@ comm_point_send_udp_msg_if(struct comm_point *c, ldns_buffer* packet, log_assert(c->fd != -1); #ifdef UNBOUND_DEBUG - if(ldns_buffer_remaining(packet) == 0) + if(sldns_buffer_remaining(packet) == 0) log_err("error: send empty UDP packet"); #endif log_assert(addr && addrlen > 0); msg.msg_name = addr; msg.msg_namelen = addrlen; - iov[0].iov_base = ldns_buffer_begin(packet); - iov[0].iov_len = ldns_buffer_remaining(packet); + iov[0].iov_base = sldns_buffer_begin(packet); + iov[0].iov_len = sldns_buffer_remaining(packet); msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = control; @@ -511,9 +544,9 @@ comm_point_send_udp_msg_if(struct comm_point *c, ldns_buffer* packet, log_addr(VERB_OPS, "remote address is", (struct sockaddr_storage*)addr, addrlen); return 0; - } else if((size_t)sent != ldns_buffer_remaining(packet)) { + } else if((size_t)sent != sldns_buffer_remaining(packet)) { log_err("sent %d in place of %d bytes", - (int)sent, (int)ldns_buffer_remaining(packet)); + (int)sent, (int)sldns_buffer_remaining(packet)); return 0; } return 1; @@ -550,14 +583,14 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) log_assert(rep.c && rep.c->buffer && rep.c->fd == fd); comm_base_now(rep.c->ev->base); for(i=0; i<NUM_UDP_PER_SELECT; i++) { - ldns_buffer_clear(rep.c->buffer); + sldns_buffer_clear(rep.c->buffer); rep.addrlen = (socklen_t)sizeof(rep.addr); log_assert(fd != -1); - log_assert(ldns_buffer_remaining(rep.c->buffer) > 0); + log_assert(sldns_buffer_remaining(rep.c->buffer) > 0); msg.msg_name = &rep.addr; msg.msg_namelen = (socklen_t)sizeof(rep.addr); - iov[0].iov_base = ldns_buffer_begin(rep.c->buffer); - iov[0].iov_len = ldns_buffer_remaining(rep.c->buffer); + iov[0].iov_base = sldns_buffer_begin(rep.c->buffer); + iov[0].iov_len = sldns_buffer_remaining(rep.c->buffer); msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = ancil; @@ -573,8 +606,8 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) return; } rep.addrlen = msg.msg_namelen; - ldns_buffer_skip(rep.c->buffer, rcv); - ldns_buffer_flip(rep.c->buffer); + sldns_buffer_skip(rep.c->buffer, rcv); + sldns_buffer_flip(rep.c->buffer); rep.srctype = 0; #ifndef S_SPLINT_S for(cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; @@ -638,12 +671,12 @@ comm_point_udp_callback(int fd, short event, void* arg) log_assert(rep.c && rep.c->buffer && rep.c->fd == fd); comm_base_now(rep.c->ev->base); for(i=0; i<NUM_UDP_PER_SELECT; i++) { - ldns_buffer_clear(rep.c->buffer); + sldns_buffer_clear(rep.c->buffer); rep.addrlen = (socklen_t)sizeof(rep.addr); log_assert(fd != -1); - log_assert(ldns_buffer_remaining(rep.c->buffer) > 0); - rcv = recvfrom(fd, (void*)ldns_buffer_begin(rep.c->buffer), - ldns_buffer_remaining(rep.c->buffer), 0, + log_assert(sldns_buffer_remaining(rep.c->buffer) > 0); + rcv = recvfrom(fd, (void*)sldns_buffer_begin(rep.c->buffer), + sldns_buffer_remaining(rep.c->buffer), 0, (struct sockaddr*)&rep.addr, &rep.addrlen); if(rcv == -1) { #ifndef USE_WINSOCK @@ -659,8 +692,8 @@ comm_point_udp_callback(int fd, short event, void* arg) #endif return; } - ldns_buffer_skip(rep.c->buffer, rcv); - ldns_buffer_flip(rep.c->buffer); + sldns_buffer_skip(rep.c->buffer, rcv); + sldns_buffer_flip(rep.c->buffer); rep.srctype = 0; fptr_ok(fptr_whitelist_comm_point(rep.c->callback)); if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) { @@ -680,7 +713,7 @@ setup_tcp_handler(struct comm_point* c, int fd) { log_assert(c->type == comm_tcp); log_assert(c->fd == -1); - ldns_buffer_clear(c->buffer); + sldns_buffer_clear(c->buffer); c->tcp_is_reading = 1; c->tcp_byte_count = 0; comm_point_start_listening(c, fd, TCP_QUERY_TIMEOUT); @@ -882,7 +915,7 @@ static void tcp_callback_writer(struct comm_point* c) { log_assert(c->type == comm_tcp); - ldns_buffer_clear(c->buffer); + sldns_buffer_clear(c->buffer); if(c->tcp_do_toggle_rw) c->tcp_is_reading = 1; c->tcp_byte_count = 0; @@ -896,7 +929,7 @@ static void tcp_callback_reader(struct comm_point* c) { log_assert(c->type == comm_tcp || c->type == comm_local); - ldns_buffer_flip(c->buffer); + sldns_buffer_flip(c->buffer); if(c->tcp_do_toggle_rw) c->tcp_is_reading = 0; c->tcp_byte_count = 0; @@ -989,7 +1022,7 @@ ssl_handle_read(struct comm_point* c) if(c->tcp_byte_count < sizeof(uint16_t)) { /* read length bytes */ ERR_clear_error(); - if((r=SSL_read(c->ssl, (void*)ldns_buffer_at(c->buffer, + if((r=SSL_read(c->ssl, (void*)sldns_buffer_at(c->buffer, c->tcp_byte_count), (int)(sizeof(uint16_t) - c->tcp_byte_count))) <= 0) { int want = SSL_get_error(c->ssl, r); @@ -1013,24 +1046,24 @@ ssl_handle_read(struct comm_point* c) c->tcp_byte_count += r; if(c->tcp_byte_count != sizeof(uint16_t)) return 1; - if(ldns_buffer_read_u16_at(c->buffer, 0) > - ldns_buffer_capacity(c->buffer)) { + if(sldns_buffer_read_u16_at(c->buffer, 0) > + sldns_buffer_capacity(c->buffer)) { verbose(VERB_QUERY, "ssl: dropped larger than buffer"); return 0; } - ldns_buffer_set_limit(c->buffer, - ldns_buffer_read_u16_at(c->buffer, 0)); - if(ldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) { + sldns_buffer_set_limit(c->buffer, + sldns_buffer_read_u16_at(c->buffer, 0)); + if(sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) { verbose(VERB_QUERY, "ssl: dropped bogus too short."); return 0; } verbose(VERB_ALGO, "Reading ssl tcp query of length %d", - (int)ldns_buffer_limit(c->buffer)); + (int)sldns_buffer_limit(c->buffer)); } - log_assert(ldns_buffer_remaining(c->buffer) > 0); + log_assert(sldns_buffer_remaining(c->buffer) > 0); ERR_clear_error(); - r = SSL_read(c->ssl, (void*)ldns_buffer_current(c->buffer), - (int)ldns_buffer_remaining(c->buffer)); + r = SSL_read(c->ssl, (void*)sldns_buffer_current(c->buffer), + (int)sldns_buffer_remaining(c->buffer)); if(r <= 0) { int want = SSL_get_error(c->ssl, r); if(want == SSL_ERROR_ZERO_RETURN) { @@ -1050,8 +1083,8 @@ ssl_handle_read(struct comm_point* c) log_crypto_err("could not SSL_read"); return 0; } - ldns_buffer_skip(c->buffer, (ssize_t)r); - if(ldns_buffer_remaining(c->buffer) <= 0) { + sldns_buffer_skip(c->buffer, (ssize_t)r); + if(sldns_buffer_remaining(c->buffer) <= 0) { tcp_callback_reader(c); } return 1; @@ -1076,7 +1109,7 @@ ssl_handle_write(struct comm_point* c) /* ignore return, if fails we may simply block */ (void)SSL_set_mode(c->ssl, SSL_MODE_ENABLE_PARTIAL_WRITE); if(c->tcp_byte_count < sizeof(uint16_t)) { - uint16_t len = htons(ldns_buffer_limit(c->buffer)); + uint16_t len = htons(sldns_buffer_limit(c->buffer)); ERR_clear_error(); r = SSL_write(c->ssl, (void*)(((uint8_t*)&len)+c->tcp_byte_count), @@ -1103,17 +1136,17 @@ ssl_handle_write(struct comm_point* c) c->tcp_byte_count += r; if(c->tcp_byte_count < sizeof(uint16_t)) return 1; - ldns_buffer_set_position(c->buffer, c->tcp_byte_count - + sldns_buffer_set_position(c->buffer, c->tcp_byte_count - sizeof(uint16_t)); - if(ldns_buffer_remaining(c->buffer) == 0) { + if(sldns_buffer_remaining(c->buffer) == 0) { tcp_callback_writer(c); return 1; } } - log_assert(ldns_buffer_remaining(c->buffer) > 0); + log_assert(sldns_buffer_remaining(c->buffer) > 0); ERR_clear_error(); - r = SSL_write(c->ssl, (void*)ldns_buffer_current(c->buffer), - (int)ldns_buffer_remaining(c->buffer)); + r = SSL_write(c->ssl, (void*)sldns_buffer_current(c->buffer), + (int)sldns_buffer_remaining(c->buffer)); if(r <= 0) { int want = SSL_get_error(c->ssl, r); if(want == SSL_ERROR_ZERO_RETURN) { @@ -1133,9 +1166,9 @@ ssl_handle_write(struct comm_point* c) log_crypto_err("could not SSL_write"); return 0; } - ldns_buffer_skip(c->buffer, (ssize_t)r); + sldns_buffer_skip(c->buffer, (ssize_t)r); - if(ldns_buffer_remaining(c->buffer) == 0) { + if(sldns_buffer_remaining(c->buffer) == 0) { tcp_callback_writer(c); } return 1; @@ -1173,7 +1206,7 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok) log_assert(fd != -1); if(c->tcp_byte_count < sizeof(uint16_t)) { /* read length bytes */ - r = recv(fd,(void*)ldns_buffer_at(c->buffer,c->tcp_byte_count), + r = recv(fd,(void*)sldns_buffer_at(c->buffer,c->tcp_byte_count), sizeof(uint16_t)-c->tcp_byte_count, 0); if(r == 0) return 0; @@ -1205,25 +1238,25 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok) c->tcp_byte_count += r; if(c->tcp_byte_count != sizeof(uint16_t)) return 1; - if(ldns_buffer_read_u16_at(c->buffer, 0) > - ldns_buffer_capacity(c->buffer)) { + if(sldns_buffer_read_u16_at(c->buffer, 0) > + sldns_buffer_capacity(c->buffer)) { verbose(VERB_QUERY, "tcp: dropped larger than buffer"); return 0; } - ldns_buffer_set_limit(c->buffer, - ldns_buffer_read_u16_at(c->buffer, 0)); + sldns_buffer_set_limit(c->buffer, + sldns_buffer_read_u16_at(c->buffer, 0)); if(!short_ok && - ldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) { + sldns_buffer_limit(c->buffer) < LDNS_HEADER_SIZE) { verbose(VERB_QUERY, "tcp: dropped bogus too short."); return 0; } verbose(VERB_ALGO, "Reading tcp query of length %d", - (int)ldns_buffer_limit(c->buffer)); + (int)sldns_buffer_limit(c->buffer)); } - log_assert(ldns_buffer_remaining(c->buffer) > 0); - r = recv(fd, (void*)ldns_buffer_current(c->buffer), - ldns_buffer_remaining(c->buffer), 0); + log_assert(sldns_buffer_remaining(c->buffer) > 0); + r = recv(fd, (void*)sldns_buffer_current(c->buffer), + sldns_buffer_remaining(c->buffer), 0); if(r == 0) { return 0; } else if(r == -1) { @@ -1247,8 +1280,8 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok) c->repinfo.addrlen); return 0; } - ldns_buffer_skip(c->buffer, r); - if(ldns_buffer_remaining(c->buffer) <= 0) { + sldns_buffer_skip(c->buffer, r); + if(sldns_buffer_remaining(c->buffer) <= 0) { tcp_callback_reader(c); } return 1; @@ -1312,13 +1345,13 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) return ssl_handle_it(c); if(c->tcp_byte_count < sizeof(uint16_t)) { - uint16_t len = htons(ldns_buffer_limit(c->buffer)); + uint16_t len = htons(sldns_buffer_limit(c->buffer)); #ifdef HAVE_WRITEV struct iovec iov[2]; iov[0].iov_base = (uint8_t*)&len + c->tcp_byte_count; iov[0].iov_len = sizeof(uint16_t) - c->tcp_byte_count; - iov[1].iov_base = ldns_buffer_begin(c->buffer); - iov[1].iov_len = ldns_buffer_limit(c->buffer); + iov[1].iov_base = sldns_buffer_begin(c->buffer); + iov[1].iov_len = sldns_buffer_limit(c->buffer); log_assert(iov[0].iov_len > 0); log_assert(iov[1].iov_len > 0); r = writev(fd, iov, 2); @@ -1354,16 +1387,16 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) c->tcp_byte_count += r; if(c->tcp_byte_count < sizeof(uint16_t)) return 1; - ldns_buffer_set_position(c->buffer, c->tcp_byte_count - + sldns_buffer_set_position(c->buffer, c->tcp_byte_count - sizeof(uint16_t)); - if(ldns_buffer_remaining(c->buffer) == 0) { + if(sldns_buffer_remaining(c->buffer) == 0) { tcp_callback_writer(c); return 1; } } - log_assert(ldns_buffer_remaining(c->buffer) > 0); - r = send(fd, (void*)ldns_buffer_current(c->buffer), - ldns_buffer_remaining(c->buffer), 0); + log_assert(sldns_buffer_remaining(c->buffer) > 0); + r = send(fd, (void*)sldns_buffer_current(c->buffer), + sldns_buffer_remaining(c->buffer), 0); if(r == -1) { #ifndef USE_WINSOCK if(errno == EINTR || errno == EAGAIN) @@ -1383,9 +1416,9 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) c->repinfo.addrlen); return 0; } - ldns_buffer_skip(c->buffer, r); + sldns_buffer_skip(c->buffer, r); - if(ldns_buffer_remaining(c->buffer) == 0) { + if(sldns_buffer_remaining(c->buffer) == 0) { tcp_callback_writer(c); } @@ -1468,7 +1501,7 @@ void comm_point_raw_handle_callback(int ATTR_UNUSED(fd), } struct comm_point* -comm_point_create_udp(struct comm_base *base, int fd, ldns_buffer* buffer, +comm_point_create_udp(struct comm_base *base, int fd, sldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg) { struct comm_point* c = (struct comm_point*)calloc(1, @@ -1518,7 +1551,7 @@ comm_point_create_udp(struct comm_base *base, int fd, ldns_buffer* buffer, struct comm_point* comm_point_create_udp_ancil(struct comm_base *base, int fd, - ldns_buffer* buffer, + sldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg) { struct comm_point* c = (struct comm_point*)calloc(1, @@ -1584,7 +1617,7 @@ comm_point_create_tcp_handler(struct comm_base *base, } c->ev->base = base; c->fd = -1; - c->buffer = ldns_buffer_new(bufsize); + c->buffer = sldns_buffer_new(bufsize); if(!c->buffer) { free(c->ev); free(c); @@ -1592,7 +1625,7 @@ comm_point_create_tcp_handler(struct comm_base *base, } c->timeout = (struct timeval*)malloc(sizeof(struct timeval)); if(!c->timeout) { - ldns_buffer_free(c->buffer); + sldns_buffer_free(c->buffer); free(c->ev); free(c); return NULL; @@ -1709,7 +1742,7 @@ comm_point_create_tcp_out(struct comm_base *base, size_t bufsize, } c->ev->base = base; c->fd = -1; - c->buffer = ldns_buffer_new(bufsize); + c->buffer = sldns_buffer_new(bufsize); if(!c->buffer) { free(c->ev); free(c); @@ -1735,7 +1768,7 @@ comm_point_create_tcp_out(struct comm_base *base, size_t bufsize, if(event_base_set(base->eb->base, &c->ev->ev) != 0) { log_err("could not basetset tcpout event"); - ldns_buffer_free(c->buffer); + sldns_buffer_free(c->buffer); free(c->ev); free(c); return NULL; @@ -1761,7 +1794,7 @@ comm_point_create_local(struct comm_base *base, int fd, size_t bufsize, } c->ev->base = base; c->fd = fd; - c->buffer = ldns_buffer_new(bufsize); + c->buffer = sldns_buffer_new(bufsize); if(!c->buffer) { free(c->ev); free(c); @@ -1886,7 +1919,7 @@ comm_point_delete(struct comm_point* c) } free(c->timeout); if(c->type == comm_tcp || c->type == comm_local) - ldns_buffer_free(c->buffer); + sldns_buffer_free(c->buffer); free(c->ev); free(c); } @@ -1998,7 +2031,7 @@ size_t comm_point_get_mem(struct comm_point* c) if(c->timeout) s += sizeof(*c->timeout); if(c->type == comm_tcp || c->type == comm_local) - s += sizeof(*c->buffer) + ldns_buffer_capacity(c->buffer); + s += sizeof(*c->buffer) + sldns_buffer_capacity(c->buffer); if(c->type == comm_tcp_accept) { int i; for(i=0; i<c->max_tcp_count; i++) diff --git a/util/netevent.h b/util/netevent.h index 86fa28569c70..fe28ca5dd75a 100644 --- a/util/netevent.h +++ b/util/netevent.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -60,7 +60,7 @@ #ifndef NET_EVENT_H #define NET_EVENT_H -#include <ldns/buffer.h> +struct sldns_buffer; struct comm_point; struct comm_reply; struct event_base; @@ -149,7 +149,7 @@ struct comm_point { struct timeval* timeout; /** buffer pointer. Either to perthread, or own buffer or NULL */ - ldns_buffer* buffer; + struct sldns_buffer* buffer; /* -------- TCP Handler -------- */ /** Read/Write state for TCP */ @@ -295,6 +295,21 @@ struct comm_signal { struct comm_base* comm_base_create(int sigs); /** + * Create comm base that uses the given event_base (underlying event + * mechanism pointer). + * @param base: underlying lib event base. + * @return: the new comm base. NULL on error. + */ +struct comm_base* comm_base_create_event(struct event_base* base); + +/** + * Delete comm base structure but not the underlying lib event base. + * All comm points must have been deleted. + * @param b: the base to delete. + */ +void comm_base_delete_no_base(struct comm_base* b); + +/** * Destroy a comm base. * All comm points must have been deleted. * @param b: the base to delete. @@ -352,7 +367,7 @@ struct event_base* comm_base_internal(struct comm_base* b); * Sets timeout to NULL. Turns off TCP options. */ struct comm_point* comm_point_create_udp(struct comm_base* base, - int fd, ldns_buffer* buffer, + int fd, struct sldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg); /** @@ -368,7 +383,7 @@ struct comm_point* comm_point_create_udp(struct comm_base* base, * Sets timeout to NULL. Turns off TCP options. */ struct comm_point* comm_point_create_udp_ancil(struct comm_base* base, - int fd, ldns_buffer* buffer, + int fd, struct sldns_buffer* buffer, comm_point_callback_t* callback, void* callback_arg); /** @@ -462,7 +477,7 @@ void comm_point_drop_reply(struct comm_reply* repinfo); * @param addrlen: length of addr. * @return: false on a failure. */ -int comm_point_send_udp_msg(struct comm_point* c, ldns_buffer* packet, +int comm_point_send_udp_msg(struct comm_point* c, struct sldns_buffer* packet, struct sockaddr* addr, socklen_t addrlen); /** diff --git a/util/random.c b/util/random.c index 5d71fcfa4c12..8a24ff04d990 100644 --- a/util/random.c +++ b/util/random.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -60,6 +60,7 @@ #include "config.h" #include "util/random.h" #include "util/log.h" +#include <time.h> #ifdef HAVE_SSL #include <openssl/rand.h> #include <openssl/rc4.h> diff --git a/util/random.h b/util/random.h index 99879dca8146..a05a994a3d52 100644 --- a/util/random.h +++ b/util/random.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef UTIL_RANDOM_H diff --git a/util/rbtree.c b/util/rbtree.c index d31afd9c54ce..a898f13f022f 100644 --- a/util/rbtree.c +++ b/util/rbtree.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/util/rbtree.h b/util/rbtree.h index 879804dd8600..50c84bbab385 100644 --- a/util/rbtree.h +++ b/util/rbtree.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/util/regional.c b/util/regional.c index 8b1fcdbb2ac8..899a54edbddd 100644 --- a/util/regional.c +++ b/util/regional.c @@ -23,16 +23,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/regional.h b/util/regional.h index 250523a6d9b2..e8b2cb8d00ca 100644 --- a/util/regional.h +++ b/util/regional.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/rtt.c b/util/rtt.c index c888b0864f06..4b44fca5060e 100644 --- a/util/rtt.c +++ b/util/rtt.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/rtt.h b/util/rtt.h index 1af5484c9832..57e904d1407f 100644 --- a/util/rtt.h +++ b/util/rtt.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/dnstree.c b/util/storage/dnstree.c index 003e8af3ef31..0df490ee5566 100644 --- a/util/storage/dnstree.c +++ b/util/storage/dnstree.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/dnstree.h b/util/storage/dnstree.h index 3ecbd128f8ce..ec8189100f9e 100644 --- a/util/storage/dnstree.h +++ b/util/storage/dnstree.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/lookup3.h b/util/storage/lookup3.h index 06211fdde222..59dad7c48b57 100644 --- a/util/storage/lookup3.h +++ b/util/storage/lookup3.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/lruhash.c b/util/storage/lruhash.c index c22278dda1e8..2c987a2e5634 100644 --- a/util/storage/lruhash.c +++ b/util/storage/lruhash.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/lruhash.h b/util/storage/lruhash.h index d0efe2d3b59b..30377d8e701e 100644 --- a/util/storage/lruhash.h +++ b/util/storage/lruhash.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/slabhash.c b/util/storage/slabhash.c index 9c0c5071175e..128edd84ad75 100644 --- a/util/storage/slabhash.c +++ b/util/storage/slabhash.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/storage/slabhash.h b/util/storage/slabhash.h index 93228febcfec..cf968f9653d4 100644 --- a/util/storage/slabhash.h +++ b/util/storage/slabhash.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/timehist.c b/util/timehist.c index 98d8db1c8f0d..dbf5b98417c2 100644 --- a/util/timehist.c +++ b/util/timehist.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @@ -43,6 +43,7 @@ #include <time.h> #endif #include <sys/time.h> +#include <sys/types.h> #include "util/timehist.h" #include "util/log.h" diff --git a/util/timehist.h b/util/timehist.h index d59448399b9b..5c65048b9bb3 100644 --- a/util/timehist.h +++ b/util/timehist.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/tube.c b/util/tube.c index fde84967fda6..2106a078c8d2 100644 --- a/util/tube.c +++ b/util/tube.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/tube.h b/util/tube.h index 2e7041156378..9ec50af38492 100644 --- a/util/tube.h +++ b/util/tube.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** diff --git a/util/winsock_event.c b/util/winsock_event.c index 82e9ab06a382..38661a5e1a8b 100644 --- a/util/winsock_event.c +++ b/util/winsock_event.c @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file @@ -41,6 +41,10 @@ #include "config.h" #ifdef USE_WINSOCK #include <signal.h> +#ifdef HAVE_TIME_H +#include <time.h> +#endif +#include <sys/time.h> #include "util/winsock_event.h" #include "util/fptr_wlist.h" @@ -181,7 +185,7 @@ static void handle_timeouts(struct event_base* base, struct timeval* now, wait->tv_usec = p->ev_timeout.tv_usec - now->tv_usec; } - verbose(VERB_CLIENT, "winsock_event wait=%lld.%6.6d", + verbose(VERB_CLIENT, "winsock_event wait=" ARG_LL "d.%6.6d", (long long)wait->tv_sec, (int)wait->tv_usec); return; } @@ -488,7 +492,7 @@ int event_base_set(struct event_base *base, struct event *ev) int event_add(struct event *ev, struct timeval *tv) { - verbose(VERB_ALGO, "event_add %p added=%d fd=%d tv=%lld %s%s%s", + verbose(VERB_ALGO, "event_add %p added=%d fd=%d tv=" ARG_LL "d %s%s%s", ev, ev->added, ev->ev_fd, (tv?(long long)tv->tv_sec*1000+(long long)tv->tv_usec/1000:-1), (ev->ev_events&EV_READ)?" EV_READ":"", @@ -569,7 +573,7 @@ int event_add(struct event *ev, struct timeval *tv) int event_del(struct event *ev) { - verbose(VERB_ALGO, "event_del %p added=%d fd=%d tv=%lld %s%s%s", + verbose(VERB_ALGO, "event_del %p added=%d fd=%d tv=" ARG_LL "d %s%s%s", ev, ev->added, ev->ev_fd, (ev->ev_events&EV_TIMEOUT)?(long long)ev->ev_timeout.tv_sec*1000+ (long long)ev->ev_timeout.tv_usec/1000:-1, diff --git a/util/winsock_event.h b/util/winsock_event.h index f51f53478e93..40892c14b1c0 100644 --- a/util/winsock_event.h +++ b/util/winsock_event.h @@ -21,16 +21,16 @@ * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** |