"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/lib/dns/rdata/generic/proforma.c" (7 Sep 2020, 4015 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "proforma.c" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 
   13 #ifndef RDATA_GENERIC_#_#_C
   14 #define RDATA_GENERIC_#_#_C
   15 
   16 #define RRTYPE_#_ATTRIBUTES (0)
   17 
   18 static inline isc_result_t
   19 fromtext_#(ARGS_FROMTEXT) {
   20     isc_token_t token;
   21 
   22     REQUIRE(type == dns_rdatatype_proforma.c#);
   23     REQUIRE(rdclass == #);
   24 
   25     RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
   26                       false));
   27 
   28     return (ISC_R_NOTIMPLEMENTED);
   29 }
   30 
   31 static inline isc_result_t
   32 totext_#(ARGS_TOTEXT) {
   33 
   34     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
   35     REQUIRE(rdata->rdclass == #);
   36     REQUIRE(rdata->length != 0);    /* XXX */
   37 
   38     return (ISC_R_NOTIMPLEMENTED);
   39 }
   40 
   41 static inline isc_result_t
   42 fromwire_#(ARGS_FROMWIRE) {
   43 
   44     REQUIRE(type == dns_rdatatype_proforma.c#);
   45     REQUIRE(rdclass == #);
   46 
   47     /* NONE or GLOBAL14 */
   48     dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
   49 
   50     return (ISC_R_NOTIMPLEMENTED);
   51 }
   52 
   53 static inline isc_result_t
   54 towire_#(ARGS_TOWIRE) {
   55 
   56     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
   57     REQUIRE(rdata->rdclass == #);
   58     REQUIRE(rdata->length != 0);    /* XXX */
   59 
   60     /* NONE or GLOBAL14 */
   61     dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
   62 
   63     return (ISC_R_NOTIMPLEMENTED);
   64 }
   65 
   66 static inline int
   67 compare_#(ARGS_COMPARE) {
   68     isc_region_t r1;
   69     isc_region_t r2;
   70 
   71     REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
   72     REQUIRE(rdata1->rdclass == rdata2->rdclass);
   73     REQUIRE(rdata1->type == dns_rdatatype_proforma.c#);
   74     REQUIRE(rdata1->rdclass == #);
   75     REQUIRE(rdata1->length != 0);   /* XXX */
   76     REQUIRE(rdata2->length != 0);   /* XXX */
   77 
   78     dns_rdata_toregion(rdata1, &r1);
   79     dns_rdata_toregion(rdata2, &r2);
   80     return (isc_region_compare(&r1, &r2));
   81 }
   82 
   83 static inline isc_result_t
   84 fromstruct_#(ARGS_FROMSTRUCT) {
   85     dns_rdata_#_t *# = source;
   86 
   87     REQUIRE(type == dns_rdatatype_proforma.c#);
   88     REQUIRE(rdclass == #);
   89     REQUIRE(# != NULL);
   90     REQUIRE(#->common.rdtype == dns_rdatatype_proforma.ctype);
   91     REQUIRE(#->common.rdclass == rdclass);
   92 
   93     return (ISC_R_NOTIMPLEMENTED);
   94 }
   95 
   96 static inline isc_result_t
   97 tostruct_#(ARGS_TOSTRUCT) {
   98 
   99     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
  100     REQUIRE(rdata->rdclass == #);
  101     REQUIRE(rdata->length != 0);    /* XXX */
  102 
  103     return (ISC_R_NOTIMPLEMENTED);
  104 }
  105 
  106 static inline void
  107 freestruct_#(ARGS_FREESTRUCT) {
  108     dns_rdata_#_t *# = source;
  109 
  110     REQUIRE(# != NULL);
  111     REQUIRE(#->common.rdtype == dns_rdatatype_proforma.c#);
  112     REQUIRE(#->common.rdclass == #);
  113 
  114 }
  115 
  116 static inline isc_result_t
  117 additionaldata_#(ARGS_ADDLDATA) {
  118     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
  119     REQUIRE(rdata->rdclass == #);
  120 
  121     (void)add;
  122     (void)arg;
  123 
  124     return (ISC_R_SUCCESS);
  125 }
  126 
  127 static inline isc_result_t
  128 digest_#(ARGS_DIGEST) {
  129     isc_region_t r;
  130 
  131     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
  132     REQUIRE(rdata->rdclass == #);
  133 
  134     dns_rdata_toregion(rdata, &r);
  135 
  136     return ((digest)(arg, &r));
  137 }
  138 
  139 static inline bool
  140 checkowner_#(ARGS_CHECKOWNER) {
  141 
  142     REQUIRE(type == dns_rdatatype_proforma.c#);
  143     REQUIRE(rdclass == #);
  144 
  145     UNUSED(name);
  146     UNUSED(type);
  147     UNUSED(rdclass);
  148     UNUSED(wildcard);
  149 
  150     return (true);
  151 }
  152 
  153 static inline bool
  154 checknames_#(ARGS_CHECKNAMES) {
  155 
  156     REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
  157     REQUIRE(rdata->rdclass == #);
  158 
  159     UNUSED(rdata);
  160     UNUSED(owner);
  161     UNUSED(bad);
  162 
  163     return (true);
  164 }
  165 
  166 static inline int
  167 casecompare_#(ARGS_COMPARE) {
  168     isc_region_t r1;
  169     isc_region_t r2;
  170 
  171     REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
  172     REQUIRE(rdata1->rdclass == rdata2->rdclass);
  173     REQUIRE(rdata1->type == dns_rdatatype_proforma.c#);
  174     REQUIRE(rdata1->rdclass == #);
  175     REQUIRE(rdata1->length != 0);   /* XXX */
  176     REQUIRE(rdata2->length != 0);   /* XXX */
  177 
  178     dns_rdata_toregion(rdata1, &r1);
  179     dns_rdata_toregion(rdata2, &r2);
  180     return (isc_region_compare(&r1, &r2));
  181 }
  182 
  183 #endif  /* RDATA_GENERIC_#_#_C */