1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: servers.cpp File Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>servers.cpp File Reference</h1><code>#include "inspircd_config.h"</code><br>
9 <code>#include "<a class="el" href="servers_8h-source.html">servers.h</a>"</code><br>
10 <code>#include "inspircd.h"</code><br>
11 <code>#include <unistd.h></code><br>
12 <code>#include <fcntl.h></code><br>
13 <code>#include <poll.h></code><br>
14 <code>#include <sys/errno.h></code><br>
15 <code>#include <sys/ioctl.h></code><br>
16 <code>#include <sys/utsname.h></code><br>
17 <code>#include <vector></code><br>
18 <code>#include <string></code><br>
19 <code>#include <deque></code><br>
20 <code>#include <sstream></code><br>
21 <code>#include <map></code><br>
22 <code>#include "inspstring.h"</code><br>
23 <code>#include "helperfuncs.h"</code><br>
24 <code>#include "<a class="el" href="connection_8h-source.html">connection.h</a>"</code><br>
27 Include dependency graph for servers.cpp:<p><center><img src="servers_8cpp__incl.gif" border="0" usemap="#servers.cpp_map" alt="Include dependency graph"></center>
28 <map name="servers.cpp_map">
29 <area href="servers_8h.html" shape="rect" coords="341,210,418,237" alt="">
30 <area href="connection_8h.html" shape="rect" coords="178,312,277,338" alt="">
34 <a href="servers_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
36 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
37 <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a5">IsRoutable</a> (std::string servername)</td></tr>
39 <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a6">already_have_sum</a> (std::string sum)</td></tr>
41 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
42 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a0">TIME</a></td></tr>
44 <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a1">MaxConn</a></td></tr>
46 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classserverrec.html">serverrec</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a2">me</a> [32]</td></tr>
48 <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a3">has_been_netsplit</a></td></tr>
50 <tr><td class="memItemLeft" nowrap align=right valign=top>std::deque< std::string > </td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a4">xsums</a></td></tr>
53 <hr><h2>Function Documentation</h2>
54 <a name="a6" doxytag="servers.cpp::already_have_sum"></a><p>
55 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
58 <table cellpadding="0" cellspacing="0" border="0">
60 <td class="md" nowrap valign="top"> bool already_have_sum </td>
61 <td class="md" valign="top">( </td>
62 <td class="md" nowrap valign="top">std::string </td>
63 <td class="mdname1" valign="top" nowrap> <em>sum</em> </td>
64 <td class="md" valign="top"> ) </td>
65 <td class="md" nowrap></td>
72 <table cellspacing=5 cellpadding=0 border=0>
82 Definition at line <a class="el" href="servers_8cpp-source.html#l00425">425</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
84 References <a class="el" href="servers_8cpp-source.html#l00044">xsums</a>.
86 Referenced by <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>.
88 <div class="fragment"><pre>00426 {
89 00427 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="servers_8cpp.html#a4">xsums</a>.size(); i++)
91 00429 <span class="keywordflow">if</span> (<a class="code" href="servers_8cpp.html#a4">xsums</a>[i] == sum)
93 00431 <span class="keywordflow">return</span> <span class="keyword">true</span>;
96 00434 <span class="keywordflow">if</span> (<a class="code" href="servers_8cpp.html#a4">xsums</a>.size() >= 128)
98 00436 <a class="code" href="servers_8cpp.html#a4">xsums</a>.pop_front();
100 00438 <a class="code" href="servers_8cpp.html#a4">xsums</a>.push_back(sum);
101 00439 <span class="keywordflow">return</span> <span class="keyword">false</span>;
106 <a name="a5" doxytag="servers.cpp::IsRoutable"></a><p>
107 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
110 <table cellpadding="0" cellspacing="0" border="0">
112 <td class="md" nowrap valign="top"> bool IsRoutable </td>
113 <td class="md" valign="top">( </td>
114 <td class="md" nowrap valign="top">std::string </td>
115 <td class="mdname1" valign="top" nowrap> <em>servername</em> </td>
116 <td class="md" valign="top"> ) </td>
117 <td class="md" nowrap></td>
124 <table cellspacing=5 cellpadding=0 border=0>
134 Definition at line <a class="el" href="servers_8cpp-source.html#l00256">256</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
136 References <a class="el" href="servers_8h-source.html#l00081">serverrec::connectors</a>, <a class="el" href="channels_8cpp-source.html#l00097">me</a>, and <a class="el" href="connection_8h-source.html#l00035">STATE_DISCONNECTED</a>.
138 Referenced by <a class="el" href="servers_8cpp-source.html#l00274">serverrec::FlushWriteBuffers()</a>, and <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>.
140 <div class="fragment"><pre>00257 {
141 00258 <span class="keywordtype">int</span> c = 0;
142 00259 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x < 32; x++)
143 00260 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a34">me</a>[x])
145 00262 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="channels_8cpp.html#a34">me</a>[x]-><a class="code" href="classserverrec.html#o11">connectors</a>.size(); i++)
147 00264 <span class="keywordflow">if</span> ((<a class="code" href="channels_8cpp.html#a34">me</a>[x]-><a class="code" href="classserverrec.html#o11">connectors</a>[i].GetServerName() == servername) && (<a class="code" href="channels_8cpp.html#a34">me</a>[x]-><a class="code" href="classserverrec.html#o11">connectors</a>[i].GetState() != <a class="code" href="connection_8h.html#a0">STATE_DISCONNECTED</a>))
153 00270 <span class="keywordflow">return</span> (c != 0);
158 <hr><h2>Variable Documentation</h2>
159 <a name="a3" doxytag="servers.cpp::has_been_netsplit"></a><p>
160 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
163 <table cellpadding="0" cellspacing="0" border="0">
165 <td class="md" nowrap valign="top"> bool <a class="el" href="servers_8cpp.html#a3">has_been_netsplit</a>
170 <table cellspacing=5 cellpadding=0 border=0>
180 Definition at line <a class="el" href="servers_8cpp-source.html#l00042">42</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
182 Referenced by <a class="el" href="servers_8cpp-source.html#l00274">serverrec::FlushWriteBuffers()</a>, and <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>. </td>
185 <a name="a1" doxytag="servers.cpp::MaxConn"></a><p>
186 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
189 <table cellpadding="0" cellspacing="0" border="0">
191 <td class="md" nowrap valign="top"> int <a class="el" href="servers_8cpp.html#a1">MaxConn</a>
196 <table cellspacing=5 cellpadding=0 border=0>
206 Definition at line <a class="el" href="servers_8cpp-source.html#l00038">38</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
208 Referenced by <a class="el" href="servers_8cpp-source.html#l00081">serverrec::CreateListener()</a>. </td>
211 <a name="a2" doxytag="servers.cpp::me"></a><p>
212 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
215 <table cellpadding="0" cellspacing="0" border="0">
217 <td class="md" nowrap valign="top"> <a class="el" href="classserverrec.html">serverrec</a>* <a class="el" href="servers_8cpp.html#a2">me</a>[32]
222 <table cellspacing=5 cellpadding=0 border=0>
232 Definition at line <a class="el" href="servers_8cpp-source.html#l00040">40</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>. </td>
235 <a name="a0" doxytag="servers.cpp::TIME"></a><p>
236 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
239 <table cellpadding="0" cellspacing="0" border="0">
241 <td class="md" nowrap valign="top"> time_t <a class="el" href="users_8cpp.html#a2">TIME</a>
246 <table cellspacing=5 cellpadding=0 border=0>
256 Definition at line <a class="el" href="servers_8cpp-source.html#l00037">37</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>. </td>
259 <a name="a4" doxytag="servers.cpp::xsums"></a><p>
260 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
263 <table cellpadding="0" cellspacing="0" border="0">
265 <td class="md" nowrap valign="top"> std::deque<std::string> <a class="el" href="servers_8cpp.html#a4">xsums</a>
270 <table cellspacing=5 cellpadding=0 border=0>
280 Definition at line <a class="el" href="servers_8cpp-source.html#l00044">44</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
282 Referenced by <a class="el" href="servers_8cpp-source.html#l00425">already_have_sum()</a>. </td>
285 <hr size="1"><address style="align: right;"><small>Generated on Mon May 30 05:16:12 2005 for InspIRCd by
286 <a href="http://www.doxygen.org/index.html">
287 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
288 </a>1.3.3 </small></address>