/*
- * "$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:
*
* '_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 */
* 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));
}
}
* '_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 */
/*
- * 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 $".
*/