This file is indexed.

/usr/include/ams.h is in libion-dev 3.2.1+dfsg-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
/*
 	ams.h:	definitions supporting the implementation of AMS
		(Asynchronous Message Service) modules.

	Author: Scott Burleigh, JPL

	Modification History:
	Date  Who What

	Copyright (c) 2005, California Institute of Technology.
	ALL RIGHTS RESERVED.  U.S. Government Sponsorship
	acknowledged.
 									*/
#ifndef _AMS_H_
#define _AMS_H_

#include "platform.h"
#include "lyst.h"

#ifdef __cplusplus
extern "C" {
#endif

#define	MAX_AMS_CONTENT		(65000)

#define THIS_CONTINUUM		(-1)
#define ALL_CONTINUA		(0)
#define ANY_CONTINUUM		(0)
#define ALL_SUBJECTS		(0)
#define ANY_SUBJECT		(0)
#define ALL_ROLES		(0)
#define ANY_ROLE		(0)

typedef enum
{
	AmsArrivalOrder = 0,
	AmsTransmissionOrder
} AmsSequence;

typedef enum
{
	AmsBestEffort = 0,
	AmsAssured
} AmsDiligence;

typedef struct amssapst		*AmsModule;
typedef struct amsevtst		*AmsEvent;

/*	AMS event types.						*/
#define	AMS_MSG_EVT		1
#define	TIMEOUT_EVT		2
#define	NOTICE_EVT		3
#define	USER_DEFINED_EVT	4

typedef enum
{
	AmsRegistrationState,
	AmsInvitationState,
	AmsSubscriptionState
} AmsStateType;

typedef enum
{
	AmsStateBegins = 1,
	AmsStateEnds
} AmsChangeType;

typedef enum
{
	AmsMsgUnary = 0,
	AmsMsgQuery,
	AmsMsgReply,
	AmsMsgNone
} AmsMsgType;

typedef void		(*AmsMsgHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int continuumNbr,
					int unitNbr,
					int moduleNbr,
					int subjectNbr,
					int contentLength,
					char *content,
					int context,
					AmsMsgType msgType,
					int priority,
					unsigned char flowLabel);

typedef void		(*AmsRegistrationHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr,
					int roleNbr);

typedef void		(*AmsUnregistrationHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr);

typedef void		(*AmsInvitationHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr,
					int domainRoleNbr,
					int domainContinuumNbr,
					int domainUnitNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					AmsSequence sequence,
					AmsDiligence diligence);

typedef void		(*AmsDisinvitationHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr,
					int domainRoleNbr,
					int domainContinuumNbr,
					int domainUnitNbr,
					int subjectNbr);

typedef void		(*AmsSubscriptionHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr,
					int domainRoleNbr,
					int domainContinuumNbr,
					int domainUnitNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					AmsSequence sequence,
					AmsDiligence diligence);

typedef void		(*AmsUnsubscriptionHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int unitNbr,
					int moduleNbr,
					int domainRoleNbr,
					int domainContinuumNbr,
					int domainUnitNbr,
					int subjectNbr);

typedef void		(*AmsUserEventHandler)(AmsModule module,
					void *userData,
					AmsEvent *eventRef,
					int code,
					int dataLength,
					char *data);

typedef void		(*AmsMgtErrHandler)(void *userData,
					AmsEvent *eventRef);

typedef struct
{
	AmsMsgHandler			msgHandler;
	void				*msgHandlerUserData;
	AmsRegistrationHandler		registrationHandler;
	void				*registrationHandlerUserData;
	AmsUnregistrationHandler	unregistrationHandler;
	void				*unregistrationHandlerUserData;
	AmsInvitationHandler		invitationHandler;
	void				*invitationHandlerUserData;
	AmsDisinvitationHandler		disinvitationHandler;
	void				*disinvitationHandlerUserData;
	AmsSubscriptionHandler		subscriptionHandler;
	void				*subscriptionHandlerUserData;
	AmsUnsubscriptionHandler	unsubscriptionHandler;
	void				*unsubscriptionHandlerUserData;
	AmsUserEventHandler		userEventHandler;
	void				*userEventHandlerUserData;
	AmsMgtErrHandler		errHandler;
	void				*errHandlerUserData;
} AmsEventMgt;

/*	Predefined term values for ams_query and ams_get_event.		*/
#define	AMS_POLL	(0)		/*	Return immediately.	*/
#define AMS_BLOCKING	(-1)		/*	Wait forever.		*/

extern int		ams_register(	char *mibSource,
					char *tsorder,
					char *applicationName,
					char *authorityName,
					char *unitName,
					char *roleName,
					AmsModule *module);
			/*	Arguments are:
			 *		name of source medium for MIB
			 *		overriding transport service
			 *			selection order (this
			 *			is normally NULL)
		 	 *  		name of application in which
			 *  			this module wants to
			 *  			participate
		 	 *  		name of authority in charge of
			 *  			the venture in which
			 *  			this module wants to
			 *  			participate
			 *  		name of specific unit, in the
			 *  			venture identified by
			 *  			application and authority
			 *  			names, in which this module
			 *  			wants to participate
			 *		name of module's functional role
			 *			within the application;
			 *			need not be unique
			 *		pointer to variable in which
			 *			address of AMS module
			 *			state will be returned
			 *
			 *	Returns 0 on success, -1 on any error.	*/

extern int		ams_unregister(	AmsModule module);

extern int		ams_get_module_nbr(AmsModule module);

extern int		ams_get_unit_nbr(AmsModule module);

extern Lyst		ams_list_msgspaces(AmsModule module);

extern int		ams_get_continuum_nbr();

extern int		ams_rams_net_is_tree(AmsModule module);

extern int		ams_continuum_is_neighbor(int continuumNbr);

extern char		*ams_get_role_name(AmsModule module,
					int unitNbr,
					int moduleNbr);

extern int		ams_subunit_of(AmsModule module,
					int argUnitNbr,
					int refUnitNbr);

extern int		ams_lookup_unit_nbr(AmsModule module,
					char *unitName);

extern int		ams_lookup_role_nbr(AmsModule module,
					char *roleName);

extern int		ams_lookup_subject_nbr(AmsModule module,
					char *subjectName);

extern int		ams_lookup_continuum_nbr(AmsModule module,
					char *continuumName);

extern char		*ams_lookup_unit_name(AmsModule module,
					int unitNbr);

extern char		*ams_lookup_role_name(AmsModule module,
					int roleNbr);

extern char		*ams_lookup_subject_name(AmsModule module,
					int subjectNbr);

extern char		*ams_lookup_continuum_name(AmsModule module,
					int continuumNbr);

extern int		ams_invite(	AmsModule module,
					int roleNbr,
					int continuumNbr,
					int unitNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					AmsSequence sequence,
					AmsDiligence diligence);

extern int		ams_disinvite(	AmsModule module,
					int roleNbr,
					int continuumNbr,
					int unitNbr,
					int subjectNbr);

extern int		ams_subscribe(	AmsModule module,
					int roleNbr,
					int continuumNbr,
					int unitNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					AmsSequence sequence,
					AmsDiligence diligence);

extern int		ams_unsubscribe(AmsModule module,
					int roleNbr,
					int continuumNbr,
					int unitNbr,
					int subjectNbr);

extern int		ams_publish(	AmsModule module,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					int contentLength,
					char *content,
					int context);

extern int		ams_send(	AmsModule module,
					int continuumNbr,
					int unitNbr,
					int moduleNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					int contentLength,
					char *content,
					int context);

extern int		ams_query(	AmsModule module,
					int continuumNbr,
					int unitNbr,
					int moduleNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					int contentLength,
					char *content,
					int context,
					int term,
					AmsEvent *event);

extern int		ams_reply(	AmsModule module,
					AmsEvent msg,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					int contentLength,
					char *content);

extern int		ams_announce(	AmsModule module,
					int roleNbr,
					int continuumNbr,
					int unitNbr,
					int subjectNbr,
					int priority,
					unsigned char flowLabel,
					int contentLength,
					char *content,
					int context);

extern int		ams_post_user_event(AmsModule module,
					int userEventCode,
					int userEventDataLength,
					char *userEventData,
					int priority);

extern int		ams_get_event(	AmsModule module,
					int term,
					AmsEvent *event);

extern int		ams_get_event_type(AmsEvent event);

extern int		ams_parse_msg(	AmsEvent event,
					int *continuumNbr,
					int *unitNbr,
					int *moduleNbr,
					int *subjectNbr,
					int *contentLength,
					char **content,
					int *context,
					AmsMsgType *msgType,
					int *priority,
					unsigned char *flowLabel);

extern int		ams_parse_notice(AmsEvent event,
					AmsStateType *state,
					AmsChangeType *change,
					int *unitNbr,
					int *moduleNbr,
					int *roleNbr,
					int *domainContinuumNbr,
					int *domainUnitNbr,
					int *subjectNbr,
					int *priority,
					unsigned char *flowLabel,
					AmsSequence *sequence,
					AmsDiligence *diligence);

extern int		ams_parse_user_event(AmsEvent event,
					int *code,
					int *dataLength,
					char **data);

extern int		ams_recycle_event(AmsEvent event);

extern int		ams_set_event_mgr(AmsModule module,
					AmsEventMgt *rules);

extern void		ams_remove_event_mgr(AmsModule module);
#ifdef __cplusplus
}
#endif

#endif	/* _AMS_H */