From owner-freebsd-net@FreeBSD.ORG Wed Jan 30 18:54:36 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9CBE385A for ; Wed, 30 Jan 2013 18:54:36 +0000 (UTC) (envelope-from nvass@gmx.com) Received: from mout.gmx.net (mout.gmx.net [74.208.4.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBDDEE5 for ; Wed, 30 Jan 2013 18:54:36 +0000 (UTC) Received: from mailout-us.gmx.com ([172.19.198.46]) by mrigmx.server.lan (mrigmxus002) with ESMTP (Nemesis) id 0MKqSy-1U0cnr3M7E-0002DX for ; Wed, 30 Jan 2013 19:54:35 +0100 Received: (qmail invoked by alias); 30 Jan 2013 18:54:35 -0000 Received: from 130.43.68.242.dsl.dyn.forthnet.gr (EHLO [192.168.1.66]) [130.43.68.242] by mail.gmx.com (mp-us006) with SMTP; 30 Jan 2013 13:54:35 -0500 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX1+LntZchmOLTnPrdqjog+TjofKX7SlccdwkYSf3YB wg8UqUbDiXYrR3 Message-ID: <51096C62.2060602@gmx.com> Date: Wed, 30 Jan 2013 20:54:26 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: net@freebsd.org Subject: Re: [PATCH] Allow tcpdrop to use non-space separators References: <201301291205.41301.jhb@freebsd.org> In-Reply-To: <201301291205.41301.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: John Baldwin X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 18:54:36 -0000 On 1/29/2013 7:05 PM, John Baldwin wrote: > A common use case I have at work is to find a busted connection using netstat > -n or sockstat and then want to tcpdrop it. However, tcpdrop requires spaces Hi, While you are there, could you please review this? http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/151996 It adds an interactive use flag(-i) so the user can drop connections interactively: > lab# tcpdrop -ia > drop 192.168.73.195 16456 195.167.100.39 80? > drop 192.168.73.195 37746 195.167.100.39 80? y > 192.168.73.195 37746 195.167.100.39 80: dropped > drop 192.168.73.195 41749 195.167.100.39 80? yes > 192.168.73.195 41749 195.167.100.39 80: dropped > drop 192.168.73.60 22 192.168.73.192 60763? > drop 192.168.73.60 22 192.168.73.192 60585? Thanks, Nikos