This file is indexed.

/usr/include/sipxtapi/mp/NetInTask.h is in libsipxtapi-dev 3.3.0~test17-2.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
//  
// 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.
//
// $$
///////////////////////////////////////////////////////////////////////////////


#ifndef _INCLUDED_NETINTASK_H /* [ */
#define _INCLUDED_NETINTASK_H

#include "rtcp/RtcpConfig.h"

// SYSTEM INCLUDES

// APPLICATION INCLUDES
#include "os/OsTask.h"
#include "os/OsLock.h"
#include "os/OsSocket.h"
#include "os/OsRWMutex.h"
#include "os/OsMutex.h"
#include "mp/MpTypes.h"
#include "mp/MpRtpBuf.h"
#include "mp/MpMisc.h"

// DEFINES
#define IP_HEADER_SIZE  20    ///< Size of IP packet header
#define UDP_HEADER_SIZE 8     ///< Size of UDP packet header
#define ETHERNET_MTU    1500  ///< Maximum Transmission Unit for Ethernet frame
#define UDP_MTU  (ETHERNET_MTU - IP_HEADER_SIZE - UDP_HEADER_SIZE)
                              ///< Maximum Transmission Unit for UDP packet.
#define RTP_MTU  (UDP_MTU-12) ///< Maximum Transmission Unit for RTP packet.
#define RTCP_MTU (UDP_MTU-12)

#define RTP_DIR_IN  1
#define RTP_DIR_OUT 2
#define RTP_DIR_NEW 4

// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// FORWARD DECLARATIONS
class MprFromNet;
class OsConnectionSocket;
class OsServerSocket;
class OsSocket;
class OsNotification;
struct rtpSession;

// STRUCTS

#ifndef INCLUDE_RTCP /* [ */
struct __MprRtcpStats {
   RtpSRC ssrc;
   short seqNumCycles;
   uint16_t highSeqNum;
};

// TYPEDEFS

typedef struct __MprRtcpStats  MprRtcpStats;
typedef struct __MprRtcpStats* MprRtcpStatsPtr;
#endif /* INCLUDE_RTCP ] */

typedef struct rtpSession *rtpHandle;

// FORWARD DECLARATIONS
extern uint32_t rand_timer32();
extern rtpHandle StartRtpSession(OsSocket* socket, int direction, char type);
extern void FinishRtpSession(rtpHandle h);

/**
*  @brief Task that listen for packets in incoming RTP streams.
*
*  @nosubgrouping
*/
class NetInTask : public OsTask
{

/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

   static const int DEF_NET_IN_TASK_PRIORITY;      ///< default task priority
   static const int DEF_NET_IN_TASK_OPTIONS;       ///< default task options
   static const int DEF_NET_IN_TASK_STACKSIZE;     ///< default task stacksize

/* ============================ CREATORS ================================== */
///@name Creators
//@{

     /// Return a pointer to the NetIn task, creating it if necessary
   static NetInTask* getNetInTask();

     /// Shutdown NetInTask instance and free it.
   OsStatus destroy();

     /// Destructor
   virtual ~NetInTask();

//@}

/* ============================ MANIPULATORS ============================== */
///@name Manipulators
//@{

     /// Task loop
   virtual int run(void* pArg);

   OsStatus addNetInputSources(OsSocket* pRtpSocket,
                               OsSocket* pRtcpSocket,
                               MprFromNet* fwdTo,
                               OsNotification* note);

   OsStatus removeNetInputSources(MprFromNet* fwdTo, OsNotification* note);

//@}

/* ============================ ACCESSORS ================================= */
///@name Accessors
//@{

//@}

/* ============================ INQUIRY =================================== */
///@name Inquiry
//@{

//@}

/* //////////////////////////// PROTECTED ///////////////////////////////// */
protected:

   // Static data members used to enforce Singleton behavior
   static NetInTask* spInstance;    ///< pointer to the single instance of
                                    ///<  the MpNetInTask class
   static OsRWMutex  sLock;         ///< semaphore used to ensure that there
                                    ///<  is only one instance of this class

   OsConnectionSocket* mpWriteSocket;
   OsConnectionSocket* mpReadSocket;
   int                 mCmdPort;    ///< internal socket port number
   OsMutex             mEventMutex;

     /// Default constructor
   NetInTask(
      int prio    = DEF_NET_IN_TASK_PRIORITY,      ///< default task priority
      int options = DEF_NET_IN_TASK_OPTIONS,       ///< default task options
      int stack   = DEF_NET_IN_TASK_STACKSIZE);    ///< default task stack size

     /// Return sLock object.
   static OsRWMutex& getLockObj() { return sLock; }

/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:

     /// Copy constructor (not implemented for this task)
   NetInTask(const NetInTask& rNetInTask);

     /// Assignment operator (not implemented for this task)
   NetInTask& operator=(const NetInTask& rhs);

};

#endif /* _INCLUDED_NETINTASKH ] */