This file is indexed.

/usr/include/rbl/rbl.h is in librbl-dev 2.9.1-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
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
/*
**  Copyright (c) 2010-2012, The Trusted Domain Project.  All rights reserved.
*/

#ifndef _RBL_H_
#define _RBL_H_

/* system includes */
#include <sys/types.h>
#include <sys/time.h>
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif /* HAVE_STDINT_H */

/* definitions */
#define	RBL_DEFTIMEOUT		5
#define	RBL_MAXHOSTNAMELEN	256
#define	RBL_MAXERRORSTRING	256

/* return codes */
typedef int RBL_STAT;

#define	RBL_STAT_ERROR		(-1)
#define RBL_STAT_OK		0
#define RBL_STAT_INVALID	1
#define RBL_STAT_DNSERROR	2
#define RBL_STAT_NORESOURCE	3
#define RBL_STAT_NOTIMPLEMENT	4
#define RBL_STAT_NOTFOUND	5
#define	RBL_STAT_FOUND		6		/* reply available */
#define	RBL_STAT_NOREPLY	7		/* reply not available (yet) */
#define	RBL_STAT_EXPIRED	8		/* no reply, query expired */

/* generic DNS error codes */
#define	RBL_DNS_ERROR		(-1)		/* error in transit */
#define	RBL_DNS_SUCCESS		0		/* reply available */
#define	RBL_DNS_NOREPLY		1		/* reply not available (yet) */
#define	RBL_DNS_EXPIRED		2		/* no reply, query expired */

/* types */
struct rbl_handle;
typedef struct rbl_handle RBL;

/* prototypes */

/*
**  RBL_INIT -- initialize an RBL handle
**
**  Parameters:
**  	caller_mallocf -- caller-provided memory allocation function
**  	caller_freef -- caller-provided memory release function
**  	closure -- memory closure to pass to the above when used
**
**  Return value:
**  	A new RBL handle suitable for use with other RBL functions, or
**  	NULL on failure.
**  
**  Side effects:
**  	Strange radar returns at Indianapolis ARTCC.
*/

extern RBL * rbl_init __P((void *(*caller_mallocf)(void *closure,
                                                   size_t nbytes),
                           void (*caller_freef)(void *closure, void *p),
                           void *closure));

/*
**  RBL_CLOSE -- shut down a RBL instance
**
**  Parameters:
**  	rbl -- RBL handle to shut down
**
**  Return value:
**  	None.
*/

extern void rbl_close __P((RBL *));

/*
**  RBL_GETERROR -- return any stored error string from within the RBL
**                  context handle
**
**  Parameters:
**  	rbl -- RBL handle from which to retrieve an error string
**
**  Return value:
**  	A pointer to the stored string, or NULL if none was stored.
*/

extern const u_char *rbl_geterror __P((RBL *));

/*
**  RBL_SETDOMAIN -- declare the RBL's domain (the query root)
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	qroot-- certifiers string
**
**  Return value:
**  	None (yet).
*/

extern void rbl_setdomain __P((RBL *, u_char *));

/*
**  RBL_QUERY_START -- initiate a query to the RBL for entries
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	query -- query string
**  	qh -- query handle (returned)
**
**  Return value:
**  	RBL_STAT_INVALID -- rbl_setdomain() was not called, or "query" was NULL
** 	RBL_STAT_* -- as defined
*/

extern RBL_STAT rbl_query_start __P((RBL *, u_char *, void **));

/*
**  RBL_QUERY_CHECK -- check for a reply from an active query
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	qh -- query handle (returned)
**  	timeout -- timeout
**  	res -- 32-bit buffer into which to write the result (can be NULL)
**
**  Return value:
** 	RBL_STAT_* -- as defined
*/

extern RBL_STAT rbl_query_check __P((RBL *, void *, struct timeval *,
                                     uint32_t *));

/*
**  RBL_QUERY_CANCEL -- cancel an open query to the RBL
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	qh -- query handle
**
**  Return value:
** 	RBL_STAT_* -- as defined
*/

extern RBL_STAT rbl_query_cancel __P((RBL *, void *));

/*
**  RBL_SETTIMEOUT -- set the DNS timeout
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	timeout -- requested timeout (seconds)
**
**  Return value:
**  	None.
*/

extern void rbl_settimeout __P((RBL *, u_int));

/*
**  RBL_SETCALLBACKINT -- set the DNS callback interval
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	cbint -- requested callback interval (seconds)
**
**  Return value:
**  	None.
*/

extern void rbl_setcallbackint __P((RBL *, u_int));

/*
**  RBL_SETCALLBACKCTX -- set the DNS callback context
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	ctx -- context to pass to the DNS callback
**
**  Return value:
**  	None.
*/

extern void rbl_setcallbackctx __P((RBL *, void *));

/*
**  RBL_SETDNSCALLBACK -- set the DNS wait callback
**
**  Parameters:
**  	rbl -- RBL handle, created by rbl_init()
**  	func -- function to call; should take an opaque context pointer
**
**  Return value:
**  	None.
*/

extern void rbl_setdnscallback __P((RBL *rbl,
                                    void (*func)(const void *context)));

/*
**  RBL_DNS_SET_QUERY_SERVICE -- stores a handle representing the DNS
**                               query service to be used, returning any
**                               previous handle
**
**  Parameters:
**  	rbl -- RBL library handle
**  	h -- handle to be used
**
**  Return value:
**  	Previously stored handle, or NULL if none.
*/

extern void *rbl_dns_set_query_service __P((RBL *, void *));

/*
**  RBL_DNS_SET_QUERY_START -- stores a pointer to a query start function
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to start queries
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void *dns -- receives handle stored by
**  		             rbl_dns_set_query_service()
**  		int type -- DNS RR query type (C_IN assumed)
**  		char *query -- question to ask
**  		char *buf -- buffer into which to write reply
**  		size_t buflen -- size of buf
**  		void **qh -- returned query handle
*/

extern void rbl_dns_set_query_start __P((RBL *,
                                         int (*)(void *, int,
                                                 unsigned char *,
                                                 unsigned char *,
                                                 size_t, void **)));

/*
**  RBL_DNS_SET_QUERY_CANCEL -- stores a pointer to a query cancel function
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to cancel running queries
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void *dns -- DNS service handle
**  		void *qh -- query handle to be canceled
*/

extern void rbl_dns_set_query_cancel __P((RBL *,
                                          int (*)(void *, void *)));

/*
**  RBL_DNS_SET_QUERY_WAITREPLY -- stores a pointer to wait for a DNS reply
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to wait for a reply
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void *dns -- DNS service handle
**  		void *qh -- handle of query that has completed
**  		struct timeval *timeout -- how long to wait
**  		size_t *bytes -- bytes returned
**  		int *error -- error code returned
**  		int *dnssec -- DNSSEC status returned
*/

extern void rbl_dns_set_query_waitreply __P((RBL *,
                                             int (*)(void *, void *,
                                                     struct timeval *,
                                                     size_t *, int *,
                                                     int *)));

/*
**  RBL_DNS_SET_NSLIST -- set function that updates resolver nameserver list
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to update the nameserver list
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int
**  		void *srv -- DNS service handle
**  		const char *nslist -- nameserver list, as a comma-separated
**  			string
*/

extern void rbl_dns_set_nslist __P((RBL *,
                                    int (*)(void *, const char *)));

/*
**  RBL_DNS_SET_CLOSE -- shuts down the resolver
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to shut down the resolver
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns void
**  		void *srv -- DNS service handle
*/

extern void rbl_dns_set_close __P((RBL *,
                                   void (*)(void *)));

/*
**  RBL_DNS_SET_INIT -- initializes the resolver
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to initialize the resolver
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void **srv -- DNS service handle (updated)
*/

extern void rbl_dns_set_init __P((RBL *,
                                  int (*)(void **)));

/*
**  RBL_DNS_SET_CONFIG -- configures the resolver
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to configure the resolver
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void *srv -- DNS service handle
**  		const char *config -- arbitrary resolver configuration data
*/

extern void rbl_dns_set_config __P((RBL *,
                                    int (*)(void *, const char *)));

/*
**  RBL_DNS_SET_TRUSTANCHOR -- provides trust anchor data to the resolver
**
**  Parameters:
**  	lib -- RBL library handle
**  	func -- function to use to pass trust anchor data to the resolver
**
**  Return value:
**  	None.
**
**  Notes:
**  	"func" should match the following prototype:
**  		returns int (status)
**  		void *srv -- DNS service handle
**  		const char *trust -- arbitrary trust anchor data
*/

extern void rbl_dns_set_trustanchor __P((RBL *,
                                         int (*)(void *, const char *)));

/*
**  RBL_DNS_NSLIST -- requests update to a nameserver list
**
**  Parameters:
**  	lib -- RBL library handle
**  	nslist -- comma-separated list of nameservers to use
**
**  Return value:
**  	An RBL_STAT_* constant.
*/

extern RBL_STAT rbl_dns_nslist __P((RBL *, const char *));

/*
**  RBL_DNS_CONFIG -- requests a change to resolver configuration
**
**  Parameters:
**  	lib -- RBL library handle
**  	config -- opaque configuration string
**
**  Return value:
**  	An RBL_STAT_* constant.
*/

extern RBL_STAT rbl_dns_config __P((RBL *, const char *));

/*
**  RBL_DNS_TRUSTANCHOR -- requests a change to resolver trust anchor data
**
**  Parameters:
**  	lib -- RBL library handle
**  	trust -- opaque trust anchor string
**
**  Return value:
**  	An RBL_STAT_* constant.
*/

extern RBL_STAT rbl_dns_trustanchor __P((RBL *, const char *));

/*
**  RBL_DNS_INIT -- force nameserver (re)initialization
**
**  Parameters:
**  	lib -- RBL library handle
**
**  Return value:
**  	An RBL_STAT_* constant.
*/

extern RBL_STAT rbl_dns_init __P((RBL *));

#endif /* _RBL_H_ */