]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/getifaddrs.c
Import CUPS v1.7.1
[thirdparty/cups.git] / cups / getifaddrs.c
index 6cb448d6134a0729b689bb98ca3b57b4837d938d..02903a799c9f46a886a62e8a9394077c85d5bd0f 100644 (file)
@@ -1,26 +1,16 @@
 /*
- * "$Id: getifaddrs.c 5428 2006-04-18 20:45:30Z mike $"
+ * "$Id: getifaddrs.c 10996 2013-05-29 11:51:34Z msweet $"
  *
- *   Network interface functions for the Common UNIX Printing System
- *   (CUPS) scheduler.
+ *   Network interface functions for CUPS.
  *
+ *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
  *   "LICENSE" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -40,7 +30,7 @@
  * '_cups_getifaddrs()' - Get a list of network interfaces on the system.
  */
 
-static int                             /* O - 0 on success, -1 on error */
+int                                    /* O - 0 on success, -1 on error */
 _cups_getifaddrs(struct ifaddrs **addrs)/* O - List of interfaces */
 {
   int                  sock;           /* Socket */
@@ -182,8 +172,9 @@ _cups_getifaddrs(struct ifaddrs **addrs)/* O - List of interfaces */
        * Got it, make a copy...
        */
 
-       if ((temp->ifa_dstaddr = calloc(1, sizeof(request.ifr_broadaddr))) != NULL)
-         memcpy(temp->ifa_dstaddr, &(request.ifr_broadaddr),
+       if ((temp->ifa_broadaddr =
+                calloc(1, sizeof(request.ifr_broadaddr))) != NULL)
+         memcpy(temp->ifa_broadaddr, &(request.ifr_broadaddr),
                 sizeof(request.ifr_broadaddr));
       }
     }
@@ -216,7 +207,7 @@ _cups_getifaddrs(struct ifaddrs **addrs)/* O - List of interfaces */
  * '_cups_freeifaddrs()' - Free an interface list...
  */
 
-static void
+void
 _cups_freeifaddrs(struct ifaddrs *addrs)/* I - Interface list to free */
 {
   struct ifaddrs       *next;          /* Next interface in list */
@@ -271,5 +262,5 @@ _cups_freeifaddrs(struct ifaddrs *addrs)/* I - Interface list to free */
 
 
 /*
- * End of "$Id: getifaddrs.c 5428 2006-04-18 20:45:30Z mike $".
+ * End of "$Id: getifaddrs.c 10996 2013-05-29 11:51:34Z msweet $".
  */