mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
Add gnomenettool after a repo-copy from gnomenetwork. Gnome-nettool is the
netinfo piece of gnome-network broken out into its own distribution. Gnome-nettool is a MacOS X-like Network Utility that disaplys interface information as well as front-ends many useful network tools like ping, netstat, traceroute, host, finger, and whois.
This commit is contained in:
parent
d1c8053348
commit
3d44025101
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112985
@ -168,6 +168,7 @@
|
||||
SUBDIR += gnomeicu2
|
||||
SUBDIR += gnomemeeting
|
||||
SUBDIR += gnomenetstatus
|
||||
SUBDIR += gnomenettool
|
||||
SUBDIR += gnomenetwork
|
||||
SUBDIR += gnometelnet
|
||||
SUBDIR += gnosamba
|
||||
|
@ -5,29 +5,28 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= gnomenetwork
|
||||
PORTVERSION= 1.99.5
|
||||
PORTREVISION= 3
|
||||
PORTNAME= gnomenettool
|
||||
PORTVERSION= 0.99.1
|
||||
CATEGORIES= net gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-network/1.99
|
||||
DISTNAME= gnome-network-${PORTVERSION}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-nettool/0.99
|
||||
DISTNAME= gnome-nettool-${PORTVERSION}
|
||||
DIST_SUBDIR= gnome2
|
||||
|
||||
MAINTAINER= gnome@FreeBSD.org
|
||||
COMMENT= A library for writing networked servers & clients
|
||||
COMMENT= A GNOME utility that provides network information statistics
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
USE_BZIP2= yes
|
||||
USE_GNOME= gnomehack gnomeprefix libgnomeui
|
||||
USE_GNOME= gnomehack intlhack lthack gnomeprefix libgnomeui
|
||||
USE_GMAKE= yes
|
||||
USE_LIBTOOL_VER=13
|
||||
CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
post-patch:
|
||||
${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \
|
||||
s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";|'
|
||||
post-install:
|
||||
${MKDIR} ${PREFIX}/share/gnome/pixmaps
|
||||
${LN} -sf ${PREFIX}/share/gnome/gnome-nettool/pixmaps/gnome-nettool.png \
|
||||
${PREFIX}/share/gnome/pixmaps/gnome-nettool.png
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (gnome2/gnome-network-1.99.5.tar.bz2) = 77532442a106d06ed2fe015f87d9b522
|
||||
SIZE (gnome2/gnome-network-1.99.5.tar.bz2) = 660804
|
||||
MD5 (gnome2/gnome-nettool-0.99.1.tar.bz2) = 090c425dc85415e1525298c7014c95a2
|
||||
SIZE (gnome2/gnome-nettool-0.99.1.tar.bz2) = 498036
|
||||
|
@ -1,10 +1,49 @@
|
||||
--- configure.orig Wed Dec 11 18:31:51 2002
|
||||
+++ configure Thu Dec 12 12:07:17 2002
|
||||
@@ -7414,6 +7414,7 @@
|
||||
--- configure.orig Sun Jul 4 16:00:33 2004
|
||||
+++ configure Sun Jul 4 16:02:31 2004
|
||||
@@ -20269,7 +20269,7 @@
|
||||
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
|
||||
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
|
||||
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"; $ac_aux_dir/ltconfig $LIBTOOL_DEPS;
|
||||
+LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool13/ltmain.sh"; /usr/local/share/libtool13/ltconfig13 $LIBTOOL_DEPS;
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
@@ -22038,13 +22038,13 @@
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define GNOME_ICONDIR "${ac_default_prefix}/share/pixmaps"
|
||||
+#define GNOME_ICONDIR "${ac_default_prefix}/share/gnome/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define GNOME_ICONDIR "${prefix}/share/pixmaps"
|
||||
+#define GNOME_ICONDIR "${prefix}/share/gnome/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
@@ -22052,17 +22052,17 @@
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define PIXMAPS_DIR "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+#define PIXMAPS_DIR "${ac_default_prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
- pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+ pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define PIXMAPS_DIR "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+#define PIXMAPS_DIR "${prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
- pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+ pixmapsdir="${prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,63 +0,0 @@
|
||||
--- gnome-netinfo/info.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/info.c Wed Dec 17 22:27:46 2003
|
||||
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
+#include <netinet/in.h>
|
||||
#include <sys/socket.h> /* basic socket definitions */
|
||||
#include <arpa/inet.h> /* inet(3) functions */
|
||||
#include <sys/un.h> /* for Unix domain sockets */
|
||||
@@ -173,7 +174,7 @@
|
||||
for (ptr = buf; ptr < buf + ifc.ifc_len;) {
|
||||
ifr = (struct ifreq *) ptr;
|
||||
len = sizeof (struct sockaddr);
|
||||
-#ifdef HAVE_SOCKADDR_SA_LEN
|
||||
+#if defined(HAVE_SOCKADDR_SA_LEN) || defined(__FreeBSD__)
|
||||
if (ifr->ifr_addr.sa_len > len)
|
||||
len = ifr->ifr_addr.sa_len; /* length > 16 */
|
||||
#endif
|
||||
@@ -182,8 +183,12 @@
|
||||
if (strcmp (ifr->ifr_name, nic) != 0) {
|
||||
continue;
|
||||
}
|
||||
+
|
||||
+ memset (&data, 0, sizeof(data));
|
||||
|
||||
+#ifdef __linux__
|
||||
data = mii_get_basic (nic);
|
||||
+#endif
|
||||
|
||||
switch (ifr->ifr_addr.sa_family) {
|
||||
case AF_INET:
|
||||
@@ -306,7 +311,6 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
- g_free (ifr);
|
||||
}
|
||||
|
||||
static GList *
|
||||
@@ -321,6 +325,8 @@
|
||||
|
||||
sockfd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
+ memset (&ifc, 0, sizeof (struct ifconf));
|
||||
+ memset (&buf, 0, sizeof (buf));
|
||||
ifc.ifc_len = sizeof (buf);
|
||||
ifc.ifc_req = (struct ifreq *) buf;
|
||||
|
||||
@@ -331,9 +337,11 @@
|
||||
len = sizeof (struct sockaddr);
|
||||
|
||||
iface = g_strdup (ifr->ifr_name);
|
||||
- items = g_list_append (items, iface);
|
||||
+ if (g_list_find_custom (items, iface, (GCompareFunc) g_ascii_strcasecmp) == NULL) {
|
||||
+ items = g_list_append (items, iface);
|
||||
+ }
|
||||
|
||||
-#ifdef HAVE_SOCKADDR_SA_LEN
|
||||
+#if defined(HAVE_SOCKADDR_SA_LEN) || defined(__FreeBSD__)
|
||||
if (ifr->ifr_addr.sa_len > len)
|
||||
len = ifr->ifr_addr.sa_len; /* length > 16 */
|
||||
#endif
|
@ -1,10 +0,0 @@
|
||||
--- gnome-netinfo/callbacks.c.orig Sat Dec 6 23:20:05 2003
|
||||
+++ gnome-netinfo/callbacks.c Sat Dec 6 23:20:14 2003
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#include "callbacks.h"
|
||||
#include "traceroute.h"
|
@ -1,41 +0,0 @@
|
||||
--- gnome-netinfo/netinfo.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/netinfo.c Sun Dec 7 01:00:52 2003
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <gnome.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -253,14 +254,16 @@
|
||||
if (condition & G_IO_IN) {
|
||||
g_io_channel_read_line (channel, &text, &len, NULL, NULL);
|
||||
|
||||
- if (netinfo->process_line != NULL) {
|
||||
- (netinfo->process_line) ((gpointer) netinfo, text,
|
||||
- len, NULL);
|
||||
- }
|
||||
+ if (text != NULL) {
|
||||
+ if (netinfo->process_line != NULL) {
|
||||
+ (netinfo->process_line) ((gpointer) netinfo, text,
|
||||
+ len, NULL);
|
||||
+ }
|
||||
|
||||
- g_free (text);
|
||||
+ g_free (text);
|
||||
|
||||
- return TRUE;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so
|
||||
@@ -285,6 +288,7 @@
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
|
||||
void
|
||||
netinfo_stop_process_command (Netinfo * netinfo)
|
@ -1,136 +0,0 @@
|
||||
--- gnome-netinfo/netstat.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/netstat.c Sun Dec 7 01:34:51 2003
|
||||
@@ -113,7 +113,11 @@
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
|
||||
/* Only works for Solaris */
|
||||
+#ifdef __FreeBSD__
|
||||
+ option = g_strdup ("-a -f inet -ln");
|
||||
+#else
|
||||
option = g_strdup ("-A inet -ln");
|
||||
+#endif
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->multicast))) {
|
||||
/* It works for Solaris and Linux */
|
||||
@@ -266,7 +270,11 @@
|
||||
g_return_if_fail (line != NULL);
|
||||
|
||||
count = strip_protocol_line (line, &data);
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (count == 5 || count == 6 || count == 9 || count == 10) {
|
||||
+#else
|
||||
if (count == 7 || count == 8) {
|
||||
+#endif
|
||||
#ifdef DEBUG
|
||||
g_print ("%s\t%s:%s\t%s\n", data.protocol,
|
||||
data.ip_src, data.port_src, data.state);
|
||||
@@ -331,11 +339,42 @@
|
||||
strip_protocol_line (gchar * line, netstat_protocol_data *data)
|
||||
{
|
||||
gint count = 0;
|
||||
+#ifdef __FreeBSD__
|
||||
+ gint a1, a2, a3, a4;
|
||||
+ gchar s9[30];
|
||||
+#else
|
||||
gchar s6[30], s7[30];
|
||||
+#endif
|
||||
gint n2, n3;
|
||||
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
|
||||
+ data->protocol, &n2, &n3,
|
||||
+ &a1, &a2, &a3, &a4, data->port_src,
|
||||
+ s9, data->state);
|
||||
+ g_snprintf (data->ip_src, 30, "%d.%d.%d.%d", a1, a2, a3, a4);
|
||||
+
|
||||
+ if (count == 9) {
|
||||
+ bzero (&(data)->state, 30);
|
||||
+ }
|
||||
+
|
||||
+ if (count == 3) {
|
||||
+ /* Handle the *.* entries. */
|
||||
+ gchar s5[30];
|
||||
+ count = sscanf (line, ALT_NETSTAT_PROTOCOL_FORMAT,
|
||||
+ data->protocol, &n2, &n3,
|
||||
+ data->port_src, s5,
|
||||
+ data->state);
|
||||
+ g_snprintf (data->ip_src, 30, "*");
|
||||
+
|
||||
+ if (count == 5) {
|
||||
+ bzero (&(data)->state, 30);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#else
|
||||
count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
|
||||
data->protocol, &n2, &n3,
|
||||
data->ip_src, data->port_src,
|
||||
@@ -344,6 +383,7 @@
|
||||
if (count == 7) {
|
||||
bzero (&(data)->state, 30);
|
||||
}
|
||||
+#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -405,7 +445,11 @@
|
||||
g_return_if_fail (line != NULL);
|
||||
|
||||
count = strip_route_line (line, &data);
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (count == 6) {
|
||||
+#else
|
||||
if (count == 8) {
|
||||
+#endif
|
||||
#ifdef DEBUG
|
||||
g_print ("%s\t%s:%s\t%d\t%s\n", data.destination,
|
||||
data.gateway, data.netmask, data.metric,
|
||||
@@ -474,11 +518,19 @@
|
||||
gchar flags[30];
|
||||
gint ref, use;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ count = sscanf (line, NETSTAT_ROUTE_FORMAT,
|
||||
+ data->destination,
|
||||
+ data->gateway, flags,
|
||||
+ &ref, &use, data->iface);
|
||||
+#else
|
||||
+
|
||||
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
|
||||
data->destination,
|
||||
data->gateway, data->netmask,
|
||||
flags, &(data)->metric, &ref, &use,
|
||||
data->iface);
|
||||
+#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -493,7 +545,11 @@
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
||||
gtk_tree_view_column_new_with_attributes
|
||||
+#ifdef __FreeBSD__
|
||||
+ (_("Destination/Prefix"), renderer, "text", 0, NULL);
|
||||
+#else
|
||||
(_("Destination"), renderer, "text", 0, NULL);
|
||||
+#endif
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
@@ -503,12 +559,14 @@
|
||||
gtk_tree_view_column_set_alignment (column, 0.5);
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
||||
gtk_tree_view_column_new_with_attributes
|
||||
(_("Netmask"), renderer, "text", 2, NULL);
|
||||
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
+#endif
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
@ -1,14 +0,0 @@
|
||||
--- gnome-netinfo/netstat.h.orig Sun Jul 20 22:31:57 2003
|
||||
+++ gnome-netinfo/netstat.h Sun Dec 7 01:32:10 2003
|
||||
@@ -28,6 +28,11 @@
|
||||
# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %s %s %s %s %s"
|
||||
# define NETSTAT_ROUTE_FORMAT "%s %s %s %s %d %d %d %s"
|
||||
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
|
||||
+#elif defined(__FreeBSD__)
|
||||
+# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %d.%d.%d.%d.%s %s %s"
|
||||
+# define ALT_NETSTAT_PROTOCOL_FORMAT "%s %d %d *.%s %s %s"
|
||||
+# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s"
|
||||
+# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
|
||||
|
||||
#endif
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gnome-netinfo/ping.c.orig Sat Dec 6 23:08:52 2003
|
||||
+++ gnome-netinfo/ping.c Sat Dec 6 23:17:35 2003
|
||||
@@ -330,6 +330,8 @@
|
||||
|
||||
if (netinfo_get_ip_version (netinfo) == IPV4)
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
+ else
|
||||
+ line = g_strdelimit (line, ",", ' ');
|
||||
|
||||
#ifdef PING_PARAMS_5
|
||||
count = sscanf (line, PING_FORMAT,
|
@ -1,11 +0,0 @@
|
||||
--- gnome-netinfo/ping.h.orig Sat Dec 6 23:11:01 2003
|
||||
+++ gnome-netinfo/ping.h Sat Dec 6 23:17:53 2003
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/* The ping usage and output is different between Unix flavours */
|
||||
/* FIXME: Add BSD support */
|
||||
-#if defined(__linux__) || defined(__OSF__)
|
||||
+#if defined(__linux__) || defined(__OSF__) || defined(__FreeBSD__)
|
||||
# define PING_PROGRAM_FORMAT "%s ping -c %d -n %s"
|
||||
# define PING_PROGRAM_FORMAT_6 "%s ping6 -c %d -n %s"
|
||||
# define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
|
@ -1,15 +0,0 @@
|
||||
--- gnome-netinfo/util-mii.c.orig Sat Dec 6 23:30:50 2003
|
||||
+++ gnome-netinfo/util-mii.c Sat Dec 6 23:38:14 2003
|
||||
@@ -39,6 +39,7 @@
|
||||
* http://www.national.com/pf/DP/DP83840.html
|
||||
*/
|
||||
|
||||
+#ifdef __linux__
|
||||
#include <glib.h>
|
||||
|
||||
#include <errno.h>
|
||||
@@ -237,3 +238,4 @@
|
||||
close (sock);
|
||||
return data;
|
||||
}
|
||||
+#endif
|
@ -1,12 +0,0 @@
|
||||
--- network-utilities/gnome-remote-shell.c.orig Mon Sep 1 01:56:21 2003
|
||||
+++ network-utilities/gnome-remote-shell.c Mon Sep 1 01:58:11 2003
|
||||
@@ -23,6 +23,9 @@
|
||||
#endif
|
||||
|
||||
#include <netdb.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/gtkentry.h>
|
191
net/gnome-nettool/files/patch-src_info.c
Normal file
191
net/gnome-nettool/files/patch-src_info.c
Normal file
@ -0,0 +1,191 @@
|
||||
--- src/info.c.orig Fri Jun 11 07:14:17 2004
|
||||
+++ src/info.c Mon Jul 5 15:25:09 2004
|
||||
@@ -37,6 +37,9 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
#include <net/if.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <net/if_media.h>
|
||||
+#endif
|
||||
|
||||
#include "info.h"
|
||||
#include "utils.h"
|
||||
@@ -57,10 +60,11 @@
|
||||
{ N_("Ethernet Interface"), INFO_INTERFACE_ETH, "16_ethernet.xpm", "eth", NULL },
|
||||
{ N_("Wireless Interface"), INFO_INTERFACE_WLAN, "wavelan-16.png", "wlan", NULL },
|
||||
{ N_("Modem Interface"), INFO_INTERFACE_PPP, "16_ppp.xpm", "ppp", NULL },
|
||||
+ { N_("Modem Interface"), INFO_INTERFACE_PPP, "16_ppp.xpm", "tun", NULL },
|
||||
{ N_("Parallel Line Interface"), INFO_INTERFACE_PLIP, "16_plip.xpm", "plip", NULL },
|
||||
{ N_("Infrared Interface"), INFO_INTERFACE_IRLAN, "irda-16.png", "irlan", NULL },
|
||||
{ N_("Loopback Interface"), INFO_INTERFACE_LO, "16_loopback.xpm", "lo", NULL },
|
||||
- { N_("Unknown Interface"), INFO_INTERFACE_UNKNOWN, "network.png", NULL, NULL },
|
||||
+ { N_("Unknown Interface"), INFO_INTERFACE_UNKNOWN, "network.png", "", NULL },
|
||||
{ NULL, INFO_INTERFACE_UNKNOWN, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -97,9 +101,39 @@
|
||||
{
|
||||
gint i;
|
||||
gchar *path;
|
||||
-
|
||||
+ gchar *dev_type = NULL;
|
||||
+#if defined(__FreeBSD__)
|
||||
+ int s;
|
||||
+ struct ifmediareq ifmr;
|
||||
+
|
||||
+ if ((s = socket (AF_INET, SOCK_DGRAM, 0)) > -1) {
|
||||
+
|
||||
+ (void) memset (&ifmr, 0, sizeof (ifmr));
|
||||
+ (void) strncpy (ifmr.ifm_name, dev_name, sizeof (ifmr.ifm_name));
|
||||
+
|
||||
+ if (ioctl (s, SIOCGIFMEDIA, (caddr_t) &ifmr) > -1) {
|
||||
+ switch (IFM_TYPE (ifmr.ifm_active)) {
|
||||
+ case IFM_ETHER:
|
||||
+ dev_type = "eth";
|
||||
+ break;
|
||||
+ case IFM_FDDI:
|
||||
+ case IFM_TOKEN:
|
||||
+ dev_type = "other_type";
|
||||
+ break;
|
||||
+ case IFM_IEEE80211:
|
||||
+ dev_type = "wlan";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ close (s);
|
||||
+ }
|
||||
+#endif /* defined(__FreeBSD__) */
|
||||
+
|
||||
+ if (!dev_type)
|
||||
+ dev_type = (gchar *) dev_name;
|
||||
+
|
||||
for (i = 0; info_iface_desc[i].name; i++)
|
||||
- if (strstr (dev_name, info_iface_desc[i].prefix) == dev_name) {
|
||||
+ if (strstr (dev_type, info_iface_desc[i].prefix) == dev_type) {
|
||||
(*iface) = g_strdup_printf ("%s (%s)", info_iface_desc[i].name, dev_name);
|
||||
if (info_iface_desc[i].pixbuf == NULL) {
|
||||
path = g_build_filename (PIXMAPS_DIR, info_iface_desc[i].icon, NULL);
|
||||
@@ -187,17 +221,26 @@
|
||||
gchar tx[10], tx_error[10], tx_drop[10], tx_ovr[10];
|
||||
*/
|
||||
gchar iface[30]; /*, flags[30]; */
|
||||
- gchar rx_bytes[16], rx_pkt[10], rx_error[10], rx_drop[10], rx_fifo[10];
|
||||
- gchar frame[10], compressed[10], multicast[10];
|
||||
- gchar tx_bytes[16], tx_pkt[10], tx_error[10], tx_drop[10], tx_fifo[10];
|
||||
+ gchar rx_bytes[16], rx_pkt[10], rx_error[10];
|
||||
+ gchar tx_bytes[16], tx_pkt[10], tx_error[10];
|
||||
gchar collissions[10];
|
||||
+#if defined(__linux__)
|
||||
+ gchar rx_drop[10], rx_fifo[10];
|
||||
+ gchar frame[10], compressed[10], multicast[10];
|
||||
+ gchar tx_drop[10], tx_fifo[10];
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ char *p;
|
||||
+ gchar **tokens, **argv;
|
||||
+ int i;
|
||||
+ int pipe_out;
|
||||
+#endif
|
||||
|
||||
GIOChannel *io = NULL;
|
||||
gchar *line;
|
||||
gboolean title = TRUE;
|
||||
const gchar *text;
|
||||
gchar *text_tx_bytes, *text_rx_bytes;
|
||||
-
|
||||
+
|
||||
g_return_val_if_fail (info != NULL, FALSE);
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (info->combo));
|
||||
@@ -206,21 +249,61 @@
|
||||
else
|
||||
return FALSE;
|
||||
/*text = gtk_entry_get_text (GTK_ENTRY (info->nic));*/
|
||||
-
|
||||
+
|
||||
#if defined(__linux__)
|
||||
io = g_io_channel_new_file ("/proc/net/dev", "r", NULL);
|
||||
-
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ if (!g_shell_parse_argv ("/usr/bin/netstat -in -b -f link", NULL, &argv, NULL)) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ if (!g_spawn_async_with_pipes (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL, &pipe_out, NULL, NULL)) {
|
||||
+ g_strfreev (argv);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ g_strfreev (argv);
|
||||
+
|
||||
+ io = g_io_channel_unix_new (pipe_out);
|
||||
+#endif /* defined(__linux__) */
|
||||
+
|
||||
while (g_io_channel_read_line (io, &line, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) {
|
||||
if (title) {
|
||||
title = FALSE;
|
||||
g_free (line);
|
||||
continue;
|
||||
}
|
||||
+#if defined(__linux__)
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
sscanf (line, "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s", iface,
|
||||
rx_bytes, rx_pkt, rx_error, rx_drop, rx_fifo, frame,
|
||||
compressed, multicast,
|
||||
tx_bytes, tx_pkt, tx_error, tx_drop, tx_fifo, collissions);
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ tokens = (gchar **) g_malloc0 ((sizeof (char)) * (strlen (line) + 2));
|
||||
+ p = strtok (line, " \t\n");
|
||||
+ /* We only care about 11 fields for now */
|
||||
+ for (i = 0; i < 11 && p; i++, p = strtok (NULL, " \t\n")) {
|
||||
+ tokens[i] = g_strdup (p);
|
||||
+ }
|
||||
+
|
||||
+ if (i == 0 || i < 10) {
|
||||
+ g_free (line);
|
||||
+ g_strfreev (tokens);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ g_strlcpy (iface, tokens[0], sizeof (iface));
|
||||
+
|
||||
+ g_strlcpy (collissions, tokens[--i], sizeof (collissions));
|
||||
+ g_strlcpy (tx_bytes, tokens[--i], sizeof (tx_bytes));
|
||||
+ g_strlcpy (tx_error, tokens[--i], sizeof (tx_error));
|
||||
+ g_strlcpy (tx_pkt, tokens[--i], sizeof (tx_pkt));
|
||||
+ g_strlcpy (rx_bytes, tokens[--i], sizeof (rx_bytes));
|
||||
+ g_strlcpy (rx_error, tokens[--i], sizeof (rx_error));
|
||||
+ g_strlcpy (rx_pkt, tokens[--i], sizeof (rx_pkt));
|
||||
+
|
||||
+ g_strfreev (tokens);
|
||||
+#endif /* defined(__linux__) */
|
||||
|
||||
if (g_ascii_strcasecmp (iface, text) == 0) {
|
||||
/*
|
||||
@@ -248,7 +331,9 @@
|
||||
}
|
||||
|
||||
g_io_channel_unref (io);
|
||||
-#endif /* defined(__linux__) */
|
||||
+#if defined(__FreeBSD__)
|
||||
+ close (pipe_out);
|
||||
+#endif /* defined(__FreeBSD__) */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -384,6 +469,7 @@
|
||||
mii_data_result data;
|
||||
|
||||
getifaddrs (&ifa0);
|
||||
+ memset (&data, 0, sizeof (data));
|
||||
|
||||
for (ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next) {
|
||||
if (strcmp (ifr6->ifa_name, nic) != 0) {
|
||||
@@ -425,7 +511,9 @@
|
||||
ifc.ifc_req = (struct ifreq *) buf;
|
||||
ioctl (sockfd, SIOCGIFCONF, &ifc);
|
||||
|
||||
+#if defined(__linux__)
|
||||
data = mii_get_basic (nic);
|
||||
+#endif /* defined(__linux__) */
|
||||
|
||||
for (ptr = buf; ptr < buf + ifc.ifc_len;) {
|
||||
ifr = (struct ifreq *) ptr;
|
20
net/gnome-nettool/files/patch-src_netstat.c
Normal file
20
net/gnome-nettool/files/patch-src_netstat.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- src/netstat.c.orig Sun Jul 4 17:57:03 2004
|
||||
+++ src/netstat.c Sun Jul 4 17:57:48 2004
|
||||
@@ -108,12 +108,17 @@
|
||||
g_return_val_if_fail (netinfo != NULL, NULL);
|
||||
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->routing))) {
|
||||
+#ifdef __FreeBSD__
|
||||
+ /* XXX We only support ipv4 now */
|
||||
+ option = g_strdup ("-rn -f inet");
|
||||
+#else
|
||||
/* Works for Solaris and Linux */
|
||||
if (netinfo_is_ipv6_enable ()) {
|
||||
option = g_strdup ("-rn -A inet -A inet6");
|
||||
} else {
|
||||
option = g_strdup ("-rn -A inet");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
|
||||
/* Only works for Solaris */
|
10
net/gnome-nettool/files/patch-src_nettool.c
Normal file
10
net/gnome-nettool/files/patch-src_nettool.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/nettool.c.orig Sun Jul 4 15:52:03 2004
|
||||
+++ src/nettool.c Sun Jul 4 15:53:11 2004
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <gnome.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
11
net/gnome-nettool/files/patch-src_utils.c
Normal file
11
net/gnome-nettool/files/patch-src_utils.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/utils.c.orig Sun Jul 4 20:11:49 2004
|
||||
+++ src/utils.c Sun Jul 4 20:12:14 2004
|
||||
@@ -240,7 +240,7 @@
|
||||
const gchar *unit = "B";
|
||||
gchar *result;
|
||||
|
||||
- sscanf (bytes, "%lld", &rx);
|
||||
+ rx = strtoull (bytes, (char **)NULL, 10);
|
||||
short_rx = rx * 10;
|
||||
|
||||
if (rx > 1125899906842624ull) {
|
@ -1,10 +1,3 @@
|
||||
gnome-network is a set of network oriented user tools. It includes the
|
||||
following tools:
|
||||
|
||||
* gnome-remote-shell: a remote shell (Telnet/SSH) client.
|
||||
* gnome-remote-desktop: a remote desktop (X11/VNC) client.
|
||||
* gnome-netinfo: a network information tool, for getting info on
|
||||
network cards, DNS, etc.
|
||||
* gnome-backup: a backup client tool.
|
||||
|
||||
WWW: http://www.gnome.org/
|
||||
Gnome-nettool is a utility for getting network information such as interface
|
||||
statistics, and for front-ending commands like ping and traceroute. It
|
||||
is very similar to the MacOS X Network Utility.
|
||||
|
@ -1,56 +1,48 @@
|
||||
bin/gnome-remote-shell
|
||||
bin/gnome-remote-desktop
|
||||
bin/gnome-netinfo
|
||||
share/gnome/application-registry/gnome-remote-desktop.applications
|
||||
share/gnome/applications/gnome-network-utilities.desktop
|
||||
share/gnome/applications/gnome-netinfo.desktop
|
||||
share/gnome/apps/Internet/gnome-remote-desktop.desktop
|
||||
share/gnome/gnome-network/dialogs/gnome-netinfo.glade
|
||||
share/gnome/gnome-network/dialogs/gnome-remote-shell.glade
|
||||
share/gnome/mime-info/gnome-remote-desktop.keys
|
||||
share/gnome/mime-info/gnome-remote-desktop.mime
|
||||
share/gnome/pixmaps/gnome-netinfo.png
|
||||
share/gnome/pixmaps/gnome-network/colors.png
|
||||
share/gnome/pixmaps/gnome-network/computer.png
|
||||
share/gnome/pixmaps/gnome-network/gnome-remote-desktop.png
|
||||
share/gnome/pixmaps/gnome-network/keyboard.png
|
||||
share/gnome/pixmaps/gnome-network/perform.png
|
||||
share/gnome/pixmaps/gnome-network/program.png
|
||||
share/gnome/pixmaps/gnome-network/size.png
|
||||
share/gnome/pixmaps/gnome-network/sound.png
|
||||
share/gnome/pixmaps/gnome-remote-desktop.png
|
||||
share/gnome/pixmaps/gnome-remote-shell.png
|
||||
share/locale/az/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ca/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/cs/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/da/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/de/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/el/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/es/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/fr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ga/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/gl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/he/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/hu/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/it/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ja/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ko/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ms/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/nl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/no/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pt/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ru/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sr@Latn/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sv/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/tr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/uk/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/vi/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/wa/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/gnome-network.mo
|
||||
@dirrm share/gnome/pixmaps/gnome-network
|
||||
@dirrm share/gnome/gnome-network/dialogs
|
||||
@dirrm share/gnome/gnome-network
|
||||
bin/gnome-nettool
|
||||
share/gnome/applications/gnome-nettool.desktop
|
||||
share/gnome/gnome-nettool/dialogs/gnome-nettool.glade
|
||||
share/gnome/gnome-nettool/pixmaps/16_ethernet.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_loopback.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_plip.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_ppp.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/gnome-nettool.png
|
||||
share/gnome/gnome-nettool/pixmaps/irda-16.png
|
||||
share/gnome/gnome-nettool/pixmaps/network.png
|
||||
share/gnome/gnome-nettool/pixmaps/wavelan-16.png
|
||||
share/gnome/pixmaps/gnome-nettool.png
|
||||
share/locale/az/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ca/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/cs/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/da/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/de/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/el/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/en_CA/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/en_GB/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/es/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/fr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ga/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/gl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/he/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/hu/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/it/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ja/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ko/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ms/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/nl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/no/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pt/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ru/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sr@Latn/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sv/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/tr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/uk/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/vi/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/wa/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/gnome-nettool.mo
|
||||
@dirrm share/gnome/gnome-nettool/pixmaps
|
||||
@dirrm share/gnome/gnome-nettool/dialogs
|
||||
@dirrm share/gnome/gnome-nettool
|
||||
|
@ -5,29 +5,28 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= gnomenetwork
|
||||
PORTVERSION= 1.99.5
|
||||
PORTREVISION= 3
|
||||
PORTNAME= gnomenettool
|
||||
PORTVERSION= 0.99.1
|
||||
CATEGORIES= net gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-network/1.99
|
||||
DISTNAME= gnome-network-${PORTVERSION}
|
||||
MASTER_SITE_SUBDIR= sources/gnome-nettool/0.99
|
||||
DISTNAME= gnome-nettool-${PORTVERSION}
|
||||
DIST_SUBDIR= gnome2
|
||||
|
||||
MAINTAINER= gnome@FreeBSD.org
|
||||
COMMENT= A library for writing networked servers & clients
|
||||
COMMENT= A GNOME utility that provides network information statistics
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
USE_BZIP2= yes
|
||||
USE_GNOME= gnomehack gnomeprefix libgnomeui
|
||||
USE_GNOME= gnomehack intlhack lthack gnomeprefix libgnomeui
|
||||
USE_GMAKE= yes
|
||||
USE_LIBTOOL_VER=13
|
||||
CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
post-patch:
|
||||
${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \
|
||||
s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";|'
|
||||
post-install:
|
||||
${MKDIR} ${PREFIX}/share/gnome/pixmaps
|
||||
${LN} -sf ${PREFIX}/share/gnome/gnome-nettool/pixmaps/gnome-nettool.png \
|
||||
${PREFIX}/share/gnome/pixmaps/gnome-nettool.png
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (gnome2/gnome-network-1.99.5.tar.bz2) = 77532442a106d06ed2fe015f87d9b522
|
||||
SIZE (gnome2/gnome-network-1.99.5.tar.bz2) = 660804
|
||||
MD5 (gnome2/gnome-nettool-0.99.1.tar.bz2) = 090c425dc85415e1525298c7014c95a2
|
||||
SIZE (gnome2/gnome-nettool-0.99.1.tar.bz2) = 498036
|
||||
|
@ -1,10 +1,49 @@
|
||||
--- configure.orig Wed Dec 11 18:31:51 2002
|
||||
+++ configure Thu Dec 12 12:07:17 2002
|
||||
@@ -7414,6 +7414,7 @@
|
||||
--- configure.orig Sun Jul 4 16:00:33 2004
|
||||
+++ configure Sun Jul 4 16:02:31 2004
|
||||
@@ -20269,7 +20269,7 @@
|
||||
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
|
||||
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
|
||||
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"; $ac_aux_dir/ltconfig $LIBTOOL_DEPS;
|
||||
+LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool13/ltmain.sh"; /usr/local/share/libtool13/ltconfig13 $LIBTOOL_DEPS;
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
@@ -22038,13 +22038,13 @@
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define GNOME_ICONDIR "${ac_default_prefix}/share/pixmaps"
|
||||
+#define GNOME_ICONDIR "${ac_default_prefix}/share/gnome/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define GNOME_ICONDIR "${prefix}/share/pixmaps"
|
||||
+#define GNOME_ICONDIR "${prefix}/share/gnome/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
@@ -22052,17 +22052,17 @@
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define PIXMAPS_DIR "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+#define PIXMAPS_DIR "${ac_default_prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
- pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+ pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
-#define PIXMAPS_DIR "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+#define PIXMAPS_DIR "${prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
_ACEOF
|
||||
|
||||
- pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
|
||||
+ pixmapsdir="${prefix}/${DATADIRNAME}/gnome/${PACKAGE}/pixmaps"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,63 +0,0 @@
|
||||
--- gnome-netinfo/info.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/info.c Wed Dec 17 22:27:46 2003
|
||||
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
+#include <netinet/in.h>
|
||||
#include <sys/socket.h> /* basic socket definitions */
|
||||
#include <arpa/inet.h> /* inet(3) functions */
|
||||
#include <sys/un.h> /* for Unix domain sockets */
|
||||
@@ -173,7 +174,7 @@
|
||||
for (ptr = buf; ptr < buf + ifc.ifc_len;) {
|
||||
ifr = (struct ifreq *) ptr;
|
||||
len = sizeof (struct sockaddr);
|
||||
-#ifdef HAVE_SOCKADDR_SA_LEN
|
||||
+#if defined(HAVE_SOCKADDR_SA_LEN) || defined(__FreeBSD__)
|
||||
if (ifr->ifr_addr.sa_len > len)
|
||||
len = ifr->ifr_addr.sa_len; /* length > 16 */
|
||||
#endif
|
||||
@@ -182,8 +183,12 @@
|
||||
if (strcmp (ifr->ifr_name, nic) != 0) {
|
||||
continue;
|
||||
}
|
||||
+
|
||||
+ memset (&data, 0, sizeof(data));
|
||||
|
||||
+#ifdef __linux__
|
||||
data = mii_get_basic (nic);
|
||||
+#endif
|
||||
|
||||
switch (ifr->ifr_addr.sa_family) {
|
||||
case AF_INET:
|
||||
@@ -306,7 +311,6 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
- g_free (ifr);
|
||||
}
|
||||
|
||||
static GList *
|
||||
@@ -321,6 +325,8 @@
|
||||
|
||||
sockfd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
+ memset (&ifc, 0, sizeof (struct ifconf));
|
||||
+ memset (&buf, 0, sizeof (buf));
|
||||
ifc.ifc_len = sizeof (buf);
|
||||
ifc.ifc_req = (struct ifreq *) buf;
|
||||
|
||||
@@ -331,9 +337,11 @@
|
||||
len = sizeof (struct sockaddr);
|
||||
|
||||
iface = g_strdup (ifr->ifr_name);
|
||||
- items = g_list_append (items, iface);
|
||||
+ if (g_list_find_custom (items, iface, (GCompareFunc) g_ascii_strcasecmp) == NULL) {
|
||||
+ items = g_list_append (items, iface);
|
||||
+ }
|
||||
|
||||
-#ifdef HAVE_SOCKADDR_SA_LEN
|
||||
+#if defined(HAVE_SOCKADDR_SA_LEN) || defined(__FreeBSD__)
|
||||
if (ifr->ifr_addr.sa_len > len)
|
||||
len = ifr->ifr_addr.sa_len; /* length > 16 */
|
||||
#endif
|
@ -1,10 +0,0 @@
|
||||
--- gnome-netinfo/callbacks.c.orig Sat Dec 6 23:20:05 2003
|
||||
+++ gnome-netinfo/callbacks.c Sat Dec 6 23:20:14 2003
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#include "callbacks.h"
|
||||
#include "traceroute.h"
|
@ -1,41 +0,0 @@
|
||||
--- gnome-netinfo/netinfo.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/netinfo.c Sun Dec 7 01:00:52 2003
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <gnome.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -253,14 +254,16 @@
|
||||
if (condition & G_IO_IN) {
|
||||
g_io_channel_read_line (channel, &text, &len, NULL, NULL);
|
||||
|
||||
- if (netinfo->process_line != NULL) {
|
||||
- (netinfo->process_line) ((gpointer) netinfo, text,
|
||||
- len, NULL);
|
||||
- }
|
||||
+ if (text != NULL) {
|
||||
+ if (netinfo->process_line != NULL) {
|
||||
+ (netinfo->process_line) ((gpointer) netinfo, text,
|
||||
+ len, NULL);
|
||||
+ }
|
||||
|
||||
- g_free (text);
|
||||
+ g_free (text);
|
||||
|
||||
- return TRUE;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so
|
||||
@@ -285,6 +288,7 @@
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
|
||||
void
|
||||
netinfo_stop_process_command (Netinfo * netinfo)
|
@ -1,136 +0,0 @@
|
||||
--- gnome-netinfo/netstat.c.orig Mon Nov 24 18:29:43 2003
|
||||
+++ gnome-netinfo/netstat.c Sun Dec 7 01:34:51 2003
|
||||
@@ -113,7 +113,11 @@
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
|
||||
/* Only works for Solaris */
|
||||
+#ifdef __FreeBSD__
|
||||
+ option = g_strdup ("-a -f inet -ln");
|
||||
+#else
|
||||
option = g_strdup ("-A inet -ln");
|
||||
+#endif
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->multicast))) {
|
||||
/* It works for Solaris and Linux */
|
||||
@@ -266,7 +270,11 @@
|
||||
g_return_if_fail (line != NULL);
|
||||
|
||||
count = strip_protocol_line (line, &data);
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (count == 5 || count == 6 || count == 9 || count == 10) {
|
||||
+#else
|
||||
if (count == 7 || count == 8) {
|
||||
+#endif
|
||||
#ifdef DEBUG
|
||||
g_print ("%s\t%s:%s\t%s\n", data.protocol,
|
||||
data.ip_src, data.port_src, data.state);
|
||||
@@ -331,11 +339,42 @@
|
||||
strip_protocol_line (gchar * line, netstat_protocol_data *data)
|
||||
{
|
||||
gint count = 0;
|
||||
+#ifdef __FreeBSD__
|
||||
+ gint a1, a2, a3, a4;
|
||||
+ gchar s9[30];
|
||||
+#else
|
||||
gchar s6[30], s7[30];
|
||||
+#endif
|
||||
gint n2, n3;
|
||||
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
|
||||
+ data->protocol, &n2, &n3,
|
||||
+ &a1, &a2, &a3, &a4, data->port_src,
|
||||
+ s9, data->state);
|
||||
+ g_snprintf (data->ip_src, 30, "%d.%d.%d.%d", a1, a2, a3, a4);
|
||||
+
|
||||
+ if (count == 9) {
|
||||
+ bzero (&(data)->state, 30);
|
||||
+ }
|
||||
+
|
||||
+ if (count == 3) {
|
||||
+ /* Handle the *.* entries. */
|
||||
+ gchar s5[30];
|
||||
+ count = sscanf (line, ALT_NETSTAT_PROTOCOL_FORMAT,
|
||||
+ data->protocol, &n2, &n3,
|
||||
+ data->port_src, s5,
|
||||
+ data->state);
|
||||
+ g_snprintf (data->ip_src, 30, "*");
|
||||
+
|
||||
+ if (count == 5) {
|
||||
+ bzero (&(data)->state, 30);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#else
|
||||
count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
|
||||
data->protocol, &n2, &n3,
|
||||
data->ip_src, data->port_src,
|
||||
@@ -344,6 +383,7 @@
|
||||
if (count == 7) {
|
||||
bzero (&(data)->state, 30);
|
||||
}
|
||||
+#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -405,7 +445,11 @@
|
||||
g_return_if_fail (line != NULL);
|
||||
|
||||
count = strip_route_line (line, &data);
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (count == 6) {
|
||||
+#else
|
||||
if (count == 8) {
|
||||
+#endif
|
||||
#ifdef DEBUG
|
||||
g_print ("%s\t%s:%s\t%d\t%s\n", data.destination,
|
||||
data.gateway, data.netmask, data.metric,
|
||||
@@ -474,11 +518,19 @@
|
||||
gchar flags[30];
|
||||
gint ref, use;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ count = sscanf (line, NETSTAT_ROUTE_FORMAT,
|
||||
+ data->destination,
|
||||
+ data->gateway, flags,
|
||||
+ &ref, &use, data->iface);
|
||||
+#else
|
||||
+
|
||||
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
|
||||
data->destination,
|
||||
data->gateway, data->netmask,
|
||||
flags, &(data)->metric, &ref, &use,
|
||||
data->iface);
|
||||
+#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -493,7 +545,11 @@
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
||||
gtk_tree_view_column_new_with_attributes
|
||||
+#ifdef __FreeBSD__
|
||||
+ (_("Destination/Prefix"), renderer, "text", 0, NULL);
|
||||
+#else
|
||||
(_("Destination"), renderer, "text", 0, NULL);
|
||||
+#endif
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
@@ -503,12 +559,14 @@
|
||||
gtk_tree_view_column_set_alignment (column, 0.5);
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
||||
gtk_tree_view_column_new_with_attributes
|
||||
(_("Netmask"), renderer, "text", 2, NULL);
|
||||
|
||||
gtk_tree_view_append_column (widget, column);
|
||||
+#endif
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column =
|
@ -1,14 +0,0 @@
|
||||
--- gnome-netinfo/netstat.h.orig Sun Jul 20 22:31:57 2003
|
||||
+++ gnome-netinfo/netstat.h Sun Dec 7 01:32:10 2003
|
||||
@@ -28,6 +28,11 @@
|
||||
# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %s %s %s %s %s"
|
||||
# define NETSTAT_ROUTE_FORMAT "%s %s %s %s %d %d %d %s"
|
||||
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
|
||||
+#elif defined(__FreeBSD__)
|
||||
+# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %d.%d.%d.%d.%s %s %s"
|
||||
+# define ALT_NETSTAT_PROTOCOL_FORMAT "%s %d %d *.%s %s %s"
|
||||
+# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s"
|
||||
+# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
|
||||
|
||||
#endif
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gnome-netinfo/ping.c.orig Sat Dec 6 23:08:52 2003
|
||||
+++ gnome-netinfo/ping.c Sat Dec 6 23:17:35 2003
|
||||
@@ -330,6 +330,8 @@
|
||||
|
||||
if (netinfo_get_ip_version (netinfo) == IPV4)
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
+ else
|
||||
+ line = g_strdelimit (line, ",", ' ');
|
||||
|
||||
#ifdef PING_PARAMS_5
|
||||
count = sscanf (line, PING_FORMAT,
|
@ -1,11 +0,0 @@
|
||||
--- gnome-netinfo/ping.h.orig Sat Dec 6 23:11:01 2003
|
||||
+++ gnome-netinfo/ping.h Sat Dec 6 23:17:53 2003
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/* The ping usage and output is different between Unix flavours */
|
||||
/* FIXME: Add BSD support */
|
||||
-#if defined(__linux__) || defined(__OSF__)
|
||||
+#if defined(__linux__) || defined(__OSF__) || defined(__FreeBSD__)
|
||||
# define PING_PROGRAM_FORMAT "%s ping -c %d -n %s"
|
||||
# define PING_PROGRAM_FORMAT_6 "%s ping6 -c %d -n %s"
|
||||
# define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
|
@ -1,15 +0,0 @@
|
||||
--- gnome-netinfo/util-mii.c.orig Sat Dec 6 23:30:50 2003
|
||||
+++ gnome-netinfo/util-mii.c Sat Dec 6 23:38:14 2003
|
||||
@@ -39,6 +39,7 @@
|
||||
* http://www.national.com/pf/DP/DP83840.html
|
||||
*/
|
||||
|
||||
+#ifdef __linux__
|
||||
#include <glib.h>
|
||||
|
||||
#include <errno.h>
|
||||
@@ -237,3 +238,4 @@
|
||||
close (sock);
|
||||
return data;
|
||||
}
|
||||
+#endif
|
@ -1,12 +0,0 @@
|
||||
--- network-utilities/gnome-remote-shell.c.orig Mon Sep 1 01:56:21 2003
|
||||
+++ network-utilities/gnome-remote-shell.c Mon Sep 1 01:58:11 2003
|
||||
@@ -23,6 +23,9 @@
|
||||
#endif
|
||||
|
||||
#include <netdb.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/gtkentry.h>
|
191
net/gnomenettool/files/patch-src_info.c
Normal file
191
net/gnomenettool/files/patch-src_info.c
Normal file
@ -0,0 +1,191 @@
|
||||
--- src/info.c.orig Fri Jun 11 07:14:17 2004
|
||||
+++ src/info.c Mon Jul 5 15:25:09 2004
|
||||
@@ -37,6 +37,9 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
#include <net/if.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <net/if_media.h>
|
||||
+#endif
|
||||
|
||||
#include "info.h"
|
||||
#include "utils.h"
|
||||
@@ -57,10 +60,11 @@
|
||||
{ N_("Ethernet Interface"), INFO_INTERFACE_ETH, "16_ethernet.xpm", "eth", NULL },
|
||||
{ N_("Wireless Interface"), INFO_INTERFACE_WLAN, "wavelan-16.png", "wlan", NULL },
|
||||
{ N_("Modem Interface"), INFO_INTERFACE_PPP, "16_ppp.xpm", "ppp", NULL },
|
||||
+ { N_("Modem Interface"), INFO_INTERFACE_PPP, "16_ppp.xpm", "tun", NULL },
|
||||
{ N_("Parallel Line Interface"), INFO_INTERFACE_PLIP, "16_plip.xpm", "plip", NULL },
|
||||
{ N_("Infrared Interface"), INFO_INTERFACE_IRLAN, "irda-16.png", "irlan", NULL },
|
||||
{ N_("Loopback Interface"), INFO_INTERFACE_LO, "16_loopback.xpm", "lo", NULL },
|
||||
- { N_("Unknown Interface"), INFO_INTERFACE_UNKNOWN, "network.png", NULL, NULL },
|
||||
+ { N_("Unknown Interface"), INFO_INTERFACE_UNKNOWN, "network.png", "", NULL },
|
||||
{ NULL, INFO_INTERFACE_UNKNOWN, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -97,9 +101,39 @@
|
||||
{
|
||||
gint i;
|
||||
gchar *path;
|
||||
-
|
||||
+ gchar *dev_type = NULL;
|
||||
+#if defined(__FreeBSD__)
|
||||
+ int s;
|
||||
+ struct ifmediareq ifmr;
|
||||
+
|
||||
+ if ((s = socket (AF_INET, SOCK_DGRAM, 0)) > -1) {
|
||||
+
|
||||
+ (void) memset (&ifmr, 0, sizeof (ifmr));
|
||||
+ (void) strncpy (ifmr.ifm_name, dev_name, sizeof (ifmr.ifm_name));
|
||||
+
|
||||
+ if (ioctl (s, SIOCGIFMEDIA, (caddr_t) &ifmr) > -1) {
|
||||
+ switch (IFM_TYPE (ifmr.ifm_active)) {
|
||||
+ case IFM_ETHER:
|
||||
+ dev_type = "eth";
|
||||
+ break;
|
||||
+ case IFM_FDDI:
|
||||
+ case IFM_TOKEN:
|
||||
+ dev_type = "other_type";
|
||||
+ break;
|
||||
+ case IFM_IEEE80211:
|
||||
+ dev_type = "wlan";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ close (s);
|
||||
+ }
|
||||
+#endif /* defined(__FreeBSD__) */
|
||||
+
|
||||
+ if (!dev_type)
|
||||
+ dev_type = (gchar *) dev_name;
|
||||
+
|
||||
for (i = 0; info_iface_desc[i].name; i++)
|
||||
- if (strstr (dev_name, info_iface_desc[i].prefix) == dev_name) {
|
||||
+ if (strstr (dev_type, info_iface_desc[i].prefix) == dev_type) {
|
||||
(*iface) = g_strdup_printf ("%s (%s)", info_iface_desc[i].name, dev_name);
|
||||
if (info_iface_desc[i].pixbuf == NULL) {
|
||||
path = g_build_filename (PIXMAPS_DIR, info_iface_desc[i].icon, NULL);
|
||||
@@ -187,17 +221,26 @@
|
||||
gchar tx[10], tx_error[10], tx_drop[10], tx_ovr[10];
|
||||
*/
|
||||
gchar iface[30]; /*, flags[30]; */
|
||||
- gchar rx_bytes[16], rx_pkt[10], rx_error[10], rx_drop[10], rx_fifo[10];
|
||||
- gchar frame[10], compressed[10], multicast[10];
|
||||
- gchar tx_bytes[16], tx_pkt[10], tx_error[10], tx_drop[10], tx_fifo[10];
|
||||
+ gchar rx_bytes[16], rx_pkt[10], rx_error[10];
|
||||
+ gchar tx_bytes[16], tx_pkt[10], tx_error[10];
|
||||
gchar collissions[10];
|
||||
+#if defined(__linux__)
|
||||
+ gchar rx_drop[10], rx_fifo[10];
|
||||
+ gchar frame[10], compressed[10], multicast[10];
|
||||
+ gchar tx_drop[10], tx_fifo[10];
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ char *p;
|
||||
+ gchar **tokens, **argv;
|
||||
+ int i;
|
||||
+ int pipe_out;
|
||||
+#endif
|
||||
|
||||
GIOChannel *io = NULL;
|
||||
gchar *line;
|
||||
gboolean title = TRUE;
|
||||
const gchar *text;
|
||||
gchar *text_tx_bytes, *text_rx_bytes;
|
||||
-
|
||||
+
|
||||
g_return_val_if_fail (info != NULL, FALSE);
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (info->combo));
|
||||
@@ -206,21 +249,61 @@
|
||||
else
|
||||
return FALSE;
|
||||
/*text = gtk_entry_get_text (GTK_ENTRY (info->nic));*/
|
||||
-
|
||||
+
|
||||
#if defined(__linux__)
|
||||
io = g_io_channel_new_file ("/proc/net/dev", "r", NULL);
|
||||
-
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ if (!g_shell_parse_argv ("/usr/bin/netstat -in -b -f link", NULL, &argv, NULL)) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ if (!g_spawn_async_with_pipes (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL, &pipe_out, NULL, NULL)) {
|
||||
+ g_strfreev (argv);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ g_strfreev (argv);
|
||||
+
|
||||
+ io = g_io_channel_unix_new (pipe_out);
|
||||
+#endif /* defined(__linux__) */
|
||||
+
|
||||
while (g_io_channel_read_line (io, &line, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) {
|
||||
if (title) {
|
||||
title = FALSE;
|
||||
g_free (line);
|
||||
continue;
|
||||
}
|
||||
+#if defined(__linux__)
|
||||
line = g_strdelimit (line, ":", ' ');
|
||||
sscanf (line, "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s", iface,
|
||||
rx_bytes, rx_pkt, rx_error, rx_drop, rx_fifo, frame,
|
||||
compressed, multicast,
|
||||
tx_bytes, tx_pkt, tx_error, tx_drop, tx_fifo, collissions);
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ tokens = (gchar **) g_malloc0 ((sizeof (char)) * (strlen (line) + 2));
|
||||
+ p = strtok (line, " \t\n");
|
||||
+ /* We only care about 11 fields for now */
|
||||
+ for (i = 0; i < 11 && p; i++, p = strtok (NULL, " \t\n")) {
|
||||
+ tokens[i] = g_strdup (p);
|
||||
+ }
|
||||
+
|
||||
+ if (i == 0 || i < 10) {
|
||||
+ g_free (line);
|
||||
+ g_strfreev (tokens);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ g_strlcpy (iface, tokens[0], sizeof (iface));
|
||||
+
|
||||
+ g_strlcpy (collissions, tokens[--i], sizeof (collissions));
|
||||
+ g_strlcpy (tx_bytes, tokens[--i], sizeof (tx_bytes));
|
||||
+ g_strlcpy (tx_error, tokens[--i], sizeof (tx_error));
|
||||
+ g_strlcpy (tx_pkt, tokens[--i], sizeof (tx_pkt));
|
||||
+ g_strlcpy (rx_bytes, tokens[--i], sizeof (rx_bytes));
|
||||
+ g_strlcpy (rx_error, tokens[--i], sizeof (rx_error));
|
||||
+ g_strlcpy (rx_pkt, tokens[--i], sizeof (rx_pkt));
|
||||
+
|
||||
+ g_strfreev (tokens);
|
||||
+#endif /* defined(__linux__) */
|
||||
|
||||
if (g_ascii_strcasecmp (iface, text) == 0) {
|
||||
/*
|
||||
@@ -248,7 +331,9 @@
|
||||
}
|
||||
|
||||
g_io_channel_unref (io);
|
||||
-#endif /* defined(__linux__) */
|
||||
+#if defined(__FreeBSD__)
|
||||
+ close (pipe_out);
|
||||
+#endif /* defined(__FreeBSD__) */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -384,6 +469,7 @@
|
||||
mii_data_result data;
|
||||
|
||||
getifaddrs (&ifa0);
|
||||
+ memset (&data, 0, sizeof (data));
|
||||
|
||||
for (ifr6 = ifa0; ifr6; ifr6 = ifr6->ifa_next) {
|
||||
if (strcmp (ifr6->ifa_name, nic) != 0) {
|
||||
@@ -425,7 +511,9 @@
|
||||
ifc.ifc_req = (struct ifreq *) buf;
|
||||
ioctl (sockfd, SIOCGIFCONF, &ifc);
|
||||
|
||||
+#if defined(__linux__)
|
||||
data = mii_get_basic (nic);
|
||||
+#endif /* defined(__linux__) */
|
||||
|
||||
for (ptr = buf; ptr < buf + ifc.ifc_len;) {
|
||||
ifr = (struct ifreq *) ptr;
|
20
net/gnomenettool/files/patch-src_netstat.c
Normal file
20
net/gnomenettool/files/patch-src_netstat.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- src/netstat.c.orig Sun Jul 4 17:57:03 2004
|
||||
+++ src/netstat.c Sun Jul 4 17:57:48 2004
|
||||
@@ -108,12 +108,17 @@
|
||||
g_return_val_if_fail (netinfo != NULL, NULL);
|
||||
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->routing))) {
|
||||
+#ifdef __FreeBSD__
|
||||
+ /* XXX We only support ipv4 now */
|
||||
+ option = g_strdup ("-rn -f inet");
|
||||
+#else
|
||||
/* Works for Solaris and Linux */
|
||||
if (netinfo_is_ipv6_enable ()) {
|
||||
option = g_strdup ("-rn -A inet -A inet6");
|
||||
} else {
|
||||
option = g_strdup ("-rn -A inet");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
|
||||
/* Only works for Solaris */
|
10
net/gnomenettool/files/patch-src_nettool.c
Normal file
10
net/gnomenettool/files/patch-src_nettool.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/nettool.c.orig Sun Jul 4 15:52:03 2004
|
||||
+++ src/nettool.c Sun Jul 4 15:53:11 2004
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <gnome.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
11
net/gnomenettool/files/patch-src_utils.c
Normal file
11
net/gnomenettool/files/patch-src_utils.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/utils.c.orig Sun Jul 4 20:11:49 2004
|
||||
+++ src/utils.c Sun Jul 4 20:12:14 2004
|
||||
@@ -240,7 +240,7 @@
|
||||
const gchar *unit = "B";
|
||||
gchar *result;
|
||||
|
||||
- sscanf (bytes, "%lld", &rx);
|
||||
+ rx = strtoull (bytes, (char **)NULL, 10);
|
||||
short_rx = rx * 10;
|
||||
|
||||
if (rx > 1125899906842624ull) {
|
@ -1,10 +1,3 @@
|
||||
gnome-network is a set of network oriented user tools. It includes the
|
||||
following tools:
|
||||
|
||||
* gnome-remote-shell: a remote shell (Telnet/SSH) client.
|
||||
* gnome-remote-desktop: a remote desktop (X11/VNC) client.
|
||||
* gnome-netinfo: a network information tool, for getting info on
|
||||
network cards, DNS, etc.
|
||||
* gnome-backup: a backup client tool.
|
||||
|
||||
WWW: http://www.gnome.org/
|
||||
Gnome-nettool is a utility for getting network information such as interface
|
||||
statistics, and for front-ending commands like ping and traceroute. It
|
||||
is very similar to the MacOS X Network Utility.
|
||||
|
@ -1,56 +1,48 @@
|
||||
bin/gnome-remote-shell
|
||||
bin/gnome-remote-desktop
|
||||
bin/gnome-netinfo
|
||||
share/gnome/application-registry/gnome-remote-desktop.applications
|
||||
share/gnome/applications/gnome-network-utilities.desktop
|
||||
share/gnome/applications/gnome-netinfo.desktop
|
||||
share/gnome/apps/Internet/gnome-remote-desktop.desktop
|
||||
share/gnome/gnome-network/dialogs/gnome-netinfo.glade
|
||||
share/gnome/gnome-network/dialogs/gnome-remote-shell.glade
|
||||
share/gnome/mime-info/gnome-remote-desktop.keys
|
||||
share/gnome/mime-info/gnome-remote-desktop.mime
|
||||
share/gnome/pixmaps/gnome-netinfo.png
|
||||
share/gnome/pixmaps/gnome-network/colors.png
|
||||
share/gnome/pixmaps/gnome-network/computer.png
|
||||
share/gnome/pixmaps/gnome-network/gnome-remote-desktop.png
|
||||
share/gnome/pixmaps/gnome-network/keyboard.png
|
||||
share/gnome/pixmaps/gnome-network/perform.png
|
||||
share/gnome/pixmaps/gnome-network/program.png
|
||||
share/gnome/pixmaps/gnome-network/size.png
|
||||
share/gnome/pixmaps/gnome-network/sound.png
|
||||
share/gnome/pixmaps/gnome-remote-desktop.png
|
||||
share/gnome/pixmaps/gnome-remote-shell.png
|
||||
share/locale/az/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ca/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/cs/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/da/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/de/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/el/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/es/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/fr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ga/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/gl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/he/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/hu/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/it/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ja/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ko/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ms/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/nl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/no/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pl/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pt/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/ru/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sr@Latn/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/sv/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/tr/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/uk/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/vi/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/wa/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/gnome-network.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/gnome-network.mo
|
||||
@dirrm share/gnome/pixmaps/gnome-network
|
||||
@dirrm share/gnome/gnome-network/dialogs
|
||||
@dirrm share/gnome/gnome-network
|
||||
bin/gnome-nettool
|
||||
share/gnome/applications/gnome-nettool.desktop
|
||||
share/gnome/gnome-nettool/dialogs/gnome-nettool.glade
|
||||
share/gnome/gnome-nettool/pixmaps/16_ethernet.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_loopback.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_plip.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/16_ppp.xpm
|
||||
share/gnome/gnome-nettool/pixmaps/gnome-nettool.png
|
||||
share/gnome/gnome-nettool/pixmaps/irda-16.png
|
||||
share/gnome/gnome-nettool/pixmaps/network.png
|
||||
share/gnome/gnome-nettool/pixmaps/wavelan-16.png
|
||||
share/gnome/pixmaps/gnome-nettool.png
|
||||
share/locale/az/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ca/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/cs/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/da/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/de/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/el/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/en_CA/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/en_GB/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/es/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/fr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ga/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/gl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/he/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/hu/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/it/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ja/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ko/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ms/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/nl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/no/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pl/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pt/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/ru/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sr@Latn/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/sv/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/tr/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/uk/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/vi/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/wa/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/gnome-nettool.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/gnome-nettool.mo
|
||||
@dirrm share/gnome/gnome-nettool/pixmaps
|
||||
@dirrm share/gnome/gnome-nettool/dialogs
|
||||
@dirrm share/gnome/gnome-nettool
|
||||
|
Loading…
Reference in New Issue
Block a user