This file is indexed.

/usr/include/zorp/socket.h is in libzorpll-dev 3.9.1.3-2.

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
/***************************************************************************
 *
 * 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.
 *
 * $Id: socket.h,v 1.9 2003/11/26 12:01:22 bazsi Exp $
 *
 ***************************************************************************/

#ifndef ZORP_SOCKET_H_INCLUDED
#define ZORP_SOCKET_H_INCLUDED

#include <zorp/zorplib.h>
#include <zorp/sockaddr.h>

#ifdef __cplusplus
extern "C" {
#endif

/** bind to the next unused port in the same group */
#define ZSF_LOOSE_BIND    0x0001
#define ZSF_ACCEPT_ONE    0x0002
#define ZSF_MARK_TPROXY   0x0004
#define ZSF_TRANSPARENT   0x0008
/** bind to a port in the same group chosen at (truly) random */
#define ZSF_RANDOM_BIND   0x0010

static inline const gchar *
z_socket_type_to_str(gint socket_type)
{
  return socket_type == SOCK_STREAM ? "stream" : 
         socket_type == SOCK_DGRAM  ? "dgram" : 
         "unknown";
}

/**
 * Type for table of socket-related functions.
 **/
typedef struct _ZSocketFuncs
{
  gint (*bind)(int fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags);
  gint (*accept)(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
  gint (*connect)(int fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags);
  gint (*listen)(int fd, gint backlog, guint32 sock_flags);
  gint (*getsockname)(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
  gint (*getpeername)(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
  gint (*getdestname)(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
} ZSocketFuncs;

gint z_do_ll_bind(int fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags);
gint z_do_ll_accept(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
gint z_do_ll_connect(int fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags);
gint z_do_ll_listen(int fd, gint backlog, guint32 sock_flags);
gint z_do_ll_getsockname(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);
gint z_do_ll_getpeername(int fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags);

extern ZSocketFuncs *socket_funcs;

static inline gint
z_ll_bind(gint fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags)
{
  return socket_funcs->bind(fd, sa, salen, sock_flags);
}

static inline gint 
z_ll_accept(gint fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags)
{
  return socket_funcs->accept(fd, sa, salen, sock_flags);
}

static inline gint 
z_ll_connect(gint fd, struct sockaddr *sa, socklen_t salen, guint32 sock_flags)
{
  return socket_funcs->connect(fd, sa, salen, sock_flags);
}

static inline gint
z_ll_listen(gint fd, gint backlog, guint32 sock_flags)
{
  return socket_funcs->listen(fd, backlog, sock_flags);
}

static inline gint
z_ll_getsockname(gint fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags)
{
  return socket_funcs->getsockname(fd, sa, salen, sock_flags);
}

static inline gint
z_ll_getpeername(gint fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags)
{
  return socket_funcs->getpeername(fd, sa, salen, sock_flags);
}

static inline gint
z_ll_getdestname(gint fd, struct sockaddr *sa, socklen_t *salen, guint32 sock_flags)
{
  return socket_funcs->getdestname(fd, sa, salen, sock_flags);
}

GIOStatus z_bind(gint fd, ZSockAddr *addr, guint32 sock_flags);
GIOStatus z_bind2(gint fd, ZSockAddr *addr, guint32 sock_flags);
GIOStatus z_accept(gint fd, gint *newfd, ZSockAddr **addr, guint32 sock_flags);
GIOStatus z_connect(gint fd, ZSockAddr *remote, guint32 sock_flags);
GIOStatus z_disconnect(int fd, guint32 sock_flags);

GIOStatus z_listen(gint fd, gint backlog, guint32 sock_flags);
GIOStatus z_getsockname(gint fd, ZSockAddr **local_addr, guint32 sock_flags);
GIOStatus z_getpeername(gint fd, ZSockAddr **peer_addr, guint32 sock_flags);
GIOStatus z_getdestname(gint fd, ZSockAddr **dest_addr, guint32 sock_flags);

gboolean z_socket_init(void);
void z_socket_done(void);

#ifdef __cplusplus
}
#endif

#endif