"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.17.5/lib/dns/rdata/generic/proforma.c" (4 Sep 2020, 4039 Bytes) of package /linux/misc/dns/bind9/9.17.5/bind-9.17.5.tar.xz:


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 #ifndef RDATA_GENERIC_ #_ #_C
   13 #define RDATA_GENERIC_ #_ #_C
   14 
   15 #define RRTYPE_ #_ATTRIBUTES(0)
   16 
   17 static inline isc_result_t fromtext_ #(ARGS_FROMTEXT) {
   18     isc_token_t token;
   19 
   20     REQUIRE(type == dns_rdatatype_proforma.c #);
   21     REQUIRE(rdclass == #);
   22 
   23     RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
   24                       false));
   25 
   26     return (ISC_R_NOTIMPLEMENTED);
   27 }
   28 
   29 static inline isc_result_t totext_ #(ARGS_TOTEXT) {
   30     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
   31     REQUIRE(rdata->rdclass == #);
   32     REQUIRE(rdata->length != 0); /* XXX */
   33 
   34     return (ISC_R_NOTIMPLEMENTED);
   35 }
   36 
   37 static inline isc_result_t fromwire_ #(ARGS_FROMWIRE) {
   38     REQUIRE(type == dns_rdatatype_proforma.c #);
   39     REQUIRE(rdclass == #);
   40 
   41     /* NONE or GLOBAL14 */
   42     dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
   43 
   44     return (ISC_R_NOTIMPLEMENTED);
   45 }
   46 
   47 static inline isc_result_t towire_ #(ARGS_TOWIRE) {
   48     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
   49     REQUIRE(rdata->rdclass == #);
   50     REQUIRE(rdata->length != 0); /* XXX */
   51 
   52     /* NONE or GLOBAL14 */
   53     dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
   54 
   55     return (ISC_R_NOTIMPLEMENTED);
   56 }
   57 
   58 static inline int compare_ #(ARGS_COMPARE) {
   59     isc_region_t r1;
   60     isc_region_t r2;
   61 
   62     REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
   63     REQUIRE(rdata1->rdclass == rdata2->rdclass);
   64     REQUIRE(rdata1->type == dns_rdatatype_proforma.c #);
   65     REQUIRE(rdata1->rdclass == #);
   66     REQUIRE(rdata1->length != 0); /* XXX */
   67     REQUIRE(rdata2->length != 0); /* XXX */
   68 
   69     dns_rdata_toregion(rdata1, &r1);
   70     dns_rdata_toregion(rdata2, &r2);
   71     return (isc_region_compare(&r1, &r2));
   72 }
   73 
   74 static inline isc_result_t fromstruct_ #(ARGS_FROMSTRUCT) {
   75     dns_rdata_ #_t *# = source;
   76 
   77     REQUIRE(type == dns_rdatatype_proforma.c #);
   78     REQUIRE(rdclass == #);
   79     REQUIRE(# != NULL);
   80     REQUIRE(#->common.rdtype == dns_rdatatype_proforma.ctype);
   81     REQUIRE(#->common.rdclass == rdclass);
   82 
   83     return (ISC_R_NOTIMPLEMENTED);
   84 }
   85 
   86 static inline isc_result_t tostruct_ #(ARGS_TOSTRUCT) {
   87     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
   88     REQUIRE(rdata->rdclass == #);
   89     REQUIRE(rdata->length != 0); /* XXX */
   90 
   91     return (ISC_R_NOTIMPLEMENTED);
   92 }
   93 
   94 static inline void freestruct_ #(ARGS_FREESTRUCT) {
   95     dns_rdata_ #_t *# = source;
   96 
   97     REQUIRE(# != NULL);
   98     REQUIRE(#->common.rdtype == dns_rdatatype_proforma.c #);
   99     REQUIRE(#->common.rdclass == #);
  100 }
  101 
  102 static inline isc_result_t additionaldata_ #(ARGS_ADDLDATA) {
  103     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
  104     REQUIRE(rdata->rdclass == #);
  105 
  106     (void)add;
  107     (void)arg;
  108 
  109     return (ISC_R_SUCCESS);
  110 }
  111 
  112 static inline isc_result_t digest_ #(ARGS_DIGEST) {
  113     isc_region_t r;
  114 
  115     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
  116     REQUIRE(rdata->rdclass == #);
  117 
  118     dns_rdata_toregion(rdata, &r);
  119 
  120     return ((digest)(arg, &r));
  121 }
  122 
  123 static inline bool checkowner_ #(ARGS_CHECKOWNER) {
  124     REQUIRE(type == dns_rdatatype_proforma.c #);
  125     REQUIRE(rdclass == #);
  126 
  127     UNUSED(name);
  128     UNUSED(type);
  129     UNUSED(rdclass);
  130     UNUSED(wildcard);
  131 
  132     return (true);
  133 }
  134 
  135 static inline bool checknames_ #(ARGS_CHECKNAMES) {
  136     REQUIRE(rdata->type == dns_rdatatype_proforma.c #);
  137     REQUIRE(rdata->rdclass == #);
  138 
  139     UNUSED(rdata);
  140     UNUSED(owner);
  141     UNUSED(bad);
  142 
  143     return (true);
  144 }
  145 
  146 static inline int casecompare_ #(ARGS_COMPARE) {
  147     isc_region_t r1;
  148     isc_region_t r2;
  149 
  150     REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
  151     REQUIRE(rdata1->rdclass == rdata2->rdclass);
  152     REQUIRE(rdata1->type == dns_rdatatype_proforma.c #);
  153     REQUIRE(rdata1->rdclass == #);
  154     REQUIRE(rdata1->length != 0); /* XXX */
  155     REQUIRE(rdata2->length != 0); /* XXX */
  156 
  157     dns_rdata_toregion(rdata1, &r1);
  158     dns_rdata_toregion(rdata2, &r2);
  159     return (isc_region_compare(&r1, &r2));
  160 }
  161 
  162 #endif /* RDATA_GENERIC_#_#_C */