This file is indexed.

/usr/include/foxeye/direct.h is in foxeye-dev 0.12.0-1build1.

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
/*
 * Copyright (C) 1999-2017  Andrej N. Gritsenko <andrej@rep.kiev.ua>
 *
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     This program 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 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.
 *
 * This file is part of FoxEye's source: direct connections API.
 */

#ifndef _DIRECT_H
#define _DIRECT_H 1

/* this is required for struct sockaddr */
#include <sys/socket.h>

typedef enum
{
  P_DISCONNECTED = 0,			/* no socket yet / lost socket */
  P_INITIAL,				/* authentication request sent */
  P_LOGIN,				/* thread done, main login state */
  P_TALK,				/* connected, main state */
  P_IDLE,				/* waiting for response */
  P_QUIT,				/* has to send quit message */
  P_LASTWAIT				/* closed session */
} _peer_state;


struct peer_t
{
  char *dname;				/* user away message / dest. name */
  INTERFACE *iface;			/* main interface of this session */
  void (*parse) (struct peer_t *, char *, char *, userflag, userflag, int, int,
		 struct bindtable_t *, char *); /* function to parse/broadcast line */
  struct connchain_i *connchain;	/* connchain instance */
  const char *network_type;		/* for connchain identification */
  struct peer_priv *priv;		/* session-specific data, NULL in thread */
  struct NODE *modules_data;		/* see PeerData_Attach(), etc. */
  time_t last_input;
  _peer_state state;
  userflag uf;				/* global+direct flags */
  idx_t socket;				/* what socket we have messages to */
  char start[20];			/* chat-on time */
#ifdef ENABLE_NLS
  char lang[12];			/* contains language, no encoding */
#endif
};

int Check_Passwd (const char *, char *);		/* plain, encrypted */

void Dcc_Parse (struct peer_t *, char *, char *, userflag, userflag, int, int,
		struct bindtable_t *, char *);		/* default parser */

int Listen_Port (char *, const char *, unsigned short, char *, void *,
		 int (*) (const struct sockaddr *, void *),
		 void (*) (pthread_t, void **, idx_t *),
		 void (*) (char *, char *, const char *, void *))
			__attribute__((warn_unused_result));
int Connect_Host (const char *, unsigned short, pthread_t *, idx_t *,
		  void (*) (int, void *), void *)
			__attribute__((warn_unused_result));

#define CONNCHAIN_READY	1	/* may be return from Connchain_Put(c,i,"",0) */

int Connchain_Grow (struct peer_t *, char);
int Connchain_Check (struct peer_t *, char);
int Connchain_Shrink (struct peer_t *, struct connchain_i *);
ssize_t Connchain_Put (struct connchain_i **, idx_t, const char *, size_t *)
			__attribute__((warn_unused_result));
ssize_t Connchain_Get (struct connchain_i **, idx_t, char *, size_t)
			__attribute__((warn_unused_result));

#define Connchain_Kill(peer) Connchain_Get(&peer->connchain,peer->socket,NULL,0)
#define Peer_Put(peer,buf,s) Connchain_Put(&peer->connchain,peer->socket,buf,s)
#define Peer_Get(peer,buf,s) Connchain_Get(&peer->connchain,peer->socket,buf,s)

int PeerData_Attach (struct peer_t *, const char *, void *, void (*)(void *));
void PeerData_Detach (struct peer_t *, const char *);
void *PeerData_Get (struct peer_t *, const char *);
void Peer_Cleanup (struct peer_t *peer);

/* interop direct.c -> connchain.c */
void _fe_init_connchains (void);

#endif