Commit 9f862734 authored by German Poo-Caamano's avatar German Poo-Caamano Committed by Germán Poó Caamaño

Fixed #563044. Added basic NetBSD support (Thomas Klausner).

2008-12-09  German Poo-Caamano <gpoo@gnome.org>

	* src/ping.h: 
	* src/netstat.[ch]: Fixed #563044.  Added basic 
	  NetBSD support (Thomas Klausner).

svn path=/trunk/; revision=814
parent 1ed5801e
2008-12-09 German Poo-Caamano <gpoo@gnome.org>
* src/ping.h:
* src/netstat.[ch]: Fixed #563044. Added basic
NetBSD support (Thomas Klausner).
2008-12-09 German Poo-Caamano <gpoo@gnome.org>
* src/gnome-nettool.glade:
......
......@@ -2,6 +2,7 @@ gnome-nettool 2.26.0,
---------------------------------
- Removed warnings from the Glade UI (Diego Escalante)
- #563044: Added basic NetBSD support (Thomas Klausner)
- #394648: Added menu for the documentation (Germán Póo-Caamaño)
- #487308: Restored the behaviour of 'Edit/Copy' as default in
Gnome. Added 'Copy as text report' to copy all the values
......
......@@ -123,7 +123,7 @@ netstat_get_active_option (Netinfo * netinfo)
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
/* Only works for Solaris */
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
option = g_strdup ("-a -f inet -ln");
#else
if (netinfo_is_ipv6_enable ()) {
......@@ -292,7 +292,7 @@ netstat_protocol_tree_insert (GtkTreeView *widget, gchar *line)
g_return_if_fail (line != NULL);
count = strip_protocol_line (line, &data);
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
if (count == 5 || count == 6 || count == 9 || count == 10) {
#else
if (count == 5 || count == 6) {
......@@ -360,7 +360,7 @@ static gint
strip_protocol_line (gchar * line, netstat_protocol_data *data)
{
gint count = 0;
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
gint a1, a2, a3, a4;
gchar s9[30];
#else
......@@ -371,7 +371,7 @@ strip_protocol_line (gchar * line, netstat_protocol_data *data)
/*line = g_strdelimit (line, ":", ' ');*/
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
line = g_strdelimit (line, ":", ' ');
count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
......@@ -485,7 +485,7 @@ netstat_route_tree_insert (GtkTreeView *widget, gchar *line)
g_return_if_fail (line != NULL);
count = strip_route_line (line, &data);
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
if (count == 6) {
#else
if ((count == 8) || (count == 7)) {
......@@ -562,7 +562,7 @@ strip_route_line (gchar * line, netstat_route_data *data)
gchar **items;
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
data->destination,
data->gateway, flags,
......@@ -605,7 +605,7 @@ netstat_create_route_model (GtkTreeView *widget)
renderer = gtk_cell_renderer_text_new ();
column =
gtk_tree_view_column_new_with_attributes
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
(_("Destination/Prefix"), renderer, "text", 0, NULL);
#else
(_("Destination"), renderer, "text", 0, NULL);
......@@ -619,7 +619,7 @@ netstat_create_route_model (GtkTreeView *widget)
gtk_tree_view_column_set_alignment (column, 0.5);
gtk_tree_view_append_column (widget, column);
#if ! (defined(__FreeBSD__) || defined(__OpenBSD__))
#if ! (defined(__FreeBSD__) || defined(__OpenBSD__)) || defined(__NetBSD__)
renderer = gtk_cell_renderer_text_new ();
column =
gtk_tree_view_column_new_with_attributes
......
......@@ -30,7 +30,7 @@
# define NETSTAT_ROUTE6_FORMAT "%s %s %s %d %d %d %s"
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
# 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"
......
......@@ -30,7 +30,7 @@
# 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"
# define PING_PARAMS_6
#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
# 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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment