Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

servers.cpp File Reference

#include "inspircd_config.h"
#include "servers.h"
#include "inspircd.h"
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <vector>
#include <string>
#include <deque>
#include <sstream>
#include <map>
#include "inspstring.h"
#include "helperfuncs.h"
#include "connection.h"

Include dependency graph for servers.cpp:

Include dependency graph

Go to the source code of this file.

Functions

bool IsRoutable (std::string servername)
bool already_have_sum (std::string sum)

Variables

time_t TIME
int MaxConn
serverrecme [32]
bool has_been_netsplit
std::deque< std::string > xsums


Function Documentation

bool already_have_sum std::string  sum  ) 
 

Definition at line 425 of file servers.cpp.

References xsums.

Referenced by serverrec::RecvPacket().

00426 {
00427         for (int i = 0; i < xsums.size(); i++)
00428         {
00429                 if (xsums[i] == sum)
00430                 {
00431                         return true;
00432                 }
00433         }
00434         if (xsums.size() >= 128)
00435         {
00436                 xsums.pop_front();
00437         }
00438         xsums.push_back(sum);
00439         return false;
00440 }

bool IsRoutable std::string  servername  ) 
 

Definition at line 256 of file servers.cpp.

References serverrec::connectors, me, and STATE_DISCONNECTED.

Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().

00257 {
00258         int c = 0;
00259         for (int x = 0; x < 32; x++)
00260         if (me[x])
00261         {
00262                 for (int i = 0; i < me[x]->connectors.size(); i++)
00263                 {
00264                         if ((me[x]->connectors[i].GetServerName() == servername) && (me[x]->connectors[i].GetState() != STATE_DISCONNECTED))
00265                         {
00266                                 c++;
00267                         }
00268                 }
00269         }
00270         return (c != 0);
00271 }


Variable Documentation

bool has_been_netsplit
 

Definition at line 42 of file servers.cpp.

Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().

int MaxConn
 

Definition at line 38 of file servers.cpp.

Referenced by serverrec::CreateListener().

serverrec* me[32]
 

Definition at line 40 of file servers.cpp.

time_t TIME
 

Definition at line 37 of file servers.cpp.

std::deque<std::string> xsums
 

Definition at line 44 of file servers.cpp.

Referenced by already_have_sum().


Generated on Mon May 30 05:16:12 2005 for InspIRCd by doxygen 1.3.3