From afb51347b493a6ab54fcc8595b4a3f46972ce18f Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 17 Apr 2004 12:33:39 +0000 Subject: Added new documentation to cover ircd_connector git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@629 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/connection_8h-source.html | 195 +++++++++++++++++++++--------- 1 file changed, 136 insertions(+), 59 deletions(-) (limited to 'docs/module-doc/connection_8h-source.html') diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index 13f3b5169..d0c8b9ff6 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -21,65 +21,142 @@ 00013 #include <unistd.h> 00014 #include <errno.h> 00015 #include <time.h> -00016 -00017 #ifndef __CONNECTION_H__ -00018 #define __CONNECTION_H__ -00019 -00020 #define PT_SYN_ONLY 0 -00021 #define PT_ACK_ONLY 1 -00022 #define PT_SYN_WITH_DATA 2 -00023 #define PT_KEY_EXCHANGE 3 -00024 -00025 -00026 class packet : public classbase -00027 { -00028 public: -00029 long key; -00030 short int id; -00031 short int type; -00032 char data[MAXBUF]; -00033 -00034 packet(); -00035 ~packet(); -00036 }; -00037 -00038 -00039 class connection : public classbase -00040 { -00041 public: -00042 long key; -00043 int fd; // file descriptor -00044 char host[256]; // hostname -00045 long ip; // ipv4 address -00046 char inbuf[MAXBUF]; // recvQ -00047 long bytes_in; -00048 long bytes_out; -00049 long cmds_in; -00050 long cmds_out; -00051 bool haspassed; -00052 int port; -00053 int registered; -00054 time_t lastping; -00055 time_t signon; -00056 time_t idle_lastmsg; -00057 time_t nping; -00058 char internal_addr[1024]; -00059 -00060 connection(); -00061 bool CreateListener(char* host, int p); -00062 bool BeginLink(char* targethost, int port, char* password); -00063 void TerminateLink(char* targethost); -00064 bool SendPacket(char *message, char* host, int port, long ourkey); -00065 bool RecvPacket(char *message, char* host, int &prt, long &theirkey); -00066 bool SendSYN(char* host, int port); -00067 bool SendACK(char* host, int port, int reply_id); -00068 long GenKey(); -00069 }; -00070 -00071 -00072 #endif -00073 -
Generated on Thu Apr 8 19:12:27 2004 for InspIRCd by +00016 #include <vector> +00017 #include <deque> +00018 +00019 #ifndef __CONNECTION_H__ +00020 #define __CONNECTION_H__ +00021 +00022 #define STATE_DISCONNECTED 0 +00023 #define STATE_CONNECTED 1 +00024 #define STATE_SYNC 2 +00025 #define STATE_NOAUTH_INBOUND 3 +00026 #define STATE_NOAUTH_OUTBOUND 4 +00027 +00040 class ircd_connector : public classbase +00041 { +00042 private: +00045 sockaddr_in addr; +00046 +00049 int fd; +00050 +00053 std::string servername; +00054 +00057 std::string description; +00058 +00062 int state; +00063 +00066 bool SetHostAddress(char* host, int port); +00067 +00068 public: +00069 +00074 char host[MAXBUF]; +00075 +00080 int port; +00081 +00086 std::vector<std::string> routes; +00087 +00088 +00091 bool MakeOutboundConnection(char* host, int port); +00092 +00095 std::string GetServerName(); +00096 +00099 void SetServerName(std::string serv); +00100 +00103 int GetDescriptor(); +00104 +00107 void SetDescriptor(int fd); +00108 +00111 int GetState(); +00112 +00115 void SetState(int state); +00116 +00119 char* GetServerIP(); +00120 +00123 std::string GetDescription(); +00124 +00127 void SetDescription(std::string desc); +00128 +00134 int GetServerPort(); +00135 +00138 void SetServerPort(int p); +00139 +00142 bool SetHostAndPort(char* host, int port); +00143 +00147 void CloseConnection(); +00148 }; +00149 +00150 +00151 class packet +00152 { +00156 }; +00157 +00160 class connection : public classbase +00161 { +00162 public: +00165 int fd; +00166 +00169 char host[256]; +00170 +00173 long ip; +00174 +00177 char inbuf[MAXBUF]; +00178 +00181 long bytes_in; +00182 +00185 long bytes_out; +00186 +00189 long cmds_in; +00190 +00193 long cmds_out; +00194 +00197 bool haspassed; +00198 +00203 int port; +00204 +00207 int registered; +00208 +00211 short int state; +00212 +00215 time_t lastping; +00216 +00219 time_t signon; +00220 +00223 time_t idle_lastmsg; +00224 +00227 time_t nping; +00228 +00231 char internal_addr[1024]; +00232 +00235 int internal_port; +00236 +00240 std::vector<ircd_connector> connectors; +00241 +00244 connection(); +00245 +00248 bool CreateListener(char* host, int p); +00249 +00252 bool BeginLink(char* targethost, int port, char* password, char* servername, int myport); +00253 +00256 bool MeshCookie(char* targethost, int port, long cookie, char* servername); +00257 +00260 void TerminateLink(char* targethost); +00261 +00265 bool SendPacket(char *message, const char* host); +00266 +00271 bool RecvPacket(std::deque<std::string> &messages, char* host); +00272 +00275 ircd_connector* FindHost(std::string host); +00276 +00280 bool AddIncoming(int fd,char* targethost, int sourceport); +00281 +00284 long GenKey(); +00285 }; +00286 +00287 +00288 #endif +00289 +
Generated on Sat Apr 17 13:31:38 2004 for InspIRCd by doxygen1.3-rc3
-- cgit v1.2.3