blob: ff4d1a736b4b8f6a6e26eb2c540c254ee56eabf3 (
plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
.TH "servers.cpp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
servers.cpp \-
.SH SYNOPSIS
.br
.PP
\fC#include 'inspircd_config.h'\fP
.br
\fC#include 'servers.h'\fP
.br
\fC#include 'inspircd.h'\fP
.br
\fC#include <unistd.h>\fP
.br
\fC#include <fcntl.h>\fP
.br
\fC#include <poll.h>\fP
.br
\fC#include <sys/errno.h>\fP
.br
\fC#include <sys/ioctl.h>\fP
.br
\fC#include <sys/utsname.h>\fP
.br
\fC#include <vector>\fP
.br
\fC#include <string>\fP
.br
\fC#include <deque>\fP
.br
\fC#include <sstream>\fP
.br
\fC#include <map>\fP
.br
\fC#include 'inspstring.h'\fP
.br
\fC#include 'helperfuncs.h'\fP
.br
\fC#include 'connection.h'\fP
.br
.SS "Functions"
.in +1c
.ti -1c
.RI "bool \fBIsRoutable\fP (std::string servername)"
.br
.ti -1c
.RI "bool \fBalready_have_sum\fP (std::string sum)"
.br
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "time_t \fBTIME\fP"
.br
.ti -1c
.RI "int \fBMaxConn\fP"
.br
.ti -1c
.RI "\fBserverrec\fP * \fBme\fP [32]"
.br
.ti -1c
.RI "bool \fBhas_been_netsplit\fP"
.br
.ti -1c
.RI "std::deque< std::string > \fBxsums\fP"
.br
.in -1c
.SH "Function Documentation"
.PP
.SS "bool already_have_sum (std::string sum)"
.PP
Definition at line 425 of file servers.cpp.
.PP
References xsums.
.PP
Referenced by serverrec::RecvPacket().
.PP
.nf
426 {
427 for (int i = 0; i < xsums.size(); i++)
428 {
429 if (xsums[i] == sum)
430 {
431 return true;
432 }
433 }
434 if (xsums.size() >= 128)
435 {
436 xsums.pop_front();
437 }
438 xsums.push_back(sum);
439 return false;
440 }
.fi
.SS "bool IsRoutable (std::string servername)"
.PP
Definition at line 256 of file servers.cpp.
.PP
References serverrec::connectors, me, and STATE_DISCONNECTED.
.PP
Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().
.PP
.nf
257 {
258 int c = 0;
259 for (int x = 0; x < 32; x++)
260 if (me[x])
261 {
262 for (int i = 0; i < me[x]->connectors.size(); i++)
263 {
264 if ((me[x]->connectors[i].GetServerName() == servername) && (me[x]->connectors[i].GetState() != STATE_DISCONNECTED))
265 {
266 c++;
267 }
268 }
269 }
270 return (c != 0);
271 }
.fi
.SH "Variable Documentation"
.PP
.SS "bool \fBhas_been_netsplit\fP"
.PP
Definition at line 42 of file servers.cpp.
.PP
Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().
.SS "int \fBMaxConn\fP"
.PP
Definition at line 38 of file servers.cpp.
.PP
Referenced by serverrec::CreateListener().
.SS "\fBserverrec\fP* \fBme\fP[32]"
.PP
Definition at line 40 of file servers.cpp.
.SS "time_t \fBTIME\fP"
.PP
Definition at line 37 of file servers.cpp.
.SS "std::deque<std::string> \fBxsums\fP"
.PP
Definition at line 44 of file servers.cpp.
.PP
Referenced by already_have_sum().
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
|