diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:07:11 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:07:11 +0000 |
commit | 5f4095e595fe36c6f83df96b7c59cb459b966ed3 (patch) | |
tree | 868b4a7d1f9bfcf3b85d9679fd7cbe48c6cc2005 /include | |
parent | a64a4665e0a2898ec08cf5996bdbf63c2567310e (diff) |
Change IP address storage in User to use more IPv4/IPv6 common code
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11575 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/usermanager.h | 2 | ||||
-rw-r--r-- | include/users.h | 18 |
2 files changed, 7 insertions, 13 deletions
diff --git a/include/usermanager.h b/include/usermanager.h index 01547029e..c2f89729a 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -78,7 +78,7 @@ class CoreExport UserManager : public Extensible * @param ip The IP address of the user * @return This function has no return value, but a call to AddClient may remove the user. */ - void AddUser(InspIRCd* Instance, int socket, int port, bool iscached, sockaddr* ip, const std::string &targetip); + void AddUser(InspIRCd* Instance, int socket, int port, bool iscached, irc::sockets::sockaddrs* ip, const std::string &targetip); /** Disconnect a user gracefully * @param user The user to remove diff --git a/include/users.h b/include/users.h index 175ad0d0f..0964de9b9 100644 --- a/include/users.h +++ b/include/users.h @@ -472,28 +472,22 @@ class CoreExport User : public EventHandler */ bool quitting; - /** IPV4 or IPV6 ip address. Use SetSockAddr to set this and GetProtocolFamily/ - * GetIPString/GetPort to obtain its values. + /** IPV4 or IPV6 ip address, binary format. Use SetSockAddr to set this and + * GetIPString/GetPort to obtain its value in a readable manner */ - sockaddr* ip; + irc::sockets::sockaddrs ip; /** Initialize the clients sockaddr - * @param protocol_family The protocol family of the IP address, AF_INET or AF_INET6 - * @param ip A human-readable IP address for this user matching the protcol_family - * @param port The port number of this user or zero for a remote user + * @param ip A human-readable IP address for this user + * @param port The port number of this user (zero if unknown) */ - void SetSockAddr(int protocol_family, const char* ip, int port); + void SetSockAddr(const char* ip, int port); /** Get port number from sockaddr * @return The port number of this user. */ int GetPort(); - /** Get protocol family from sockaddr - * @return The protocol family of this user, either AF_INET or AF_INET6 - */ - int GetProtocolFamily(); - /** Get IP string from sockaddr, using static internal buffer * @return The IP string */ |