--- gvpe/src/sockinfo.h 2003/04/07 01:12:56 1.6 +++ gvpe/src/sockinfo.h 2005/03/05 19:13:15 1.10 @@ -1,9 +1,10 @@ /* sockinfo.h -- socket address management - - Copyright (C) 2003 Marc Lehmann + Copyright (C) 2003 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -14,15 +15,14 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef VPE_SOCKINFO_H__ #define VPE_SOCKINFO_H__ -#include -#include +#include "netcompat.h" #include "conf.h" @@ -47,20 +47,22 @@ const sockaddr *sav4 () const; const socklen_t salenv4 () const - { return sizeof (sockaddr_in); } + { + return sizeof (sockaddr_in); + } const char *ntoa () const; bool valid () const - { return prot != 0 && host != 0; } + { + return prot != 0 && host != 0; + } sockinfo() { prot = 0; } - sockinfo(const sockaddr_in &sa, u8 prot) - { set (&sa, prot); } - - sockinfo(const conf_node *conf, u8 prot) - { set (conf, prot); } + sockinfo(const char *hostname, u16 port, u8 prot) { set (hostname, port, prot); } + sockinfo(const sockaddr_in &sa, u8 prot) { set (&sa, prot); } + sockinfo(const conf_node *conf, u8 prot) { set (conf, prot); } }; bool operator == (const sockinfo &a, const sockinfo &b);