/usr/include/zorp/socketsource.h is in libzorpll-6.0-10-dev 6.0.10.0-3.
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 | /***************************************************************************
*
* This file is covered by a dual licence. You can choose whether you
* want to use it according to the terms of the GNU GPL version 2, or
* under the terms of Zorp Professional Firewall System EULA located
* on the Zorp installation CD.
*
***************************************************************************/
#ifndef ZORP_SOCKET_SOURCE_H_INCLUDED
#define ZORP_SOCKET_SOURCE_H_INCLUDED
#include <zorp/stream.h>
#include <zorp/zorplib.h>
#include <zorp/io.h>
#ifdef G_OS_WIN32
# include <winsock2.h>
# define Z_SOCKEVENT_READ FD_READ
# define Z_SOCKEVENT_WRITE FD_WRITE
# define Z_SOCKEVENT_PRI FD_PRI
# define Z_SOCKEVENT_ACCEPT FD_ACCEPT
# define Z_SOCKEVENT_CONNECT FD_CONNECT
# define Z_SOCKEVENT_HUP FD_CLOSE
#else
# define Z_SOCKEVENT_READ G_IO_IN
# define Z_SOCKEVENT_WRITE G_IO_OUT
# define Z_SOCKEVENT_PRI G_IO_PRI
# define Z_SOCKEVENT_ACCEPT G_IO_IN
# define Z_SOCKEVENT_CONNECT G_IO_OUT
# define Z_SOCKEVENT_HUP G_IO_HUP
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* Event source class for sockets.
**/
typedef struct _ZSocketSource
{
GSource super;
GIOCondition cond;
GPollFD poll;
gint timeout_time;
gboolean suspended;
gboolean timed_out;
#ifdef G_OS_WIN32
SOCKET fd;
gboolean acceptevent;
#endif
} ZSocketSource;
static inline gboolean
z_socket_source_is_suspended(GSource *s)
{
return ((ZSocketSource *) s)->suspended;
}
typedef gboolean (*ZSocketSourceFunc)(gboolean timed_out, gpointer data);
GSource *z_socket_source_new(gint fd, GIOCondition cond, gint timeout);
void z_socket_source_suspend(GSource *);
void z_socket_source_resume(GSource *);
#ifdef __cplusplus
}
#endif
#endif
|