This file is indexed.

/usr/include/lscp/socket.h is in liblscp-dev 0.5.6-7ubuntu1.

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
// socket.h
//
/****************************************************************************
   liblscp - LinuxSampler Control Protocol API
   Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU General Public License along
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

*****************************************************************************/

#ifndef __LSCP_SOCKET_H
#define __LSCP_SOCKET_H

#include "lscp/thread.h"

#if defined(WIN32)
#include <winsock.h>
#else
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#endif

#if defined(__cplusplus)
extern "C" {
#endif

//-------------------------------------------------------------------------
// Sockets.

#if defined(WIN32)
typedef SOCKET lscp_socket_t;
typedef int socklen_t;
#else
typedef int lscp_socket_t;
#define INVALID_SOCKET  -1
#define SOCKET_ERROR    -1
#define closesocket(s)  close(s)
#endif

#define LSCP_BUFSIZ     1024

void lscp_socket_perror (const char *pszPrefix);
void lscp_socket_herror (const char *pszPrefix);

void lscp_socket_getopts (const char *pszPrefix, lscp_socket_t sock);
void lscp_socket_trace   (const char *pszPrefix, struct sockaddr_in *pAddr, const char *pchBuffer, int cchBuffer);


//-------------------------------------------------------------------------
// Threaded socket agent struct helpers.

typedef struct _lscp_socket_agent_t {

	lscp_socket_t       sock;
	struct sockaddr_in  addr;
	lscp_thread_t      *pThread;
	int                 iState;

} lscp_socket_agent_t;

void          lscp_socket_agent_init  (lscp_socket_agent_t *pAgent, lscp_socket_t sock, struct sockaddr_in *pAddr, int cAddr);
lscp_status_t lscp_socket_agent_start (lscp_socket_agent_t *pAgent, lscp_thread_proc_t pfnProc, void *pvData, int iDetach);
lscp_status_t lscp_socket_agent_join  (lscp_socket_agent_t *pAgent);
lscp_status_t lscp_socket_agent_free  (lscp_socket_agent_t *pAgent);

#if defined(__cplusplus)
}
#endif


#endif // __LSCP_SOCKET_H

// end of socket.h