~ubuntu-branches/ubuntu/maverick/gnome-nettool/maverick-proposed

« back to all changes in this revision

Viewing changes to src/ping.h

  • Committer: Bazaar Package Importer
  • Author(s): Baptiste Mille-Mathias
  • Date: 2009-01-08 21:11:25 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090108211125-otfcdol4y3irrwi9
Tags: 2.25.3-0ubuntu1
* New upstream version (LP: #315566)
* debian/control.in:
  - add libgtop2-dev in Build-Depends
* debian/patches/02_lpi.patch:
  - updated
* debian/patches/03_autoconf.patch:
  - updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "nettool.h"
25
25
 
26
26
/* The ping usage and output is different between Unix flavours */
27
 
/* FIXME: Add BSD support */
28
27
#if defined(__linux__)
29
 
#   define PING_PROGRAM_FORMAT "%s ping -b -c %d -n %s"
30
 
#   define PING_PROGRAM_FORMAT_6 "%s ping6 -c %d -n %s"
 
28
    /*  <path to program> ping -b [-c <count>] -n <host> */
 
29
#   define PING_PROGRAM_FORMAT "%s ping -b%s-n %s"
 
30
#   define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
31
31
#   define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
32
32
#   define PING_PARAMS_6
33
 
#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__OpenBSD__)
34
 
#   define PING_PROGRAM_FORMAT "%s ping -c %d -n %s"
35
 
#   define PING_PROGRAM_FORMAT_6 "%s ping6 -c %d -n %s"
 
33
#elif defined(__OSF__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
 
34
    /*  <path to program> ping [-c <count>] -n <host> */
 
35
#   define PING_PROGRAM_FORMAT "%s ping%s-n %s"
 
36
#   define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
36
37
#   define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
37
38
#   define PING_PARAMS_6
38
39
#elif defined(__sun__) 
39
 
#   define PING_PROGRAM_FORMAT "%s ping -s -n %s 56 %d"
40
 
#   define PING_PROGRAM_FORMAT_6 "%s ping -s -A inet6 -a -n %s 56 %d"
 
40
    /*  <path to program> ping -s -n <host> [<count>] */
 
41
#   define PING_PROGRAM_FORMAT "%s ping -s -n %s 56%s"
 
42
#   define PING_PROGRAM_FORMAT_6 "%s ping -s -A inet6 -a -n %s 56%s"
41
43
#   define PING_FORMAT "%d bytes from %s icmp_seq=%d. time=%f %s"
42
44
#   define PING_PARAMS_5
43
45
#elif defined(__hpux__)
44
 
#   define PING_PROGRAM_FORMAT "%s ping %s -n %d"
45
 
#   define PING_PROGRAM_FORMAT_6 "%s ping %s -f inet6 -n %d"
 
46
#   define PING_PROGRAM_FORMAT "%s ping %s -n%s"
 
47
#   define PING_PROGRAM_FORMAT_6 "%s ping %s -f inet6 -n%s"
46
48
#   define PING_FORMAT "%d bytes from %s icmp_seq=%d. time=%f %s"
47
49
#   define PING_PARAMS_5
48
50
#else
49
 
#   define PING_PROGRAM_FORMAT "%s ping -c %d -n %s"
 
51
#   define PING_PROGRAM_FORMAT "%s ping %s -n %s"
 
52
#   define PING_PROGRAM_FORMAT_6 "%s ping6 %s -n %s"
50
53
#   define PING_FORMAT "%d bytes from %s icmp_seq=%d. time=%f %s"
51
54
#   define PING_PARAMS_5
52
55
#endif