This file is indexed.

/usr/include/yuma/ncx/yang_typ.h is in libyuma-dev 2.9-1+b2.

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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
/*
 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.    
 */
#ifndef _H_yang_typ
#define _H_yang_typ

/*  FILE: yang_typ.h
*********************************************************************
*								    *
*			 P U R P O S E				    *
*								    *
*********************************************************************

    YANG Module parser typedef and type statement support

    
*********************************************************************
*								    *
*		   C H A N G E	 H I S T O R Y			    *
*								    *
*********************************************************************

date	     init     comment
----------------------------------------------------------------------
15-nov-07    abb      Begun; start from yang_parse.c

*/

#ifndef _H_dlq
#include "dlq.h"
#endif

#ifndef _H_grp
#include "grp.h"
#endif

#ifndef _H_ncxtypes
#include "ncxtypes.h"
#endif

#ifndef _H_status
#include "status.h"
#endif

#ifndef _H_tk
#include "tk.h"
#endif

#ifndef _H_yang
#include "yang.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif


/********************************************************************
*								    *
*			     T Y P E S				    *
*								    *
*********************************************************************/


/********************************************************************
*								    *
*			F U N C T I O N S			    *
*								    *
*********************************************************************/


/********************************************************************
* FUNCTION yang_typ_consume_type
* 
* Parse the next N tokens as a type clause
* Add to the typ_template_t struct in progress
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* Current token is the 'type' keyword
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain
*   mod   == module in progress
*   intypdef == struct that will get the type info
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_consume_type (yang_pcb_t *pcb,
                           tk_chain_t *tkc,
			   ncx_module_t  *mod,
			   typ_def_t *typdef);


/********************************************************************
* FUNCTION yang_typ_consume_metadata_type
* 
* Parse the next token as a type declaration
* for an ncx:metadata definition
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain
*   mod   == module in progress
*   intypdef == struct that will get the type info
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_consume_metadata_type (yang_pcb_t *pcb,
                                    tk_chain_t *tkc,
				    ncx_module_t  *mod,
				    typ_def_t *intypdef);


/********************************************************************
* FUNCTION yang_typ_consume_typedef
* 
* Parse the next N tokens as a typedef clause
* Create a typ_template_t struct and add it to the specified module
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* Current token is the 'typedef' keyword
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain
*   mod == module in progress
*   que == queue will get the typ_template_t 
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_consume_typedef (yang_pcb_t *pcb,
                              tk_chain_t *tkc,
			      ncx_module_t  *mod,
			      dlq_hdr_t *que);


/********************************************************************
* FUNCTION yang_typ_resolve_typedefs
* 
* Analyze the entire typeQ within the module struct
* Finish all the named types and range clauses,
* which were left unfinished due to possible forward references
*
* Check all the types in the Q
* If a type has validation errors, it will be removed
* from the typeQ
*
* Algorithm for checking named types in 4 separate loops:
*   1) resolve all open type name references
*   2) check for any name loops in all named types
*   3) check that all base types and builtin types
*      in each type chain are correct.  Also check that
*      all restrictions given are correct for that type
*   4) Check all range clauses and resolve all min/max
*      keyword uses to decimal numbers and validate that
*      each range is well-formed.
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain from parsing (needed for error msgs)
*   mod == module in progress
*   typeQ == Q of typ_template_t structs t0o check
*   parent == obj_template containing this typeQ
*          == NULL if this is a module-level typeQ
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_resolve_typedefs (yang_pcb_t *pcb,
                               tk_chain_t *tkc,
			       ncx_module_t  *mod,
			       dlq_hdr_t *typeQ,
			       obj_template_t *parent);


/********************************************************************
* FUNCTION yang_typ_resolve_typedefs_final
* 
* Analyze the entire typeQ within the module struct
* Finish all default value checking that was not done before
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   tkc == token chain from parsing (needed for error msgs)
*   mod == module in progress
*   typeQ == Q of typ_template_t structs t0o check
*   parent == obj_template containing this typeQ
*          == NULL if this is a module-level typeQ
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_resolve_typedefs_final (tk_chain_t *tkc,
                                     ncx_module_t *mod,
                                     dlq_hdr_t *typeQ);


/********************************************************************
* FUNCTION yang_typ_resolve_typedefs_grp
* 
* Analyze the entire typeQ within the module struct
* Finish all the named types and range clauses,
* which were left unfinished due to possible forward references
*
* Check all the types in the Q
* If a type has validation errors, it will be removed
* from the typeQ
*
* Algorithm for checking named types in 4 separate loops:
*   1) resolve all open type name references
*   2) check for any name loops in all named types
*   3) check that all base types and builtin types
*      in each type chain are correct.  Also check that
*      all restrictions given are correct for that type
*   4) Check all range clauses and resolve all min/max
*      keyword uses to decimal numbers and validate that
*      each range is well-formed.
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain from parsing (needed for error msgs)
*   mod == module in progress
*   typeQ == Q of typ_template_t structs t0o check
*   parent == obj_template containing this typeQ
*          == NULL if this is a module-level typeQ
*   grp == grp_template containing this typedef
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_resolve_typedefs_grp (yang_pcb_t *pcb,
                                   tk_chain_t *tkc,
				   ncx_module_t  *mod,
				   dlq_hdr_t *typeQ,
				   obj_template_t *parent,
				   grp_template_t *grp);


/********************************************************************
* FUNCTION yang_typ_resolve_type
* 
* Analyze the typdef within a single leaf or leaf-list statement
* Finish if a named type, and/or range clauses present,
* which were left unfinished due to possible forward references
*
* Algorithm for checking named types in 4 separate loops:
*   1) resolve all open type name references
*   2) check for any name loops in all named types
*   3) check that all base types and builtin types
*      in each type chain are correct.  Also check that
*      all restrictions given are correct for that type
*   4) Check all range clauses and resolve all min/max
*      keyword uses to decimal numbers and validate that
*      each range is well-formed.
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain from parsing (needed for error msgs)
*   mod == module in progress
*   typdef == typdef struct from leaf or leaf-list to check
*   defval == default value string for this leaf (may be NULL)
*   obj == obj_template containing this typdef
*       == NULL if this is a top-level union typedef,
*          checking its nested unnamed type clauses
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_resolve_type (yang_pcb_t *pcb,
                           tk_chain_t *tkc,
			   ncx_module_t  *mod,
			   typ_def_t *typdef,
                           const xmlChar *defval,
			   obj_template_t *obj);


/********************************************************************
* FUNCTION yang_typ_resolve_type_final
* 
* Check default values for XPath types
*
* Error messages are printed by this function!!
* Do not duplicate error messages upon error return
*
* INPUTS:
*   pcb == parser control block
*   tkc == token chain from parsing (needed for error msgs)
*   mod == module in progress
*   typdef == typdef struct from leaf or leaf-list to check
*   defval == default value string for this leaf (may be NULL)
*   obj == obj_template containing this typdef
*       == NULL if this is a top-level union typedef,
*          checking its nested unnamed type clauses
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_resolve_type_final (tk_chain_t *tkc,
                                 ncx_module_t  *mod,
                                 typ_def_t *typdef,
                                 const xmlChar *defval,
                                 obj_template_t *obj);


/********************************************************************
* FUNCTION yang_typ_rangenum_ok
* 
* Check a typdef for range definitions
* and check if the specified number passes all
* the range checks (if any)
*
* INPUTS:
*   typdef == typdef to check
*   num == number to check
*
* RETURNS:
*   status of the operation
*********************************************************************/
extern status_t 
    yang_typ_rangenum_ok (typ_def_t *typdef,
			  const ncx_num_t *num);


#ifdef __cplusplus
}  /* end extern 'C' */
#endif

#endif	    /* _H_yang_typ */