diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-04-05 03:11:39 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-04-05 03:11:39 +0000 |
commit | c4851e78e4f63338fe9a4883e5b7a0370dce27f7 (patch) | |
tree | 3910aa2e83f782cec94f15b4547dadb741cd29ce /net/gnome-netstatus/files/patch-src_netstatus-iface.c | |
parent | Add gnomekeyring, an API and daemon for managing lists of credentials. This (diff) |
Presenting GNOME 2.6.0. The FreeBSD GNOME Team feels this our best release
ever. It fixes many bugs, and adds some features missing in previous
FreeBSD ports. To help users upgrade from GNOME 2.4, we have constructed an
upgrade FAQ at:
http://www.freebsd.org/gnome/docs/faq26.html
Please read it carefully. GNOME 2.6 packages are also available for all
supported i386 versions of FreeBSD at:
http://www.marcuscom.com/tinderbox/
The FreeBSD GNOME Team would like the thank the following users for their
wonderful testing and patching efforts. We would especially like to thank
Franz Klammer <klammer@webonaut.com> for his wonderful new splash screen.
Without these people, our team, and our team alumni, GNOME on FreeBSD would
not be possible.
Jeremy Messenger <mezz7@cox.net>
Khairil Yusof <kaeru@pd.jaring.my>
Koop Mast <kwm@rainbow-runner.nl>
Simon Barner <barner@in.tum.de>
Tom McLaughlin <tmclaugh@sdf.lonestar.org>
Scott Dodson <sdodson@sdodson.com>
Vladimir Grebenschikov <vova@sw.ru>
Diffstat (limited to 'net/gnome-netstatus/files/patch-src_netstatus-iface.c')
-rw-r--r-- | net/gnome-netstatus/files/patch-src_netstatus-iface.c | 109 |
1 files changed, 7 insertions, 102 deletions
diff --git a/net/gnome-netstatus/files/patch-src_netstatus-iface.c b/net/gnome-netstatus/files/patch-src_netstatus-iface.c index f332699155bc..1ffae4384ecb 100644 --- a/net/gnome-netstatus/files/patch-src_netstatus-iface.c +++ b/net/gnome-netstatus/files/patch-src_netstatus-iface.c @@ -1,114 +1,19 @@ ---- src/netstatus-iface.c.orig Fri Oct 31 08:49:51 2003 -+++ src/netstatus-iface.c Fri Jan 2 23:29:27 2004 -@@ -32,9 +32,12 @@ +--- src/netstatus-iface.c.orig Mon Mar 22 17:49:17 2004 ++++ src/netstatus-iface.c Mon Mar 22 17:50:12 2004 +@@ -32,6 +32,8 @@ #include <libgnome/gnome-i18n.h> +#include <sys/types.h> +#include <sys/socket.h> #include <sys/ioctl.h> + #ifdef HAVE_SYS_SOCKIO_H + #include <sys/sockio.h> +@@ -39,6 +41,7 @@ + #include <sys/param.h> #include <net/if.h> #include <net/if_arp.h> +#include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> #include <unistd.h> -@@ -577,6 +580,7 @@ - iface); - - netstatus_iface_monitor_timeout (iface); -+ - } - } - -@@ -646,7 +650,11 @@ - strncpy (if_req.ifr_name, iface->priv->name, IF_NAMESIZE - 1); - if_req.ifr_name [IF_NAMESIZE - 1] = '\0'; - if (mask && ioctl (fd, SIOCGIFNETMASK, &if_req) == 0) -+#if !defined(__FreeBSD__) - *mask = g_strdup (inet_ntoa (((struct sockaddr_in *) &if_req.ifr_netmask)->sin_addr)); -+#else -+ *mask = g_strdup (inet_ntoa (((struct sockaddr_in *) &if_req.ifr_addr)->sin_addr)); -+#endif - - close (fd); - -@@ -925,6 +933,7 @@ - char **hw_addr) - - { -+#ifdef SIOCGIFHWADDR - static struct HwType *hw_type = NULL; - struct ifreq if_req; - int fd; -@@ -973,6 +982,9 @@ - *hw_addr = hw_type->print_hw_addr (if_req.ifr_hwaddr.sa_data); - - return hw_type; -+#else -+ return NULL; -+#endif - } - - gboolean -@@ -1083,8 +1095,11 @@ - struct ifconf *if_conf; - GList *interfaces; - GList *loopbacks; -+ gchar *ptr; - int fd; -- int i; -+ struct ifreq *if_req; -+ int len; -+ gboolean loopback; - - if ((fd = socket (AF_INET, SOCK_DGRAM, 0)) < 0) - { -@@ -1105,12 +1120,25 @@ - interfaces = NULL; - loopbacks = NULL; - -- for (i = 0; i < if_conf->ifc_len / sizeof (struct ifreq); i++) -+ for (ptr = if_conf->ifc_buf; ptr < if_conf->ifc_buf + if_conf->ifc_len;) - { -- struct ifreq if_req = if_conf->ifc_req [i]; -- gboolean loopback = FALSE; -+ if_req = (struct ifreq *) ptr; -+ loopback = FALSE; -+ len = sizeof(struct sockaddr); -+#if defined(HAVE_SOCKADDR_SA_LEN) || defined(__FreeBSD__) -+ if (if_req->ifr_addr.sa_len > len) -+ len = if_req->ifr_addr.sa_len; -+#endif -+ -+ ptr += sizeof(if_req->ifr_name) + len; -+ -+ if (g_list_find_custom (interfaces, if_req->ifr_name, -+ (GCompareFunc) g_ascii_strcasecmp) != NULL -+ || g_list_find_custom (loopbacks, if_req->ifr_name, -+ (GCompareFunc) g_ascii_strcasecmp) != NULL) -+ continue; - -- if (ioctl (fd, SIOCGIFFLAGS, &if_req) < 0) -+ if (ioctl (fd, SIOCGIFFLAGS, if_req) < 0) - { - if (error) - *error = g_error_new (NETSTATUS_ERROR, -@@ -1120,13 +1148,14 @@ - } - else - { -- loopback = (if_req.ifr_flags & IFF_LOOPBACK); -+ loopback = (if_req->ifr_flags & IFF_LOOPBACK); - } - - if (!loopback) -- interfaces = g_list_prepend (interfaces, g_strdup (if_req.ifr_name)); -+ interfaces = g_list_prepend (interfaces, g_strdup (if_req->ifr_name)); - else -- loopbacks = g_list_prepend (loopbacks, g_strdup (if_req.ifr_name)); -+ loopbacks = g_list_prepend (loopbacks, g_strdup (if_req->ifr_name)); -+ - } - - interfaces = g_list_concat (interfaces, loopbacks); |