This file is indexed.

/usr/include/sipxtapi/os/OsContact.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
//
// Copyright (C) 2006 Pingtel Corp.
// 
//
// $$
////////////////////////////////////////////////////////////////////////
//////


#ifndef _OsContact_h_
#define _OsContact_h_

// SYSTEM INCLUDES
// APPLICATION INCLUDES
#include "utl/UtlContainable.h"
#include "utl/UtlString.h"
#include "os/OsSocket.h"

// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS

/* ============================ ENUMERATIONS ============================== */
/**
* Enumeration of IP address types.
*/
enum IpAddressType
{
    IP4,    /** < Internet Protocol version 4 >*/
    IP6     /** < Internet Protocol version 6 >*/   
};

/**
 * OsContact is a containable object which represents
 * an inter-networking point of contact, 
 * which could also be described as a "transport endpoint".
 * It contains an address, a port value, a protocol, and the 
 * address type.
 */
class OsContact : public UtlContainable
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

/* ============================ FRIENDS =================================== */
    friend class OsContactTests;
    
/* ============================ ENUMERATIONS ============================== */

/* ============================ CREATORS ================================== */

    /**
     * Constructor.
     *
     * @param address String representation of the ip address. 
     *                For IPv4, it should be in "dotted quad" notation.
     *                For IPv6, it should use the text representation of
     *                addresses specified in RFC 3513.
     *
     *                Note that IP addresses which are sematically
     *                identical, but differ in string representation, will
     *                be considered as not being equal.  (e.g. - 
     *                a contact having an address "192.168.1.2" will not equal 
     *                a contact having an address "192.168.001.002".
     *                 
     *                Note that the current design doesn't allow for IPV4 tunneled over
     *                IPV6 to compare correctly with the original IPV4 address.
     *
     *                Note that IP addresses will be compared as strings, 
     *                so, use of wildcard addresses ("0.0.0.0") will not match any
     *                other address.
     *                 
     * @param port The port value for the contact. 
     * @param protocol The prefered protocol for this contact. 
     * @param type The type of ip address.
     */
    OsContact(UtlString address,
              int port,
              OsSocket::IpProtocolSocketType protocol,
              IpAddressType type);
                       
    /**
     * Copy constructor.
     */                       
    OsContact(const OsContact& ref);
         
    /**
     * Destructor
     */
    virtual ~OsContact();


/* ============================ MANIPULATORS ============================== */


/* ============================ ACCESSORS ================================= */
    /**
     * Accessor for the address string.
     */
    const void getAddress(UtlString& address) const;
    
    /**
     * Accessor for the port value.
     */
    const int getPort() const;
    
    /**
     * Accessor for the protocol enum value.
     */
    const OsSocket::IpProtocolSocketType getProtocol() const;
    
    /**
     * Accessor for the address type enum value.
     */
    const IpAddressType getAddressType() const;

    /**
     * Calculate a unique hash code for this object.  If the equals
     * operator returns true for another object, then both of those
     * objects must return the same hashcode.
     */
    virtual unsigned hash() const ;

    /**
     * Get the ContainableType for a UtlContainable derived class.
     */
    virtual UtlContainableType getContainableType() const;
    
/* ============================ INQUIRY =================================== */

    /**
     * Compare the this object to another like-objects.  Results for 
     * designating a non-like object are undefined.
     *
     * @returns 0 if equal, < 0 if less then and >0 if greater.
     */
    virtual int compareTo(UtlContainable const *) const ;    

    /**
     * Test this object to another like-object for equality.  This method 
     * returns false if unlike-objects are specified.
     */
    virtual UtlBoolean isEqual(UtlContainable const *) const ; 

/* //////////////////////////// PROTECTED ///////////////////////////////// */
protected:
    static UtlContainableType TYPE ;    /** < Class type used for runtime checking */ 

/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
    /**
     * Disallow assignment.
     */
    OsContact& operator=(const OsContact&) ;
    
    /**
     * Helper function for comparison of two ints.
     *
     * @param first First integer in the comparison pair.
     * @param second Second integer in the comparison pair.
     *
     * @returns 0 if equal, < 0 if first is less then and >0 if greater.
     */
    const int compareInt(const int first, const int second) const;
    
    UtlString mAddress;                      /** < String representation of the ip address. */
    int mPort ;                              /** < The port value for the contact. */ 
    OsSocket::IpProtocolSocketType mProtocol; /**< The prefered protocol for this contact. */
    IpAddressType mType;                     /**< The type of ip address. */

} ;

/* ============================ INLINE METHODS ============================ */

#endif    // _OsContact_h_