This file is indexed.

/usr/include/dnscore/zonefile_reader.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 
 *  @ingroup dnscore
 *  @brief 
 *
 *  
 *
 * @{
 *
 *----------------------------------------------------------------------------*/
 /* It's a suggestion for a common interface for stored files.
 * I'd add an "add" and "remove" status on a record in order to
 * accommodate dynupdate features.
 *
 */

#ifndef _ZONEFILE_READER_H
#define	_ZONEFILE_READER_H

#error DONT USE YET

#include <dnscore/sys_types.h>

#define ZONEFILE_OPERATION_ADD          0x00   /* The next record is meant to be added */
#define ZONEFILE_OPERATION_REMOVE       0x01   /* The next record is meant to be removed */

#define ZONEFILE_OPERATION_LABELCHANGED 0x02   /* The caller should reload the label */
#define ZONEFILE_OPERATION_TYPECHANGED  0x04   /* The caller should reload the type */

#define ZONEFILE_OPERATION_EOF          0x80   /* End of file */

#ifdef	__cplusplus
extern "C" {
#endif

    typedef struct zonefile_reader zonefile_reader;
    

    /*
     * Opens a zone file using the filename (mostly used for TXT zone files)
     * The next dnsname is made ready
     */

    typedef ya_result zonefile_openfile_method(zonefile_reader* reader, const char* filename);

    /*
     * Opens a zone file using the origin (used for any internal file)
     * The next dnsname is made ready
     */

    typedef ya_result zonefile_openzone_method(zonefile_reader* reader,const u8* origin,u16 zclass);
    
    /*
     * Go to the next dnrecord if any
     *
     * return the operation
     */

    typedef ya_result zonefile_nextrecord_method(zonefile_reader* reader);

    /*
     * Closes the file(s)
     */

    typedef ya_result zonefile_close_method(zonefile_reader* reader);

    /*
     * Returns true if the format name is supported by the current implementation
     */

    typedef bool zonefile_supports_method(zonefile_reader* reader,const char* format);

    /*
     * Returns the current operation
     */

    typedef ya_result zonefile_getcurrenoperation_method(zonefile_reader* reader);

    /*
     * Returns the current class (should be constant for the whole zone
     */

    typedef u16 zonefile_getcurrentclass_method(zonefile_reader* reader);

    /*
     * Returns the current type
     */

    typedef u16 zonefile_getcurrenttype_method(zonefile_reader* reader);

    /*
     * Returns the current ttl
     */

    typedef u32 zonefile_getcurrentttl_method(zonefile_reader* reader);

    /*
     * Returns the current rdata_size
     */

    typedef u16 zonefile_getcurrentrdatasize_method(zonefile_reader* reader);

    /*
     * Returns the current rdata
     */
    
    typedef const u8* zonefile_getcurrentrdata_method(zonefile_reader* reader);

    struct zonefile_reader
    {
        void*   data;

        zonefile_openfile_method* openfile;
        zonefile_openzone_method* openzone;

        zonefile_nextrecord_method* nextrecord;
        
        zonefile_getcurrentclass_method* getcurrentclass;
        zonefile_getcurrenttype_method* getcurrenttype;
        zonefile_getcurrentttl_method* getcurrentttl;
        zonefile_getcurrentrdatasize_method* getcurrentrdatasize;
        zonefile_getcurrentrdata_method* getcurrentrdata;

        zonefile_close_method* close;
        zonefile_supports_method* supports;
    };

    #define zonefile_openfile(zf,filename)   (zf)->openfile_method(zf,filename)
    #define zonefile_openzone(zf,origin)     (zf)->openzone_method(zf,origin)
    #define zonefile_close(zf)               (zf)->close_method(zf)

    #define zonefile_supports(zf)            (zf)->zonefile_supports_method_method(zf)

    #define zonefile_nextrecord(zf)          (zf)->zonefile_nextrecord_method(zf)
    #define zonefile_getcurrentclass(zf)     (zf)->zonefile_getcurrentclass_method(zf)
    #define zonefile_getcurrenttype(zf)      (zf)->zonefile_getcurrenttype_method(zf)
    #define zonefile_getcurrentttl(zf)       (zf)->zonefile_getcurrentttl_method(zf)
    #define zonefile_getcurrentrdatasize(zf) (zf)->zonefile_getcurrentrdatasize_method(zf)
    #define zonefile_getcurrentrdata(zf)     (zf)->zonefile_getcurrentrdata_method(zf)

#ifdef	__cplusplus
}
#endif

#endif	/* _ZONEFILE_READER_H */
/** @} */

/*----------------------------------------------------------------------------*/