"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/dns/include/dns/ecs.h" (4 Sep 2020, 1249 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.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 "ecs.h" 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 DNS_ECS_H
   13 #define DNS_ECS_H 1
   14 
   15 #include <inttypes.h>
   16 
   17 #include <isc/lang.h>
   18 #include <isc/netaddr.h>
   19 #include <isc/types.h>
   20 
   21 #include <dns/types.h>
   22 
   23 struct dns_ecs {
   24     isc_netaddr_t addr;
   25     uint8_t       source;
   26     uint8_t       scope;
   27 };
   28 
   29 #define DNS_ECS_FORMATSIZE                                \
   30     (ISC_NETADDR_FORMATSIZE + 8) /* <address>/NNN/NNN \
   31                       */
   32 
   33 ISC_LANG_BEGINDECLS
   34 
   35 void
   36 dns_ecs_init(dns_ecs_t *ecs);
   37 /*%<
   38  * Initialize a DNS ECS structure.
   39  *
   40  * Requires:
   41  * \li 'ecs' is not NULL and points to a valid dns_ecs structure.
   42  */
   43 
   44 void
   45 dns_ecs_format(dns_ecs_t *ecs, char *buf, size_t size);
   46 /*%<
   47  * Format an ECS record as text. Result is guaranteed to be null-terminated.
   48  *
   49  * Requires:
   50  * \li  'ecs' is not NULL.
   51  * \li  'buf' is not NULL.
   52  * \li  'size' is at least DNS_ECS_FORMATSIZE
   53  */
   54 
   55 ISC_LANG_ENDDECLS
   56 
   57 #endif /* DNS_ECS_H */