This file is indexed.

/usr/include/sipxtapi/mp/MprFromNet.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
//  
// Copyright (C) 2006-2012 SIPez LLC.  All rights reserved.
//
// Copyright (C) 2004-2008 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 _MprFromNet_h_
#define _MprFromNet_h_

#include "rtcp/RtcpConfig.h"

// SYSTEM INCLUDES
#ifdef _WIN32 /* [ */
#include <winsock2.h>
#endif /* _WIN32 ] */

// APPLICATION INCLUDES
#include <os/OsMsgQ.h>
#include "os/OsDefs.h"
#include "mp/MpUdpBuf.h"
#include "mp/MpRtpBuf.h"
#ifdef INCLUDE_RTCP /* [ */
#include "rtcp/IRTPDispatch.h"
#include "rtcp/INetDispatch.h"
#endif /* INCLUDE_RTCP ] */

// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS
class MprDecode;
class MprDejitter;
class MprRtpDispatcher;
class OsEvent;
class OsSocket;
class MpResourceMsg;
class NetInTask;
class UtlString;
class MpFlowGraphBase;

/// The "From Network" media processing resource
class MprFromNet
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

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

     /// Constructor
   MprFromNet();

     /// Destructor
   virtual ~MprFromNet();

//@}

/* ============================ MANIPULATORS ============================== */
///@name Manipulators
//@{
   /// Handle message to manipulate this
   UtlBoolean handleMessage(MpResourceMsg& rMsg);

   /// @brief send a message to a resource containing a MprFromNet to set sockets
   static OsStatus setSockets(const UtlString& resourceName, OsMsgQ& flowgraphMessageQueue, OsSocket* rtpSocket, OsSocket* rtcpSocket);

     /// @brief Set the inbound RTP and RTCP sockets.
   OsStatus setSockets(OsSocket& rRtpSocket, OsSocket& rRtcpSocket);
     /**< @returns Always OS_SUCCESS for now. */


   /// @brief send a message to a resource containing a MprFromNet to reset sockets
   static OsStatus resetSockets(const UtlString& resourceName, OsMsgQ& flowgraphMessageQueue);

     /// @brief Unregister the inbound RTP and RTCP sockets.
   OsStatus resetSockets();
     /**< @returns Always OS_SUCCESS for now. */

     /// Take in a buffer from the NetIn task
   OsStatus pushPacket(const MpUdpBufPtr &buf, bool isRtcp);

     /// Enable/disable discarding of given RTP stream.
   OsStatus enableSsrcDiscard(UtlBoolean enable, RtpSRC ssrc);
     /**<
     *  @param[in] enable - should given stream be discarded or not.
     *  @param[in] ssrc - SSRC of the stream to discard. If \p enable is
     *             FALSE, then \p ssrc is ignored.
     *
     *  @note Only one stream at a time can be discarded. This functionality
     *        is designed to discard looped local back packets.
     *
     *  @returns Always OS_SUCCESS for now.
     */

     /// Set RTP dispatcher instance
   OsStatus setRtpDispatcher(MprRtpDispatcher *pRtpDispatcher);
     /**<
     *  @note Must be called right after object construction!
     */

//@}

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

#ifdef INCLUDE_RTCP /* [ */
     /// @brief These accessors were added by DMG to allow a Connection to access and modify
     /// RTP and RTCP stream informations
   void setDispatchers(IRTPDispatch *piRTPDispatch, INetDispatch *piRTCPDispatch);

#else /* INCLUDE_RTCP ] [ */
     /// retrieve the RR info needed to complete an RTCP packet
   OsStatus getRtcpStats(MprRtcpStats& stats);
#endif /* INCLUDE_RTCP ] */

   // For debug purposes allow labeling this with the containing flowgraph
   OsStatus setFlowGraph(MpFlowGraphBase* flowgraph);

//@}

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

//@}

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

/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
   OsMutex          mDiscardCtlMutex;
   OsMutex          mRegistrationSyncMutex;
   NetInTask*       mNetInTask;
   UtlBoolean       mRegistered;
   MprRtpDispatcher* mpRtpDispatcher;
   UtlBoolean       mDiscardSelectedStream;
   RtpSRC           mDiscardedSSRC;
   MpFlowGraphBase* mpFlowGraph;
#ifdef INCLUDE_RTCP /* [ */
   INetDispatch*    mpiRTCPDispatch;
   IRTPDispatch*    mpiRTPDispatch;

#else /* INCLUDE_RTCP ] [ */
   rtpHandle        mInRtpHandle;
   int              mRtcpCount;
#endif /* INCLUDE_RTCP ] */

   int             mNumPushed;     ///< Total RTP+RTCP pkts received from NetIn
   int             mNumPktsRtcp;   ///< Total RTCP packets received from NetIn
   int             mNumPktsRtp;    ///< Total RTP packets received from NetIn
   int             mNumEncDropped; ///< Encoded RTP packets dropped due to no key
   int             mNumLoopDropped;///< Looped-back mcast RTP packets dropped

#ifndef INCLUDE_RTCP /* [ */
     /// Update the RR info for the current incoming packet
   OsStatus rtcpStats(struct RtpHeader *h);
#endif /* INCLUDE_RTCP ] */

     /// @brief Unregister the inbound RTP and RTCP sockets.
   UtlBoolean resetSocketsInternal(OsEvent *pEvent = NULL);
     /**<
     *  @retval TRUE - operation have been performed, caller can wait for
     *          \p pEvent to be signaled
     *  @retval FALSE - operation havn't been performed and pEvent will
     *          never be signaled.
     */

     /// Parse UDP packet and return filled RTP packet buffer.
   static MpRtpBufPtr parseRtpPacket(const MpUdpBufPtr &buf);

     /// Copy constructor (not implemented for this class)
   MprFromNet(const MprFromNet& rMprFromNet);

     /// Assignment operator (not implemented for this class)
   MprFromNet& operator=(const MprFromNet& rhs);

};

/* ============================ INLINE METHODS ============================ */
#endif  // _MprFromNet_h_