/usr/include/wvstreams/wvunixdgsocket.h is in libwvstreams-dev 4.6.1-12~deb9u1.
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 | #ifndef __WVUNIXDGSOCKET_H
#define __WVUNIXDGSOCKET_H
#include <sys/types.h>
#include <sys/syslog.h>
#include <sys/socket.h>
#include <fcntl.h>
#include "wvlog.h"
#include "wvstring.h"
#include "wvlinklist.h"
#include "wvfdstream.h"
#include "wvaddr.h"
class WvUnixDGListener;
class WvUnixDGConn;
/**
* WvStream-based Unix datagram domain socket base class.
*
* You probably want to use WvUnixDGConn and WvUnixDGListener as this will
* probably be deprecated one day.
*/
class WvUnixDGSocket : public WvFDStream {
bool server;
int backoff;
DeclareWvList(WvBuf);
WvBufList bufs;
public:
WvUnixDGSocket(WvStringParm filename, bool _server, int perms = 0222);
virtual ~WvUnixDGSocket();
virtual size_t uwrite(const void *buf, size_t count);
virtual void pre_select(SelectInfo &si);
virtual bool post_select(SelectInfo &si);
protected:
WvString socketfile;
public:
const char *wstype() const { return "WvUnixDGSocket"; }
size_t bufsize;
};
/**
* WvStream-based Unix datagram domain socket connection class that listens on
* filename.
*
* The specified file should already exist before using this.
*/
class WvUnixDGConn : public WvUnixDGSocket
{
public:
WvUnixDGConn(WvStringParm filename)
: WvUnixDGSocket(filename, false)
{}
public:
const char *wstype() const { return "WvUnixDGConn"; }
};
/**
* Server end of a Unix datagram socket stream.
*
* Makes a datagram socket at filename with its permissions set to perms and
* then listens to it like a good little WvStream.
*
* FIXME: Make this suck less. Do we want this to look like a wvunixsocket?
*/
class WvUnixDGListener : public WvUnixDGSocket
{
public:
WvUnixDGListener(WvStringParm filename, int perms = 0222)
: WvUnixDGSocket(filename, true, perms)
{}
public:
const char *wstype() const { return "WvUnixDGListener"; }
};
#endif
|