]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/address_conf.h
kes Apply Marco van Wieringen's set of patches, cleans up Migration/Copy
[bacula/bacula] / bacula / src / lib / address_conf.h
index 67f731ffbf404b439e6f505a48e40d535cc7f76d..9e7d5efc76dc51fc1127d96f0c75f82959001246 100644 (file)
@@ -1,33 +1,39 @@
 /*
- *
- *   Written by Meno Abels, June MMIIII
- *
- *   Version $Id$
- */
+   Bacula® - The Network Backup Solution
 
-/*
-   Copyright (C) 2004 Kern Sibbald and John Walker
+   Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
 
-   This program 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.
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
+   Bacula® is a registered trademark of Kern Sibbald.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *
+ *   Written by Meno Abels, June MMIV
+ *
+ *   Version $Id$
  */
 
 
-//class IPADDR : public SMARTALLOC {
-class IPADDR {
+class IPADDR : public SMARTALLOC {
  public:
    typedef enum { R_SINGLE, R_SINGLE_PORT, R_SINGLE_ADDR, R_MULTIPLE,
                   R_DEFAULT, R_EMPTY
@@ -35,7 +41,7 @@ class IPADDR {
    IPADDR(int af);
    IPADDR(const IPADDR & src);
  private:
-   IPADDR() {  /* block this construction */ } 
+   IPADDR() {  /* block this construction */ }
    i_type type;
    union {
       struct sockaddr dontuse;
@@ -43,7 +49,7 @@ class IPADDR {
 #ifdef HAVE_IPV6
       struct sockaddr_in6 dontuse6;
 #endif
-   } buf;
+   } saddrbuf;
    struct sockaddr *saddr;
    struct sockaddr_in *saddr4;
 #ifdef HAVE_IPV6
@@ -88,4 +94,11 @@ extern int get_first_port_host_order(dlist * addrs);
 extern const char *build_addresses_str(dlist *addrs, char *buf, int blen);
 
 extern int sockaddr_get_port_net_order(const struct sockaddr *sa);
-extern int sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
+extern int sockaddr_get_port(const struct sockaddr *sa);
+extern char *sockaddr_to_ascii(const struct sockaddr *sa, char *buf, int len);
+#ifdef WIN32
+#undef HAVE_OLD_SOCKOPT
+#endif
+#ifdef HAVE_OLD_SOCKOPT
+extern int inet_aton(const char *cp, struct in_addr *inp);
+#endif