/usr/include/dnsdb/zdb_zone_label.h is in libyadifa-dev 2.1.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 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 37 38 39 40 41 42 43 44 45 46 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 88 89 90 91 92 93 94 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 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 | /*------------------------------------------------------------------------------
*
* Copyright (c) 2011-2016, EURid. All rights reserved.
* The YADIFA TM software product is provided under the BSD 3-clause license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of EURid nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without 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 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.
*
*------------------------------------------------------------------------------
*
*/
/** @defgroup dnsdbzone Zone related functions
* @ingroup dnsdb
* @brief Internal functions for the database: zoned resource records label.
*
* Internal functions for the database: zoned resource records label.
*
* The ZONE LABEL is a label that can:
*
* _ contains a zone cut
* _ contains a cached label
*
* They should only be used as the top holding structure of the database
*
* @{
*/
#ifndef _ZONE_LABEL_H
#define _ZONE_LABEL_H
#include <dnsdb/zdb_types.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define ZDB_ZONELABEL_TAG 0x4c424c4e5a42445a /* "ZDBZNLBL" */
#if 0 /* fix */
#else
/**
* @brief TRUE if the zone_label contains information (records, zone or a set of labels), else FALSE
*/
/* 2 USES */
#define ZONE_LABEL_RELEVANT(zone_label) ((zone_label)->zone!=NULL||dictionary_notempty(&(zone_label)->sub))
/**
* @brief FALSE if the zone_label contains information (records, zone or a set of labels), else TRUE
*/
/* 4 USES */
#define ZONE_LABEL_IRRELEVANT(zone_label) ((zone_label)->zone==NULL&&dictionary_isempty(&(zone_label)->sub))
#endif
/**
* @brief Search for the label of a zone in the database
*
* Search for the label of a zone in the database
*
* @param[in] db the database to explore
* @param[in] name the dnsname_vector mapping the label
*
* @return a pointer to the label or NULL if it does not exists in the database.
*
*/
/* 3 USES */
zdb_zone_label* zdb_zone_label_find(zdb* db, dnsname_vector* name);
zdb_zone_label* zdb_zone_label_find_from_name(zdb* db, const char* name);
zdb_zone_label* zdb_zone_label_find_from_dnsname(zdb* db, const u8* dns_name);
zdb_zone_label* zdb_zone_label_find_from_dnsname_nolock(zdb* db, const u8* dns_name);
zdb_zone_label* zdb_zone_label_find_nolock(zdb *db, dnsname_vector* origin);
zdb_zone_label* zdb_zone_label_add_nolock(zdb *db, dnsname_vector* origin);
/**
* @brief Destroys a label and its collections.
*
* Destroys a label and its collections.
* Most likely irrelevant outside of zdb.
*
* @param[in] zone_labelp a pointer to a pointer to the label to destroy.
*
*/
/* 1 USE */
void zdb_zone_label_destroy(zdb_zone_label **zone_labelp);
/**
* @brief Gets pointers to all the zone labels along the path of a name.
*
* Gets pointers to all the zone labels along the path of a name.
*
* @param[in] db a pointer to the database
* @param[in] name a pointer to the dns name
* @param[in] zone_label_vector a pointer to the vector that will hold the labels pointers
*
* @return the top of the vector (-1 = empty)
*/
/* 1 USE */
s32 zdb_zone_label_match(zdb* db, const dnsname_vector *name, zdb_zone_label_pointer_array zone_label_vector);
#if OBSOLETE
/**
* @brief Retrieve the zone label origin, adds it in the database if needed.
*
* Retrieve the zone label origin, adds it in the database if needed.
*
* @param[in] db a pointer to the database
* @param[in] origin a pointer to the dns name
*
* @return a pointer to the label
*/
/* 2 USES */
zdb_zone_label* zdb_zone_label_add(zdb* db, dnsname_vector* origin);
#endif
/**
* @brief Destroys a zone label and all its collections
*
* Destroys a zone label and all its collections
*
* @parm[in] db a pointer to the database
* @parm[in] name a pointer to the name
*
* @return an error code
*/
/* 2 USES */
ya_result zdb_zone_label_delete(zdb* db, dnsname_vector* name);
#ifdef DEBUG
/**
* DEBUG: prints the label content
*/
void zdb_zone_label_print_indented(zdb_zone_label* zone_label, output_stream *os, int indent);
void zdb_zone_label_print(zdb_zone_label* zone_label, output_stream *os);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _ZONE_LABEL_H */
/** @} */
|