From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 15 11:20:12 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D714616A4E2 for ; Sat, 15 Jul 2006 11:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EA4643D4C for ; Sat, 15 Jul 2006 11:20:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6FBKCDo008368 for ; Sat, 15 Jul 2006 11:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6FBKC44008367; Sat, 15 Jul 2006 11:20:12 GMT (envelope-from gnats) Resent-Date: Sat, 15 Jul 2006 11:20:12 GMT Resent-Message-Id: <200607151120.k6FBKC44008367@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Timothy Redaelli Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ADBB16A4DA for ; Sat, 15 Jul 2006 11:12:30 +0000 (UTC) (envelope-from drizzt@drizzt.ath.cx) Received: from mail-relay-1.tiscali.it (mail-relay-1.tiscali.it [213.205.33.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 060A143D49 for ; Sat, 15 Jul 2006 11:12:29 +0000 (GMT) (envelope-from drizzt@drizzt.ath.cx) Received: from drizzt.ath.cx (84.220.68.166) by mail-relay-1.tiscali.it (7.3.104) id 44AA85C500142523 for FreeBSD-gnats-submit@freebsd.org; Sat, 15 Jul 2006 13:12:28 +0200 Received: by drizzt.ath.cx (Postfix, from userid 1001) id 400EA6220; Sat, 15 Jul 2006 13:12:27 +0200 (CEST) Message-Id: <20060715111227.400EA6220@drizzt.ath.cx> Date: Sat, 15 Jul 2006 13:12:27 +0200 (CEST) From: Timothy Redaelli To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/100338: New port: net/netselect Ultrafast implementation of ping X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Timothy Redaelli List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2006 11:20:12 -0000 >Number: 100338 >Category: ports >Synopsis: New port: net/netselect Ultrafast implementation of ping >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 15 11:20:11 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Timothy Redaelli >Release: FreeBSD 6.1-STABLE i386 >Organization: >Environment: System: FreeBSD picard.drizzt.local 6.1-STABLE FreeBSD 6.1-STABLE #1: Sun May 28 17:44:31 CEST 2006 drizzt@picard.drizzt.local:/usr/obj/usr/src/sys/PICARD i386 >Description: >How-To-Repeat: >Fix: --- netselect.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/net/netselect/ # /usr/ports/net/netselect/pkg-descr # /usr/ports/net/netselect/distinfo # /usr/ports/net/netselect/Makefile # /usr/ports/net/netselect/files # /usr/ports/net/netselect/files/patch-netselect.c # echo c - /usr/ports/net/netselect/ mkdir -p /usr/ports/net/netselect/ > /dev/null 2>&1 echo x - /usr/ports/net/netselect/pkg-descr sed 's/^X//' >/usr/ports/net/netselect/pkg-descr << 'END-of-/usr/ports/net/netselect/pkg-descr' Xnetselect is an ultrafast intelligent parallelizing binary-search Ximplementation of "ping." X Xnetselect determines several facts about all of the hosts given on the command Xline, much faster than you would if you tried to use ping and traceroute. XFor example, if I type: X X netselect -v ftp.fceia.unr.edu.ar \ X ftp.kulnet.kuleuven.ac.be \ X ftp.cdrom.com ftp.debian.org \ X ftp.de.debian.org X XIt tells me statistics about each of the hostnames I provided, Xin much less time than doing a whole bunch of traceroutes. END-of-/usr/ports/net/netselect/pkg-descr echo x - /usr/ports/net/netselect/distinfo sed 's/^X//' >/usr/ports/net/netselect/distinfo << 'END-of-/usr/ports/net/netselect/distinfo' XMD5 (netselect-0.3.tar.gz) = 3a3714946db2458e5db3d55373057ef2 XSHA256 (netselect-0.3.tar.gz) = fe81942589d5219d030e5cecfb12787fb6d3613416cb326dea4952bf53f9c978 XSIZE (netselect-0.3.tar.gz) = 22047 END-of-/usr/ports/net/netselect/distinfo echo x - /usr/ports/net/netselect/Makefile sed 's/^X//' >/usr/ports/net/netselect/Makefile << 'END-of-/usr/ports/net/netselect/Makefile' X# New ports collection makefile for: netselect X# Date created: 15 July 2006 X# Whom: Timothy Redaelli X# X# $FreeBSD$ X# X XPORTNAME= netselect XPORTVERSION= 0.3 XCATEGORIES= net XMASTER_SITES= ${MASTER_SITE_GENTOO} \ X http://www.worldvisions.ca/~apenwarr/netselect/ XMASTER_SITE_SUBDIR= distfiles X XMAINTAINER= drizzt@gufi.org XCOMMENT= Ultrafast implementation of ping X XPLIST_FILES= bin/${PORTNAME} X XWRKSRC= ${WRKDIR}/${PORTNAME} X XOPTIONS= SUID "Install with the sticky bit (mode 4110)" off X X.include X X.if defined(WITH_SUID) XBINMODE= 4110 X.else XBINMODE= 0100 X.endif X Xdo-build: X ${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin X X.include END-of-/usr/ports/net/netselect/Makefile echo c - /usr/ports/net/netselect/files mkdir -p /usr/ports/net/netselect/files > /dev/null 2>&1 echo x - /usr/ports/net/netselect/files/patch-netselect.c sed 's/^X//' >/usr/ports/net/netselect/files/patch-netselect.c << 'END-of-/usr/ports/net/netselect/files/patch-netselect.c' X--- netselect.c.orig 2006-07-14 22:59:18.000000000 +0200 X+++ netselect.c 2006-07-14 22:57:22.000000000 +0200 X@@ -39,14 +39,13 @@ X * hey, great! Let me know. -- apenwarr X */ X X-#ifdef __EMX__ X-# include X-# include X-# include X-# include X-# include X-#else X-# include X+#ifdef __linux__ X+#include X+#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) X+#if defined(__OpenBSD__) X+#include X+#endif X+#include X #endif X X #include X@@ -152,6 +151,7 @@ X extern int optind; X int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100; X int ch, seq, ttl, max_ttl = 30, min_tries = 10, num_score = 1; X+ int on = 1; X struct timeval now; X struct timezone tz; X OPacket outpacket; /* last output (udp) packet */ X@@ -234,7 +234,12 @@ X if (verbose >= 1) X fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n", X num_score, numhosts, numhosts==1 ? "" : "es"); X- X+ X+ if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0) { X+ perror("IP_HDRINCL"); X+ _exit(EXIT_FAILURE); X+ } X+ X /* keep going until most of the hosts have been finished */ X must_continue = numhosts; X while (must_continue && must_continue >= numhosts/2) X@@ -712,7 +717,7 @@ X ip->ip_off = 0; X ip->ip_hl = sizeof(*ip) >> 2; X ip->ip_p = IPPROTO_UDP; X- ip->ip_len = 0; /* kernel fills this in */ X+ ip->ip_len = sizeof(OPacket); X ip->ip_ttl = ttl; X ip->ip_v = IPVERSION; X ip->ip_id = htons(ident + seq); END-of-/usr/ports/net/netselect/files/patch-netselect.c exit --- netselect.sh ends here --- >Release-Note: >Audit-Trail: >Unformatted: