diff options
author | Anders Nordby <anders@FreeBSD.org> | 2002-07-07 22:08:19 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2002-07-07 22:08:19 +0000 |
commit | 7172e8372d3eeaa735418f2e39914b6fe23a65dd (patch) | |
tree | 65b6328f656b71db74de1f5767c0fea36f5d8c3d /net/fping | |
parent | a15cfb764a37ee51c1498f9e74a511fd2ecfd6ab (diff) |
Update to 2.4b2.
IPv6 support gained.
Master site moved.
Add WWW URL.
Notes
Notes:
svn path=/head/; revision=62614
Diffstat (limited to 'net/fping')
-rw-r--r-- | net/fping/Makefile | 13 | ||||
-rw-r--r-- | net/fping/distinfo | 2 | ||||
-rw-r--r-- | net/fping/files/patch-02 | 160 | ||||
-rw-r--r-- | net/fping/files/patch-03 | 132 | ||||
-rw-r--r-- | net/fping/pkg-descr | 2 |
5 files changed, 160 insertions, 149 deletions
diff --git a/net/fping/Makefile b/net/fping/Makefile index 5a9825e7fe34..afde0e8cfff0 100644 --- a/net/fping/Makefile +++ b/net/fping/Makefile @@ -7,10 +7,10 @@ # PORTNAME= fping -PORTVERSION= 2.2b1 -CATEGORIES= net -MASTER_SITES= ftp://ftp.stanford.edu/dept/networking/pub/fping/ \ - ftp://sntop.sourceforge.net/pub/sntop/ +PORTVERSION= 2.4b2 +CATEGORIES= net ipv6 +MASTER_SITES= http://www.fping.com/download/ +DISTNAME= ${PORTNAME}-${PORTVERSION}_to-ipv6 MAINTAINER= ports@FreeBSD.org @@ -19,6 +19,11 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS= --bindir="${PREFIX}/sbin" MAN8= fping.8 +.if defined(WITH_IPV6) +# IPv6 not enabled by default, as it does not work together with IPv4. +CFLAGS+= -DIPV6 +.endif + post-patch: @${REINPLACE_CMD} -e 's/fping@/${MAINTAINER:S/@/\\@/g} or fping@/g' \ ${WRKSRC}/fping.c diff --git a/net/fping/distinfo b/net/fping/distinfo index c7a9f54474a3..d9737023cd56 100644 --- a/net/fping/distinfo +++ b/net/fping/distinfo @@ -1 +1 @@ -MD5 (fping-2.2b1.tar.gz) = 76b398a9b97ee4f801a2e7ed37bc29a3 +MD5 (fping-2.4b2_to-ipv6.tar.gz) = 3ad516765514249a40d3c5b6caab812a diff --git a/net/fping/files/patch-02 b/net/fping/files/patch-02 index cc071a946b3f..7abea3fea2f2 100644 --- a/net/fping/files/patch-02 +++ b/net/fping/files/patch-02 @@ -1,6 +1,14 @@ ---- fping.c.orig Wed Jan 8 12:29:43 1997 -+++ fping.c Sat Apr 14 00:43:43 2001 -@@ -208,6 +208,10 @@ +--- fping.c.orig Mon Jan 21 01:06:30 2002 ++++ fping.c Sun Jul 7 22:12:31 2002 +@@ -42,7 +42,6 @@ + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ +-#define IPV6 1 /* This should be a compiler option, or even better be done from the Makefile... ;) */ + + #ifndef _NO_PROTO + #if !__STDC__ && !defined( __cplusplus ) && !defined( FUNCPROTO ) \ +@@ -112,6 +111,10 @@ #include <arpa/inet.h> #include <netdb.h> @@ -11,17 +19,7 @@ /* RS6000 has sys/select.h */ #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> -@@ -219,7 +223,9 @@ - - extern char *optarg; - extern int optind,opterr; -+#if !(defined(BSD) && (BSD >= 199103)) - extern char *sys_errlist[]; -+#endif - extern int h_errno; - - #ifdef __cplusplus -@@ -321,13 +327,13 @@ +@@ -246,13 +249,13 @@ struct timeval last_send_time; /* time of last packet sent */ int num_sent; /* number of ping packets sent */ int num_recv; /* number of pings received */ @@ -38,77 +36,83 @@ + long min_reply_i; /* shortest response time */ int total_time_i; /* sum of response times */ int *resp_times; /* individual response times */ - #ifdef DEBUG -@@ -475,7 +481,7 @@ + #if defined( DEBUG ) || defined( _DEBUG ) +@@ -482,7 +485,7 @@ - /*seteuid(getuid());*/ + }/* IF */ -- prog = argv[0]; -+ prog = (prog = strrchr(argv[0], '/')) ? prog + 1 : argv[0]; - ident = getpid() & 0xFFFF; +- prog = argv[0]; ++ prog = (prog = strrchr(argv[0], '/')) ? prog + 1 : argv[0]; + ident = getpid() & 0xFFFF; - verbose_flag = 1; -@@ -524,8 +530,8 @@ - usage(); break; - #endif - case 'v': -- printf("%s: Version %s $Date: 1997/01/08 20:29:33 $\n",argv[0], VERSION); -- printf("%s: comments to fping@networking.Stanford.EDU\n",argv[0]); -+ printf("%s: FreeBSD port based on Version %s $Date: 1997/01/08 20:29:33 $\n",argv[0], VERSION); -+ printf("%s: comments to fping@networking.Stanford.EDU\n",argv[0]); - exit(0); - case 'f': - #ifdef ENABLE_F_OPTION -@@ -671,6 +677,7 @@ - } - if (!ping_file) errno_crash_and_burn("fopen"); - while(fgets(line,132,ping_file)) { -+ line[132-1] = '\0'; - if (sscanf(line,"%s",host) != 1) - continue; - if ((!*host) || (host[0]=='#')) /* magic to avoid comments */ -@@ -1033,7 +1040,6 @@ - memset(buffer, 0, ping_pkt_size * sizeof(char)); - icp = (struct icmp *) buffer; + verbose_flag = 1; +@@ -823,6 +826,7 @@ -- gettimeofday(&h->last_send_time,&tz); - icp->icmp_type = ICMP_ECHO; - icp->icmp_code = 0; - icp->icmp_cksum = 0; -@@ -1041,6 +1047,8 @@ - icp->icmp_id = ident; + while( fgets( line, 132, ping_file ) ) + { ++ line[132-1] = '\0'; + if( sscanf( line, "%s", host ) != 1 ) + continue; + +@@ -1503,7 +1507,6 @@ + memset( buffer, 0, ping_pkt_size * sizeof( char ) ); + icp = ( FPING_ICMPHDR* )buffer; - pdp = (PING_DATA *) (buffer + SIZE_ICMP_HDR); -+ /* set the time at the very last possible point */ -+ gettimeofday(&h->last_send_time,&tz); - pdp->ping_ts = h->last_send_time; - pdp->ping_count = h->num_sent; +- gettimeofday( &h->last_send_time, &tz ); + #ifndef IPV6 + icp->icmp_type = ICMP_ECHO; + icp->icmp_code = 0; +@@ -1512,6 +1515,8 @@ + icp->icmp_id = ident; -@@ -1099,6 +1107,10 @@ + pdp = ( PING_DATA* )( buffer + SIZE_ICMP_HDR ); ++ /* set the time at the very last possible point */ ++ gettimeofday(&h->last_send_time,&tz); + pdp->ping_ts = h->last_send_time; + pdp->ping_count = h->num_sent; - result=recvfrom_wto(s,buffer,4096, - (struct sockaddr *)&response_addr,select_time); -+ -+ /* get time of receipt as close to the real time as possible */ -+ gettimeofday(¤t_time,&tz); +@@ -1523,6 +1528,8 @@ + icp->icmp6_id = ident; + + pdp = ( PING_DATA* )( buffer + SIZE_ICMP_HDR ); ++ /* set the time at the very last possible point */ ++ gettimeofday(&h->last_send_time,&tz); + pdp->ping_ts = h->last_send_time; + pdp->ping_count = h->num_sent; + +@@ -1611,6 +1618,9 @@ + + result = recvfrom_wto( s, buffer, sizeof(buffer), &response_addr, select_time ); + ++ /* get time of receipt as close to the real time as possible */ ++ gettimeofday(¤t_time,&tz); + - if (result<0) { return 0; } /* timeout */ + if( result < 0 ) + return 0; /* timeout */ - #ifdef DEBUG -@@ -1107,7 +1119,7 @@ - return 0; - #endif - ip = (struct ip *) buffer; --#if defined(__alpha__) && __STDC__ -+#if defined(__alpha__) && defined(__osf1__) && __STDC__ - /* The alpha headers are decidedly broken. - * Using an ANSI compiler, it provides ip_vhl instead of ip_hl and - * ip_v. So, to get ip_hl, we mask off the bottom four bits. -@@ -1144,7 +1156,6 @@ - h=table[n]; +@@ -1625,7 +1635,7 @@ + + ip = ( struct ip* )buffer; + #ifndef IPV6 +-#if defined( __alpha__ ) && __STDC__ && !defined( __GLIBC__ ) ++#if defined( __alpha__ ) && defined(__osf1__) && __STDC__ && !defined( __GLIBC__ ) + /* The alpha headers are decidedly broken. + * Using an ANSI compiler, it provides ip_vhl instead of ip_hl and + * ip_v. So, to get ip_hl, we mask off the bottom four bits. +@@ -1633,7 +1643,7 @@ + hlen = ( ip->ip_vhl & 0x0F ) << 2; + #else + hlen = ip->ip_hl << 2; +-#endif /* defined(__alpha__) && __STDC__ */ ++#endif /* defined(__alpha__) && defined(__osf1__) && __STDC__ */ + if( result < hlen + ICMP_MINLEN ) + #else + if( result < sizeof(FPING_ICMPHDR) ) +@@ -1690,7 +1700,6 @@ + h = table[n]; - /* received ping is cool, so process it */ -- gettimeofday(¤t_time,&tz); - h->waiting = 0; - h->timeout = timeout; - h->num_recv++; h->num_recv_i++; + /* received ping is cool, so process it */ +- gettimeofday( ¤t_time, &tz ); + h->waiting = 0; + h->timeout = timeout; + h->num_recv++; diff --git a/net/fping/files/patch-03 b/net/fping/files/patch-03 index 90b2a030fb82..71d85b17b533 100644 --- a/net/fping/files/patch-03 +++ b/net/fping/files/patch-03 @@ -1,68 +1,68 @@ ---- fping.8.orig Wed Jan 8 10:48:49 1997 -+++ fping.8 Sat Aug 26 19:51:19 2000 +--- fping.8.orig Mon Jan 21 01:05:48 2002 ++++ fping.8 Sun Jul 7 22:03:43 2002 @@ -1,4 +1,4 @@ --.TH fping l -+.TH fping 8 - .SH NAME - fping \- send ICMP ECHO_REQUEST packets to network hosts - .SH SYNOPSIS +-.TH fping l
++.TH fping 8
+ .SH NAME
+ fping \- send ICMP ECHO_REQUEST packets to network hosts
+ .SH SYNOPSIS
@@ -79,7 +79,7 @@ - - somehost : 91.7 37.0 29.2 - 36.8 - --shows the response time in milliseconds for each of the five requests, -+shows the response time in microseconds for each of the five requests, - with the "-" indicating that no response was received to the fourth - request. - .IP \fB-d\fR 5 -@@ -96,7 +96,7 @@ - .IP \fB-h\fR 5 - Print usage message. - .IP \fB-i\fIn\fR 5 --The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25). -+ The minimum amount of time (in microseconds) between sending a ping packet to any host (default is 25). - .IP \fB-l\fR 5 - Loop sending packets to each target indefinitely. Can be interrupted - with ctl-C; statistics about responses for each target are then displayed. -@@ -106,7 +106,7 @@ - Same as -d. - .IP \fB-p\fR 5 - In looping or counting modes (-l, -c, or -C), this parameter sets the --time in milliseconds that -+time in microseconds that - .B fping - waits between successive packets to an individual target. Default is - 1000. -@@ -120,7 +120,7 @@ - .IP \fB-s\fR 5 - Print cumulative statistics upon exit. - .IP \fB-t\fIn\fR 5 --Initial target timeout in milliseconds (default 500). In the default -+Initial target timeout in microseconds (default 2500). In the default - mode, this is the amount of time that - .B fping - waits for a response to its first request. Successive timeouts are -@@ -141,12 +141,12 @@ - example none the less. - .nf - --#!/usr/local/bin/perl -+#!/usr/bin/perl - require 'open2.pl'; - - $MAILTO = "root"; - --$pid = &open2("OUTPUT","INPUT","/usr/local/bin/fping -u"); -+$pid = &open2("OUTPUT","INPUT","/usr/local/sbin/fping -u"); - - @check=("slapshot","foo","foobar"); - -@@ -167,7 +167,7 @@ - that are currently reachable. - .nf - --#!/usr/local/bin/perl -+#!/usr/bin/perl - - $hosts_to_backup = `cat /etc/hosts.backup | fping -a`; - +
+ somehost : 91.7 37.0 29.2 - 36.8
+
+-shows the response time in milliseconds for each of the five requests,
++shows the response time in microseconds for each of the five requests,
+ with the "-" indicating that no response was received to the fourth
+ request.
+ .IP \fB-d\fR 5
+@@ -107,7 +107,7 @@ + .IP \fB-h\fR 5
+ Print usage message.
+ .IP \fB-i\fIn\fR 5
+-The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25).
++The minimum amount of time (in microseconds) between sending a ping packet to any target (default is 25).
+ .IP \fB-l\fR 5
+ Loop sending packets to each target indefinitely. Can be interrupted
+ with ctl-C; statistics about responses for each target are then displayed.
+@@ -117,7 +117,7 @@ + Same as -d.
+ .IP \fB-p\fR 5
+ In looping or counting modes (-l, -c, or -C), this parameter sets the
+-time in milliseconds that
++time in microseconds that
+ .B fping
+ waits between successive packets to an individual target. Default is
+ 1000.
+@@ -131,7 +131,7 @@ + .IP \fB-s\fR 5
+ Print cumulative statistics upon exit.
+ .IP \fB-t\fIn\fR 5
+-Initial target timeout in milliseconds (default 500). In the default
++Initial target timeout in microseconds (default 2500). In the default
+ mode, this is the amount of time that
+ .B fping
+ waits for a response to its first request. Successive timeouts are
+@@ -152,12 +152,12 @@ + example none the less.
+ .nf
+
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ require 'open2.pl';
+
+ $MAILTO = "root";
+
+-$pid = &open2("OUTPUT","INPUT","/usr/local/bin/fping -u");
++$pid = &open2("OUTPUT","INPUT","/usr/local/sbin/fping -u");
+
+ @check=("slapshot","foo","foobar");
+
+@@ -178,7 +178,7 @@ + that are currently reachable.
+ .nf
+
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $hosts_to_backup = `cat /etc/hosts.backup | fping -a`;
+
diff --git a/net/fping/pkg-descr b/net/fping/pkg-descr index 0e7d998a6ca1..124b0f28a8e2 100644 --- a/net/fping/pkg-descr +++ b/net/fping/pkg-descr @@ -12,3 +12,5 @@ without flooding the network. Unlike ping, fping is meant to be used in scripts and its output is easy to parse. + +WWW: http://www.fping.com/ |