This file is indexed.

/usr/include/sipxtapi/rtcp/ByeReport.h is in libsipxtapi-dev 3.3.0~test17-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
443
444
445
446
447
448
//
// Copyright (C) 2006-2013 SIPez LLC.  All rights reserved.
//
// Copyright (C) 2004-2006 SIPfoundry Inc.
// Licensed by SIPfoundry under the LGPL license.
//
// Copyright (C) 2004-2006 Pingtel Corp.  All rights reserved.
// Licensed to SIPfoundry under a Contributor Agreement.
//
// $$
///////////////////////////////////////////////////////////////////////////////

//  Border Guard
#ifndef _ByeReport_h
#define _ByeReport_h

#include "rtcp/RtcpConfig.h"

//  Includes
#include "RTCPHeader.h"
#include "IByeReport.h"
#include "IGetByeInfo.h"


#define MAX_CSRCS   64

/**
 *
 * Class Name:  CByeReport
 *
 * Inheritance: CRTCPHeader      - RTCP Report Header Base Class
 *
 *
 * Interfaces:  IByeReport       - RTCP Bye Report Interface
 *
 * Description: The CByeReport Class coordinates the processing and generation
 *              of RTCP Bye reports associated with either an inbound or
 *              outbound RTP connection.
 *
 * Notes:       CByeReport is derived from CBaseClass which provides basic
 *              Initialization and reference counting support.
 *
 */
class CByeReport : public CBaseClass,  // Inherits the CBaseClass Impl
                   public CRTCPHeader, // Inherits the CRTCPHeader impl
                   public IByeReport,  // Bye Report Control Interface
                   public IGetByeInfo  // Interface for retrieving Bye Info

 {

//  Public Methods
public:

/**
 *
 * Method Name:  CByeReport() - Constructor
 *
 *
 * Inputs:       ssrc_t ulSSRC     - The the Identifier for this source
 *
 * Outputs:      None
 *
 * Returns:      None
 *
 * Description:  Performs routine CByeReport object initialization.
 *
 * Usage Notes:  A CByeReport object shall be created by the CRTCPRender with
 *               this constructor.  A CByeReport object will also be created
 *               be the CRTCPSource upon receipt of an RTCP Bye Report from
 *               a particiapting FE.
 *
 */
    CByeReport(ssrc_t ulSSRC=0);



/**
 *
 * Method Name: ~CByeReport() - Destructor
 *
 *
 * Inputs:      None
 *
 * Outputs:     None
 *
 * Returns:     None
 *
 * Description: Shall deallocated and/or release all resources which was
 *              acquired over the course of runtime.
 *
 * Usage Notes:
 *
 *
 */
    ~CByeReport(void);


/**
 *
 * Method Name:  FormatByeReport
 *
 *
 * Inputs:   unsigned long ulBufferSize
 *           Optional size defining the length allocated for the buffer
 *
 * Outputs:  unsigned char *puchReportBuffer
 *           Character Buffer used to store the contents of the Sender Report
 *
 * Returns:  unsigned long
 *           Returns the number of octet written into the buffer.
 *
 * Description: Constructs a Bye report using the buffer passed in by the
 *              caller.
 *
 * Usage Notes: The header of the RTCP Report shall be formatted by delegating
 *              to the base class.
 *
 *
 */
    unsigned long FormatByeReport(unsigned char *puchReportBuffer,
        unsigned long ulBufferSize=0);


/**
 *
 * Method Name:  ParseByeReport
 *
 *
 * Inputs:      unsigned char *puchReportBuffer
 *              Character Buffer containing the contents of the Bye Report
 *
 * Outputs:     None
 *
 * Returns:     unsigned long
 *
 * Description: Extracts the contents of an Bye report using the buffer
 *              passed in by the caller.
 *
 * Usage Notes: The header of the RTCP Report shall be parsed by delegating
 *              to the base class.
 *
 *
 */
    unsigned long ParseByeReport(unsigned char *puchReportBuffer);

/**
 *
 * Method Name:  GetSSRC
 *
 *
 * Inputs:       None
 *
 *
 * Outputs:      None
 *
 * Returns:     ssrc_t - The SSRC of the Bye Report
 *
 * Description: Returns the SSRC Associated with the Bye Report.
 *
 * Usage Notes:
 *
 *
 */
    ssrc_t GetSSRC(void);

/**
 *
 * Method Name:  SetSSRC
 *
 *
 * Inputs:      ssrc_t   ulSSRC   - Source ID
 *
 * Outputs:     None
 *
 * Returns:     void
 *
 * Description: Stores the Source Identifier associated with an RTP connection.
 *
 * Usage Notes:
 *
 *
 *
 */
    virtual void SetSSRC(ssrc_t ulSSRC);


/**
 *
 * Method Name: GetCSRC
 *
 *
 * Inputs:   bool bNBO
 *           Flag identifying whether data should be represented in NBO format

 *
 * Outputs:  ssrc_t *paulCSRC
 *           Contributing Source Identifier(s) Array pointer
 *
 * Returns:  unsigned long
 *           Number of Contributing Source Identifier(s)
 *
 * Description: Returns the contributing source values associated with the
 *              RTP packet.
 *
 * Usage Notes:
 *
 *
 */
    unsigned long GetCSRC(ssrc_t *paulCSRC, bool bNBO=FALSE);

/**
 *
 * Method Name: SetCSRC
 *
 *
 * Inputs:    ssrc_t *paulCSRC
 *              - Contributing Source Identifier(s) Array pointer
 *            unsigned long ulCSRCCount
 *              - Number of Contributing Source Identifier(s)
 *            bool bNBO - TRUE indicates data is in NBO.
 *
 * Outputs:   None
 *
 * Returns:   void
 *
 * Description: Sets the contributing source values associated with the RTP
 *              packet.
 *
 * Usage Notes:
 *
 *
 */
    void SetCSRC(ssrc_t *paulCSRC, unsigned long ulCSRCCount,
        bool bNBO=FALSE);


/**
 *
 * Method Name:  SetReason
 *
 *
 * Inputs:    char *puchName
 *              Reason Character String
 *            unsigned long ulLength
 *              Optional Length of Reason argument passed
 *
 * Outputs:     None
 *
 * Returns:     void
 *
 * Description: Stores the Reason field and length, either specified of
 *              derived, as attributed within the object.
 *
 * Usage Notes: The Reason argument MUST be passed as a NULL terminated
 *              string or must contain a valid length argument. All text
 *              strings passed shall be truncated beyond the length of
 *              255 unsigned characters.
 *
 */
    void SetReason(unsigned char *puchReason, unsigned long ulLength=0);


/**
 *
 * Method Name:  GetReason
 *
 *
 * Inputs:  None
 *
 * Outputs: char *puchReason
 *          Character buffer in which the Reason attribute shall be returned
 *
 * Returns: unsigned long
 *          Length of the item being returned in the unsigned character buffer
 *
 * Description: Retrieves the Reason attribute stored within the object and
 *              returns its associated length.
 *
 * Usage Notes: All unsigned character strings returned are limited to 255
 *              bytes in length. Any wide unsigned character support for
 *              internationalized display is a responsibility assumed by
 *              the caller.
 *
 *
 */
    unsigned long GetReason(unsigned char *puchReason);

/**
 *
 * Method Name:  GetByeInterface()
 *
 *
 * Inputs:      None
 *
 * Outputs:     None
 *
 * Returns:     IByeReport *  - Pointer to the Bye Report Interface
 *
 * Description: Returns the Bye Report interface.
 *
 * Usage Notes:
 *
 */
    IByeReport * GetByeInterface(void);

/**
 *
 * Macro Name:  DECLARE_IBASE_M
 *
 *
 * Inputs:      None
 *
 * Outputs:     None
 *
 * Returns:     None
 *
 * Description: This implements the IBaseClass functions used and exposed by
 *              derived classes.
 *
 * Usage Notes:
 *
 *
 */
DECLARE_IBASE_M

private:        // Private Member Functions

/**
 *
 * Method Name:  ExtractPadding
 *
 *
 * Inputs:      unsigned char *puchReportBuffer
 *                Character Buffer containing the contents of the Bye Report
 *
 * Outputs:     None
 *
 * Returns:     unsigned long - Number of octets processed
 *
 * Description: Extracts the padding that might be present at the end of a
 *              list of field data contained within an Bye report.
 *
 * Usage Notes:
 *
 *
 */
    unsigned long ExtractPadding(unsigned char *puchReportBuffer);

/**
 *
 * Method Name:  LoadPadding
 *
 *
 * Inputs:      unsigned char *puchReportBuffer
 *                Character Buffer containing the contents of the Bye Report
 *
 * Outputs:     bool &pbPadded
 *                Flag specifying whether padding was added
 *
 * Returns:     unsigned long - Number of octets processed
 *
 * Description: Pad out to a 4 byte boundary as needed.
 *
 * Usage Notes:
 *
 *
 */
    unsigned long LoadPadding(unsigned char *puchReportBuffer, bool *pbPadded);



private:        // Private Data Members


/**
 *
 * Attribute Name:  m_ulReasonLength
 *
 * Type:            unsigned long
 *
 * Description:     This member shall store the length of the textual reason
 *                  for RTP session termination.
 *
 */
      unsigned long m_ulReasonLength;


/**
 *
 * Attribute Name:  m_uchReason
 *
 * Type:            Character Array
 *
 * Description:     This member shall store the textual reason for an RTP
 *                  session termination.
 *
 */
      unsigned char m_uchReason[MAX_SOURCE_LENGTH];

/**
 *
 * Attribute Name:  m_ulCSRCCount
 *
 * Type:            unsigned long
 *
 * Description:     The number of CSRCs contained with an RTP report.
 *
 */
      unsigned long m_ulCSRCCount;

/**
 *
 * Attribute Name:  m_aulCSRC
 *
 * Type:            ssrc_t
 *
 * Description:     The CSRCs contained with an RTP report.
 *
 */
      ssrc_t m_aulCSRC[MAX_CSRCS];

};

/**
 *
 * Method Name:  GetSSRC
 *
 *
 * Inputs:       None
 *
 *
 * Outputs:      None
 *
 * Returns:     ssrc_t - The SSRC of the Bye Report
 *
 * Description: Returns the SSRC Associated with the Bye Report.
 *
 * Usage Notes:
 *
 *
 */
inline ssrc_t CByeReport::GetSSRC(void)
{

    return(CRTCPHeader::GetSSRC());
}

#endif