Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/dns
File: dns64.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
[11] Fix | Delete
#ifndef DNS_DNS64_H
[12] Fix | Delete
#define DNS_DNS64_H 1
[13] Fix | Delete
[14] Fix | Delete
#include <stdbool.h>
[15] Fix | Delete
[16] Fix | Delete
#include <isc/lang.h>
[17] Fix | Delete
[18] Fix | Delete
#include <dns/types.h>
[19] Fix | Delete
[20] Fix | Delete
ISC_LANG_BEGINDECLS
[21] Fix | Delete
[22] Fix | Delete
/*
[23] Fix | Delete
* dns_dns64_create() flags.
[24] Fix | Delete
*/
[25] Fix | Delete
#define DNS_DNS64_RECURSIVE_ONLY 0x01 /* If set then this record
[26] Fix | Delete
* only applies to recursive
[27] Fix | Delete
* queries.
[28] Fix | Delete
*/
[29] Fix | Delete
#define DNS_DNS64_BREAK_DNSSEC 0x02 /* If set then still perform
[30] Fix | Delete
* DNSSEC synthesis even
[31] Fix | Delete
* though the result would
[32] Fix | Delete
* fail validation.
[33] Fix | Delete
*/
[34] Fix | Delete
[35] Fix | Delete
/*
[36] Fix | Delete
* dns_dns64_aaaaok() and dns_dns64_aaaafroma() flags.
[37] Fix | Delete
*/
[38] Fix | Delete
#define DNS_DNS64_RECURSIVE 0x01 /* Recursive query. */
[39] Fix | Delete
#define DNS_DNS64_DNSSEC 0x02 /* DNSSEC sensitive query. */
[40] Fix | Delete
[41] Fix | Delete
isc_result_t
[42] Fix | Delete
dns_dns64_create(isc_mem_t *mctx, isc_netaddr_t *prefix,
[43] Fix | Delete
unsigned int prefixlen, isc_netaddr_t *suffix,
[44] Fix | Delete
dns_acl_t *client, dns_acl_t *mapped, dns_acl_t *excluded,
[45] Fix | Delete
unsigned int flags, dns_dns64_t **dns64);
[46] Fix | Delete
/*
[47] Fix | Delete
* Create a dns64 record which is used to identify the set of clients
[48] Fix | Delete
* it applies to and how to perform the DNS64 synthesis.
[49] Fix | Delete
*
[50] Fix | Delete
* 'prefix' and 'prefixlen' defined the leading bits of the AAAA records
[51] Fix | Delete
* to be synthesised. 'suffix' defines the bits after the A records bits.
[52] Fix | Delete
* If suffix is NULL zeros will be used for these bits. 'client' defines
[53] Fix | Delete
* for which clients this record applies. If 'client' is NULL then all
[54] Fix | Delete
* clients apply. 'mapped' defines which A records are candidated for
[55] Fix | Delete
* mapping. If 'mapped' is NULL then all A records will be mapped.
[56] Fix | Delete
* 'excluded' defines which AAAA are to be treated as non-existent for the
[57] Fix | Delete
* purposed of determining whether to perform synthesis. If 'excluded' is
[58] Fix | Delete
* NULL then no AAAA records prevent synthesis.
[59] Fix | Delete
*
[60] Fix | Delete
* If DNS_DNS64_RECURSIVE_ONLY is set then the record will only match if
[61] Fix | Delete
* DNS_DNS64_RECURSIVE is set when calling dns_dns64_aaaaok() and
[62] Fix | Delete
* dns_dns64_aaaafroma().
[63] Fix | Delete
*
[64] Fix | Delete
* If DNS_DNS64_BREAK_DNSSEC is set then the record will still apply if
[65] Fix | Delete
* DNS_DNS64_DNSSEC is set when calling dns_dns64_aaaaok() and
[66] Fix | Delete
* dns_dns64_aaaafroma() otherwise the record will be ignored.
[67] Fix | Delete
*
[68] Fix | Delete
* Requires:
[69] Fix | Delete
* 'mctx' to be valid.
[70] Fix | Delete
* 'prefix' to be valid and the address family to AF_INET6.
[71] Fix | Delete
* 'prefixlen' to be one of 32, 40, 48, 56, 72 and 96.
[72] Fix | Delete
* the bits not covered by prefixlen in prefix to
[73] Fix | Delete
* be zero.
[74] Fix | Delete
* 'suffix' to be NULL or the address family be set to AF_INET6
[75] Fix | Delete
* and the leading 'prefixlen' + 32 bits of the 'suffix'
[76] Fix | Delete
* to be zero. If 'prefixlen' is 40, 48 or 56 then the
[77] Fix | Delete
* the leading 'prefixlen' + 40 bits of 'suffix' must be
[78] Fix | Delete
* zero.
[79] Fix | Delete
* 'client' to be NULL or a valid acl.
[80] Fix | Delete
* 'mapped' to be NULL or a valid acl.
[81] Fix | Delete
* 'excluded' to be NULL or a valid acl.
[82] Fix | Delete
*
[83] Fix | Delete
* Returns:
[84] Fix | Delete
* ISC_R_SUCCESS
[85] Fix | Delete
* ISC_R_NOMEMORY
[86] Fix | Delete
*/
[87] Fix | Delete
[88] Fix | Delete
void
[89] Fix | Delete
dns_dns64_destroy(dns_dns64_t **dns64p);
[90] Fix | Delete
/*
[91] Fix | Delete
* Destroys a dns64 record.
[92] Fix | Delete
*
[93] Fix | Delete
* Requires the record to not be linked.
[94] Fix | Delete
*/
[95] Fix | Delete
[96] Fix | Delete
isc_result_t
[97] Fix | Delete
dns_dns64_aaaafroma(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
[98] Fix | Delete
const dns_name_t *reqsigner, const dns_aclenv_t *env,
[99] Fix | Delete
unsigned int flags, unsigned char *a, unsigned char *aaaa);
[100] Fix | Delete
/*
[101] Fix | Delete
* dns_dns64_aaaafroma() determines whether to perform a DNS64 address
[102] Fix | Delete
* synthesis from 'a' based on 'dns64', 'reqaddr', 'reqsigner', 'env',
[103] Fix | Delete
* 'flags' and 'aaaa'. If synthesis is performed then the result is
[104] Fix | Delete
* written to '*aaaa'.
[105] Fix | Delete
*
[106] Fix | Delete
* The synthesised address will be of the form:
[107] Fix | Delete
*
[108] Fix | Delete
* <prefix bits><a bits><suffix bits>
[109] Fix | Delete
*
[110] Fix | Delete
* If <a bits> straddle bits 64-71 of the AAAA record, then 8 zero bits will
[111] Fix | Delete
* be inserted at bits 64-71.
[112] Fix | Delete
*
[113] Fix | Delete
* Requires:
[114] Fix | Delete
* 'dns64' to be valid.
[115] Fix | Delete
* 'reqaddr' to be valid.
[116] Fix | Delete
* 'reqsigner' to be NULL or valid.
[117] Fix | Delete
* 'env' to be valid.
[118] Fix | Delete
* 'a' to point to a IPv4 address in network order.
[119] Fix | Delete
* 'aaaa' to point to a IPv6 address buffer in network order.
[120] Fix | Delete
*
[121] Fix | Delete
* Returns:
[122] Fix | Delete
* ISC_R_SUCCESS if synthesis was performed.
[123] Fix | Delete
* DNS_R_DISALLOWED if there is no match.
[124] Fix | Delete
*/
[125] Fix | Delete
[126] Fix | Delete
dns_dns64_t *
[127] Fix | Delete
dns_dns64_next(dns_dns64_t *dns64);
[128] Fix | Delete
/*
[129] Fix | Delete
* Return the next dns64 record in the list.
[130] Fix | Delete
*/
[131] Fix | Delete
[132] Fix | Delete
void
[133] Fix | Delete
dns_dns64_append(dns_dns64list_t *list, dns_dns64_t *dns64);
[134] Fix | Delete
/*
[135] Fix | Delete
* Append the dns64 record to the list.
[136] Fix | Delete
*/
[137] Fix | Delete
[138] Fix | Delete
void
[139] Fix | Delete
dns_dns64_unlink(dns_dns64list_t *list, dns_dns64_t *dns64);
[140] Fix | Delete
/*
[141] Fix | Delete
* Unlink the dns64 record from the list.
[142] Fix | Delete
*/
[143] Fix | Delete
[144] Fix | Delete
bool
[145] Fix | Delete
dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
[146] Fix | Delete
const dns_name_t *reqsigner, const dns_aclenv_t *env,
[147] Fix | Delete
unsigned int flags, dns_rdataset_t *rdataset,
[148] Fix | Delete
bool *aaaaok, size_t aaaaoklen);
[149] Fix | Delete
/*
[150] Fix | Delete
* Determine if there are any non-excluded AAAA records in from the
[151] Fix | Delete
* matching dns64 records in the list starting at 'dns64'. If there
[152] Fix | Delete
* is a non-excluded address return true. If all addresses are
[153] Fix | Delete
* excluded in the matched records return false. If no records
[154] Fix | Delete
* match then return true.
[155] Fix | Delete
*
[156] Fix | Delete
* If aaaaok is defined then dns_dns64_aaaaok() return a array of which
[157] Fix | Delete
* addresses in 'rdataset' were deemed to not be exclude by any matching
[158] Fix | Delete
* record. If there are no matching records then all entries are set
[159] Fix | Delete
* to true.
[160] Fix | Delete
*
[161] Fix | Delete
* Requires
[162] Fix | Delete
* 'rdataset' to be valid and to be for type AAAA and class IN.
[163] Fix | Delete
* 'aaaaoklen' must match the number of records in 'rdataset'
[164] Fix | Delete
* if 'aaaaok' in non NULL.
[165] Fix | Delete
*/
[166] Fix | Delete
[167] Fix | Delete
ISC_LANG_ENDDECLS
[168] Fix | Delete
[169] Fix | Delete
#endif /* DNS_DNS64_H */
[170] Fix | Delete
[171] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function