~cyphermox/ubuntu/maverick/gnome-nettool/ping-fix

« back to all changes in this revision

Viewing changes to src/netstat.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-12-18 17:18:26 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20061218171826-eezo2l99wtb6pq57
Tags: 2.17.4-0ubuntu1
* New upstream version:
  - Improves the behavior on list
  - Fixed compilation in OpenBSD
  - Added support for OpenBSD
  - Changed the sematic from packets loss to packet succeed
  - Added bar-graph display for ping
* Sync with Debian
* debian/control.in:
  - Build-Depends on liblaunchpad-integration-dev
  - Depends on "iputils-tracepath" rather than "tcptraceroute | traceroute"
  - make the description mention tracepath rather than traceroute
* debian/patches/01_use_tracepath.patch:
  - use tracepath rather than tcptraceroute
* debian/patches/02_lpi.patch:
  - launchpad integration
* debian/patches/03_autoconf.patch:
  - configure update
* debian/patches/04_menu_change.patch:
  - change menu category (MenuRevisited spec)

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        }
124
124
        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->protocol))) {
125
125
                /* Only works for Solaris */
126
 
#ifdef __FreeBSD__
 
126
#if defined(__FreeBSD__) || defined(__OpenBSD__)
127
127
                option = g_strdup ("-a -f inet -ln");
128
128
#else
129
129
                if (netinfo_is_ipv6_enable ()) {
292
292
        g_return_if_fail (line != NULL);
293
293
 
294
294
        count = strip_protocol_line (line, &data);
295
 
#ifdef __FreeBSD__
 
295
#if defined(__FreeBSD__) || defined(__OpenBSD__)
296
296
        if (count == 5 || count == 6 || count == 9 || count == 10) {
297
297
#else
298
298
        if (count == 5 || count == 6) {
360
360
strip_protocol_line (gchar * line, netstat_protocol_data *data)
361
361
{
362
362
        gint count = 0;
363
 
#ifdef __FreeBSD__
 
363
#if defined(__FreeBSD__) || defined(__OpenBSD__)
364
364
        gint a1, a2, a3, a4;
365
365
        gchar s9[30];
366
366
#else
371
371
 
372
372
        /*line = g_strdelimit (line, ":", ' ');*/
373
373
 
374
 
#ifdef __FreeBSD__
 
374
#if defined(__FreeBSD__) || defined(__OpenBSD__)
375
375
        line = g_strdelimit (line, ":", ' ');
376
376
        
377
377
        count = sscanf (line, NETSTAT_PROTOCOL_FORMAT,
485
485
        g_return_if_fail (line != NULL);
486
486
 
487
487
        count = strip_route_line (line, &data);
488
 
#ifdef __FreeBSD__
 
488
#if defined(__FreeBSD__) || defined(__OpenBSD__)
489
489
        if (count == 6) {
490
490
#else
491
491
        if ((count == 8) || (count == 7)) {
532
532
                                                         (model),
533
533
                                                         &iter,
534
534
                                                         &sibling);
 
535
                        gtk_tree_path_free (path);
535
536
                } else {
536
537
                        gtk_list_store_append (GTK_LIST_STORE
537
538
                                                   (model), &iter);
561
562
        gchar **items;
562
563
#endif
563
564
 
564
 
#ifdef __FreeBSD__
 
565
#if defined(__FreeBSD__) || defined(__OpenBSD__)
565
566
        count = sscanf (line, NETSTAT_ROUTE_FORMAT,
566
567
                        data->destination,
567
568
                        data->gateway, flags,
604
605
        renderer = gtk_cell_renderer_text_new ();
605
606
        column =
606
607
            gtk_tree_view_column_new_with_attributes
607
 
#ifdef __FreeBSD__
 
608
#if defined(__FreeBSD__) || defined(__OpenBSD__)
608
609
            (_("Destination/Prefix"), renderer, "text", 0, NULL);
609
610
#else
610
611
            (_("Destination"), renderer, "text", 0, NULL);
618
619
        gtk_tree_view_column_set_alignment (column, 0.5);
619
620
        gtk_tree_view_append_column (widget, column);
620
621
 
621
 
#ifndef __FreeBSD__
 
622
#if ! (defined(__FreeBSD__) || defined(__OpenBSD__))
622
623
        renderer = gtk_cell_renderer_text_new ();
623
624
        column =
624
625
            gtk_tree_view_column_new_with_attributes