*/
sockaddr_in addr;
- /** File descriptor of the outbound connection
+ /** File descriptor of the connection
*/
int fd;
*/
std::string servername;
- /** Server names of servers that this server is linked to
- * So for A->B->C, if this was the record for B it would contain A and C
- * whilever both servers are connected to B.
+ /** Server 'GECOS'
*/
- std::vector<std::string> routes;
+ std::string description;
/** State. STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND
* STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTED
bool SetHostAddress(char* host, int port);
public:
+ char host[MAXBUF];
+ int port;
+
+ /** Server names of servers that this server is linked to
+ * So for A->B->C, if this was the record for B it would contain A and C
+ * whilever both servers are connected to B.
+ */
+ std::vector<std::string> routes;
+
bool MakeOutboundConnection(char* host, int port);
std::string GetServerName();
void SetDescriptor(int fd);
int GetState();
void SetState(int state);
+ char* GetServerIP();
+ std::string GetDescription();
+ void SetDescription(std::string desc);
+ int GetServerPort();
+ bool SetHostAndPort(char* host, int port);
+ void CloseConnection();
};
connection();
bool CreateListener(char* host, int p);
bool BeginLink(char* targethost, int port, char* password, char* servername);
+ bool MeshCookie(char* targethost, int port, long cookie, char* servername);
void TerminateLink(char* targethost);
- bool SendPacket(char *message, char* host);
+ bool SendPacket(char *message, const char* host);
bool RecvPacket(std::deque<std::string> &messages, char* host);
ircd_connector* FindHost(std::string host);
- bool AddIncoming(int fd,char* targethost);
+ bool AddIncoming(int fd,char* targethost, int sourceport);
long GenKey();
};