This file is indexed.

/usr/share/Ice-3.5.1/slice/Ice/Instrumentation.ice is in ice35-slice 3.5.1-5.2.

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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#pragma once

[["cpp:header-ext:h"]]

#include <Ice/EndpointF.ice>
#include <Ice/ConnectionF.ice>
#include <Ice/Current.ice>

module Ice
{

/**
 *
 * The Instrumentation local interfaces enable observing a number of
 * Ice core internal components (threads, connections, etc).
 *
 **/
module Instrumentation
{

/**
 *
 * The object observer interface used by instrumented objects to
 * notify the observer of their existence.
 *
 **/
local interface Observer
{
    /**
     *
     * This method is called when the instrumented object is created
     * or when the observer is attached to an existing object.
     * 
     **/
    void attach();

    /**
     *
     * This method is called when the instrumented object is destroyed
     * and as a result the observer detached from the object.
     *
     **/
    void detach();

    /**
     *
     * Notification of a failure.
     *
     * @param exceptionName The name of the exception.
     *
     **/
    void failed(string exceptionName);
};
 
/**
 *
 * The thread state enumeration keeps track of the different possible
 * states of Ice threads.
 *
 **/ 
local enum ThreadState
{
    /**
     *
     * The thread is idle.
     *
     **/
    ThreadStateIdle,

    /**
     *
     * The thread is in use performing reads or writes for Ice
     * connections. This state is only for threads from an Ice thread
     * pool.
     *
     **/
    ThreadStateInUseForIO,

    /**
     *
     * The thread is calling user code (servant implementation, AMI
     * callbacks). This state is only for threads from an Ice thread
     * pool. 
     *
     **/
    ThreadStateInUseForUser,

    /**
     *
     * The thread is performing other internal activities (DNS
     * lookups, timer callbacks, etc).
     *
     **/
    ThreadStateInUseForOther,
};

/**
 *
 * The thread observer interface to instrument Ice threads. This can
 * be threads from the Ice thread pool or utility threads used by the
 * Ice core.
 * 
 **/
local interface ThreadObserver extends Observer
{
    /**
     *
     * Notification of thread state change.
     *
     * @param oldState The previous thread state.
     *
     * @param newState The new thread state.
     *
     **/ 
    void stateChanged(ThreadState oldState, ThreadState newState);
};

/**
 *
 * The state of an Ice connection.
 *
 **/ 
local enum ConnectionState
{
    /**
     *
     * The connection is being validated.
     *
     **/ 
    ConnectionStateValidating,

    /**
     *
     * The connection is holding the reception of new messages.
     *
     **/
    ConnectionStateHolding,
    
    /**
     *
     * The connection is active and can send and receive messages.
     *
     **/
    ConnectionStateActive,

    /**
     *
     * The connection is being gracefully shutdown and waits for the
     * peer to close its end of the connection.
     *
     **/
    ConnectionStateClosing,

    /**
     *
     * The connection is closed and waits for potential dispatch to be
     * finished before being destroyed and detached from the observer.
     *
     **/
    ConnectionStateClosed
};


/**
 *
 * The connection observer interface to instrument Ice connections.
 * 
 **/
local interface ConnectionObserver extends Observer
{
    /**
     *
     * Notification of sent bytes over the connection.
     *
     * @param num The number of bytes sent.
     * 
     **/
    void sentBytes(int num);

    /**
     *
     * Notification of received bytes over the connection.
     *
     * @param num The number of bytes received.
     * 
     **/
    void receivedBytes(int num);
};

/**
 *
 * The dispatch observer to instrument servant dispatch.
 *
 **/
local interface DispatchObserver extends Observer
{
    /**
     *
     * Notification of a user exception.
     *
     **/
    void userException();

    /**
     *
     * Reply notification.
     *
     * @param size The size of the reply.
     * 
     **/
    void reply(int size);
};

/**
 *
 * The remote invocation observer to instrument invocations that go
 * over the wire.
 *
 **/
local interface RemoteObserver extends Observer
{
    /**
     *
     * Reply notification.
     *
     * @param size The size of the reply.
     *
     **/
    void reply(int size);
};

/**
 *
 * The invocation observer to instrument invocations on proxies. A
 * proxy invocation can either result in a collocated or remote
 * invocation. If it results in a remote invocation, a sub-observer is
 * requested for the remote invocation.
 *
 **/
local interface InvocationObserver extends Observer
{
    /**
     *
     * Notification of the invocation being retried.
     *
     **/
    void retried();

    /**
     *
     * Notification of a user exception.
     *
     **/
    void userException();

    /**
     *
     * Get a remote observer for this invocation.
     *
     * @param con The connection information.
     *
     * @param endpt The connection endpoint.
     *
     * @param requestId The ID of the invocation.
     *
     * @param size The size of the invocation.
     *
     * @return The observer to instrument the remote invocation.
     *
     **/
    RemoteObserver getRemoteObserver(ConnectionInfo con, Endpoint endpt, int requestId, int size);
};

/**
 *
 * The observer updater interface. This interface is implemented by
 * the Ice run-time and an instance of this interface is provided by
 * the Ice communicator on initialization to the {@link
 * CommunicatorObserver} object set with the communicator
 * initialization data. The Ice communicator calls {@link
 * CommunicatorObserver#setObserverUpdater} to provide the observer
 * updater.
 *
 * This interface can be used by add-ins implementing the {@link
 * CommunicatorObserver} interface to update the observers of
 * connections and threads.
 *
 **/
local interface ObserverUpdater
{
    /**
     *
     * Update connection observers associated with each of the Ice
     * connection from the communicator and its object adapters.
     *
     * When called, this method goes through all the connections and
     * for each connection {@link CommunicatorObserver#getConnectionObserver}
     * is called. The implementation of getConnectionObserver has the
     * possibility to return an updated observer if necessary.
     * 
     **/
    void updateConnectionObservers();

    /**
     *
     * Update thread observers associated with each of the Ice thread
     * from the communicator and its object adapters.
     *
     * When called, this method goes through all the threads and for
     * each thread {@link CommunicatorObserver#getThreadObserver} is
     * called. The implementation of getThreadObserver has the
     * possibility to return an updated observer if necessary.
     * 
     **/
    void updateThreadObservers();
};

/**
 *
 * The communicator observer interface used by the Ice run-time to
 * obtain and update observers for its observable objects. This
 * interface should be implemented by add-ins that wish to observe Ice
 * objects in order to collect statistics. An instance of this
 * interface can be provided to the Ice run-time through the Ice
 * communicator initialization data.
 *
 **/
local interface CommunicatorObserver
{
    /**
     *
     * This method should return an observer for the given endpoint
     * information and connector. The Ice run-time calls this method
     * for each connection establishment attempt.
     *
     * @param endpt The endpoint.
     *
     * @param connector The description of the connector. For IP
     * transports, this is typically the IP address to connect to.
     *
     * @return The observer to instrument the connection establishment.
     *
     **/
    Observer getConnectionEstablishmentObserver(Endpoint endpt, string connector);

    /**
     *
     * This method should return an observer for the given endpoint
     * information. The Ice run-time calls this method to resolve an
     * endpoint and obtain the list of connectors. 
     *
     * For IP endpoints, this typically involves doing a DNS lookup to
     * obtain the IP addresses associated with the DNS name.
     *
     * @param endpt The endpoint.
     *
     * @return The observer to instrument the endpoint lookup.
     *
     **/
    Observer getEndpointLookupObserver(Endpoint endpt);

    /**
     * 
     * This method should return a connection observer for the given
     * connection. The Ice run-time calls this method for each new
     * connection and for all the Ice communicator connections when
     * {@link ObserverUpdater#updateConnections} is called.
     *
     * @param c The connection information.
     *
     * @param e The connection endpoint.
     *
     * @param s The state of the connection.
     *
     * @param o The old connection observer if one is already set or a
     * null reference otherwise.
     *
     * @return The connection observer to instrument the connection.
     *
     **/
    ConnectionObserver getConnectionObserver(ConnectionInfo c, Endpoint e, ConnectionState s, ConnectionObserver o);

    /**
     * 
     * This method should return a thread observer for the given
     * thread. The Ice run-time calls this method for each new thread
     * and for all the Ice communicator threads when
     * {@link ObserverUpdater#updateThreads} is called.
     *
     * @param parent The parent of the thread.
     *
     * @param id The ID of the thread to observe.
     *
     * @param s The state of the thread.
     *
     * @param o The old thread observer if one is already set or a
     * null reference otherwise.
     *
     * @return The thread observer to instrument the thread.
     *
     **/
    ThreadObserver getThreadObserver(string parent, string id, ThreadState s, ThreadObserver o);

    /**
     * 
     * This method should return an invocation observer for the given
     * invocation. The Ice run-time calls this method for each new
     * invocation on a proxy.
     *
     * @param prx The proxy used for the invocation.
     *
     * @param operation The name of the invocation.
     *
     * @param ctx The context specified by the user.
     *
     * @return The invocation observer to instrument the invocation.
     *
     **/
    InvocationObserver getInvocationObserver(Object* prx, string operation, Context ctx);

    /**
     * 
     * This method should return a dispatch observer for the given
     * dispatch. The Ice run-time calls this method each time it
     * receives an incoming invocation to be dispatched for an Ice
     * object.
     *
     * @param c The current object as provided to the Ice servant
     * dispatching the invocation.
     *
     * @param size The size of the dispatch.
     *
     * @return The dispatch observer to instrument the dispatch.
     *
     **/
    DispatchObserver getDispatchObserver(Current c, int size); 

    /**
     *
     * The Ice run-time calls this method when the communicator is
     * initialized. The add-in implementing this interface can use
     * this object to get the Ice run-time to re-obtain observers for
     * observed objects.
     *
     * @param updater The observer updater object.
     *
     **/
    void setObserverUpdater(ObserverUpdater updater);
};

};
    
};