summaryrefslogtreecommitdiff
path: root/docs/man/man3/servers.cpp.3
blob: bedaea1c458e54fd8fcee074ccf3873ab22f1489 (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
151
152
153
154
155
156
157
158
159
160
.TH "servers.cpp" 3 "25 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 411 of file servers.cpp.
.PP
References xsums.
.PP
Referenced by serverrec::RecvPacket().
.PP
.nf
412 {
413         for (int i = 0; i < xsums.size(); i++)
414         {
415                 if (xsums[i] == sum)
416                 {
417                         return true;
418                 }
419         }
420         if (xsums.size() >= 128)
421         {
422                 xsums.pop_front();
423         }
424         xsums.push_back(sum);
425         return false;
426 }
.fi
.SS "bool IsRoutable (std::string servername)"
.PP
Definition at line 256 of file servers.cpp.
.PP
References serverrec::connectors, serverrec::FindHost(), ircd_connector::GetState(), me, and STATE_DISCONNECTED.
.PP
Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().
.PP
.nf
257 {
258         for (int x = 0; x < 32; x++) if (me[x])
259         {
260                 ircd_connector* cn = me[x]->FindHost(servername.c_str());
261                 if (cn)
262                 {
263                         if (cn->GetState() == STATE_DISCONNECTED)
264                         {
265                                 for (int k = 0; k < me[x]->connectors.size(); k++)
266                                 {
267                                         for (int m = 0; m < me[x]->connectors[k].routes.size(); m++)
268                                         {
269                                                 if (!strcasecmp(me[x]->connectors[k].routes[m].c_str(),servername.c_str()))
270                                                 {
271                                                         return true;
272                                                 }
273                                         }
274                                 }
275                                 return false;
276                         }
277                         else return true;
278                 }
279         }
280         return false;
281 }
.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.