This file is indexed.

/usr/include/xmlrpc-c/packetsocket.hpp is in libxmlrpc-c++8-dev 1.33.06-0ubuntu1.

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
#ifndef PACKETSOCKET_HPP_INCLUDED
#define PACKETSOCKET_HPP_INCLUDED

/*============================================================================
                         packetsocket
==============================================================================
  This is a facility for communicating socket-style, with defined
  packets like a datagram socket but with reliable delivery like a
  stream socket.  It's like a POSIX "sequential packet" socket, except
  it is built on top of a stream socket, so it is usable on the many
  systems that have stream sockets but not sequential packet sockets.
============================================================================*/

#include <sys/types.h>
#include <string>
#include <queue>

#include <xmlrpc-c/c_util.h>
#include <xmlrpc-c/girmem.hpp>

/*
  XMLRPC_PACKETSOCKET_EXPORTED marks a symbol in this file that is exported
  from libxmlrpc_packetsocket.

  XMLRPC_BUILDING_PACKETSOCKET says this compilation is part of
  libxmlrpc_packetsocket, as opposed to something that _uses_
  libxmlrpc_packetsocket.
*/
#ifdef XMLRPC_BUILDING_PACKETSOCKET
#define XMLRPC_PACKETSOCKET_EXPORTED XMLRPC_DLLEXPORT
#else
#define XMLRPC_PACKETSOCKET_EXPORTED
#endif

namespace xmlrpc_c {

class XMLRPC_PACKETSOCKET_EXPORTED packet : public girmem::autoObject {

public:
    packet();

    packet(const unsigned char * const data,
           size_t                const dataLength);

    packet(const char * const data,
           size_t       const dataLength);

    ~packet();

    unsigned char *
    getBytes() const { return this->bytes; }

    size_t
    getLength() const { return this->length; }

    void
    addData(const unsigned char * const data,
            size_t                const dataLength);

private:
    unsigned char * bytes;  // malloc'ed
    size_t length;
    size_t allocSize;

    void
    initialize(const unsigned char * const data,
               size_t                const dataLength);
};



class XMLRPC_PACKETSOCKET_EXPORTED packetPtr: public girmem::autoObjectPtr {

public:
    packetPtr();

    explicit packetPtr(packet * const packetP);

    packet *
    operator->() const;
};



class XMLRPC_PACKETSOCKET_EXPORTED packetSocket_impl;

class XMLRPC_PACKETSOCKET_EXPORTED packetSocket {
/*----------------------------------------------------------------------------
   This is an Internet communication vehicle that transmits individual
   variable-length packets of text.

   It is based on a stream socket.

   It would be much better to use a kernel SOCK_SEQPACKET socket, but
   Linux 2.4 does not have them.
-----------------------------------------------------------------------------*/
public:
    packetSocket(int sockFd);

    ~packetSocket();

    void
    writeWait(packetPtr const& packetPtr) const;

    void
    read(bool *      const eofP,
         bool *      const gotPacketP,
         packetPtr * const packetPP);

    void
    readWait(volatile const int * const interruptP,
             bool *               const eofP,
             bool *               const gotPacketP,
             packetPtr *          const packetPP);

    void
    readWait(volatile const int * const interruptP,
             bool *               const eofP,
             packetPtr *          const packetPP);

    void
    readWait(bool *      const eofP,
             packetPtr * const packetPP);

private:
    packetSocket_impl * implP;
};



} // namespace

#endif