mirror of
https://git.freebsd.org/ports.git
synced 2025-06-04 20:36:30 -04:00
net/netselect: Update version 0.3=>0.4
- Take MAINTAINERSHIP
This commit is contained in:
parent
37a68481f0
commit
288f9d6f40
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508312
4 changed files with 28 additions and 26 deletions
|
@ -2,22 +2,23 @@
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= netselect
|
PORTNAME= netselect
|
||||||
PORTVERSION= 0.3
|
PORTVERSION= 0.4
|
||||||
|
DISTVERSIONPREFIX=${PORTNAME}-
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
MASTER_SITES= http://apenwarr.ca/netselect/ \
|
|
||||||
GENTOO
|
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
MAINTAINER= bofh@FreeBSD.org
|
||||||
COMMENT= Ultrafast implementation of ping
|
COMMENT= Ultrafast implementation of ping
|
||||||
|
|
||||||
LICENSE= BSD3CLAUSE
|
LICENSE= BSD3CLAUSE
|
||||||
|
|
||||||
|
USES= gmake
|
||||||
|
USE_GITHUB= yes
|
||||||
|
|
||||||
|
GH_ACCOUNT= apenwarr
|
||||||
|
|
||||||
OPTIONS_DEFINE= SUID DOCS
|
OPTIONS_DEFINE= SUID DOCS
|
||||||
OPTIONS_SUB= yes
|
OPTIONS_SUB= yes
|
||||||
SUID_DESC= Install with the setuid bit to allow use by non-root users
|
SUID_DESC= Install with the setuid bit to allow use by non-root users
|
||||||
EXTRACT_AFTER_ARGS=netselect/netselect.c netselect/README
|
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
||||||
|
|
||||||
do-build:
|
do-build:
|
||||||
${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
|
${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
|
||||||
|
@ -25,6 +26,7 @@ do-build:
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
||||||
|
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1/${PORTNAME}.1
|
||||||
|
|
||||||
do-install-DOCS-on:
|
do-install-DOCS-on:
|
||||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
SHA256 (netselect-0.3.tar.gz) = fe81942589d5219d030e5cecfb12787fb6d3613416cb326dea4952bf53f9c978
|
TIMESTAMP = 1565127643
|
||||||
SIZE (netselect-0.3.tar.gz) = 22047
|
SHA256 (apenwarr-netselect-netselect-0.4_GH0.tar.gz) = ae343991c94b1fdeb5e7896bb11d357c1dd9297f5d842c507953f57935e15e19
|
||||||
|
SIZE (apenwarr-netselect-netselect-0.4_GH0.tar.gz) = 22095
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- netselect.c 2001-08-29 05:18:57.000000000 -0400
|
--- netselect.c.orig 2010-10-26 23:08:55 UTC
|
||||||
+++ netselect.c 2015-03-09 02:31:02.000000000 -0400
|
+++ netselect.c
|
||||||
@@ -39,14 +39,13 @@
|
@@ -39,15 +39,14 @@
|
||||||
* hey, great! Let me know. -- apenwarr
|
* hey, great! Let me know. -- apenwarr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -17,20 +17,21 @@
|
||||||
+#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
+#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||||
+#if defined(__OpenBSD__)
|
+#if defined(__OpenBSD__)
|
||||||
+#include <machine/types.h>
|
+#include <machine/types.h>
|
||||||
+#endif
|
|
||||||
+#include <machine/endian.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
+#include <machine/endian.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -152,6 +151,7 @@
|
#include <sys/time.h>
|
||||||
|
@@ -167,6 +166,7 @@ int main(int argc, char **argv)
|
||||||
extern int optind;
|
extern int optind;
|
||||||
int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100;
|
int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100;
|
||||||
int ch, seq, ttl, max_ttl = 30, min_tries = 10, num_score = 1;
|
int ch, seq, ttl, max_ttl = 30, num_score = 1;
|
||||||
+ int on = 1;
|
+ int on = 1;
|
||||||
|
int use_icmp = 0;
|
||||||
|
unsigned int min_tries = 10;
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
struct timezone tz;
|
@@ -280,7 +280,12 @@ int main(int argc, char **argv)
|
||||||
OPacket outpacket; /* last output (udp) packet */
|
|
||||||
@@ -234,7 +234,12 @@
|
|
||||||
if (verbose >= 1)
|
if (verbose >= 1)
|
||||||
fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n",
|
fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n",
|
||||||
num_score, numhosts, numhosts==1 ? "" : "es");
|
num_score, numhosts, numhosts==1 ? "" : "es");
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
/* keep going until most of the hosts have been finished */
|
/* keep going until most of the hosts have been finished */
|
||||||
must_continue = numhosts;
|
must_continue = numhosts;
|
||||||
while (must_continue && must_continue >= numhosts/2)
|
while (must_continue && must_continue >= numhosts/2)
|
||||||
@@ -712,7 +717,7 @@
|
@@ -774,7 +779,7 @@ static void send_probe(int seq, int ttl, OPacket *op,
|
||||||
ip->ip_off = 0;
|
ip->ip_off = 0;
|
||||||
ip->ip_hl = sizeof(*ip) >> 2;
|
ip->ip_hl = sizeof(*ip) >> 2;
|
||||||
ip->ip_p = IPPROTO_UDP;
|
ip->ip_p = IPPROTO_UDP;
|
||||||
|
@ -53,18 +54,15 @@
|
||||||
ip->ip_ttl = ttl;
|
ip->ip_ttl = ttl;
|
||||||
ip->ip_v = IPVERSION;
|
ip->ip_v = IPVERSION;
|
||||||
ip->ip_id = htons(ident + seq);
|
ip->ip_id = htons(ident + seq);
|
||||||
@@ -771,12 +776,8 @@
|
@@ -905,11 +910,7 @@ static HostData *wait_for_reply(HostData *hosts, int n
|
||||||
int cc = 0;
|
|
||||||
time_t msec_used;
|
time_t msec_used;
|
||||||
HostData *host;
|
HostData *host;
|
||||||
-
|
|
||||||
-#if !defined(__GLIBC__)
|
-#if !defined(__GLIBC__)
|
||||||
- int fromlen = sizeof(from);
|
- int fromlen = sizeof(from);
|
||||||
-#else /* __GLIBC__ */
|
-#else /* __GLIBC__ */
|
||||||
- size_t fromlen = sizeof(from);
|
socklen_t fromlen = sizeof(from);
|
||||||
-#endif /* __GLIBC__ */
|
-#endif /* __GLIBC__ */
|
||||||
+
|
|
||||||
+ socklen_t fromlen = sizeof(from);
|
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(sock, &fds);
|
FD_SET(sock, &fds);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
%%SUID%%@(root,wheel,4110) bin/netselect
|
%%SUID%%@(root,wheel,4110) bin/netselect
|
||||||
%%NO_SUID%%@(root,wheel,100) bin/netselect
|
%%NO_SUID%%@(root,wheel,100) bin/netselect
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||||
|
man/man1/netselect.1.gz
|
||||||
|
|
Loading…
Add table
Reference in a new issue