From owner-freebsd-net@FreeBSD.ORG Sat Dec 31 08:18:00 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C75ED106566B for ; Sat, 31 Dec 2011 08:18:00 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 60F8F8FC0A for ; Sat, 31 Dec 2011 08:18:00 +0000 (UTC) Received: by wgbds13 with SMTP id ds13so20210408wgb.1 for ; Sat, 31 Dec 2011 00:17:59 -0800 (PST) Received: by 10.227.197.77 with SMTP id ej13mr8003998wbb.25.1325319479235; Sat, 31 Dec 2011 00:17:59 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.208.210 with HTTP; Sat, 31 Dec 2011 00:17:38 -0800 (PST) In-Reply-To: References: From: Juli Mallett Date: Sat, 31 Dec 2011 00:17:38 -0800 X-Google-Sender-Auth: nSDODfRroLx9uZgtLXUJsXAmuMc Message-ID: To: Rajneesh Kumar Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: Modifying "arp" command X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 08:18:00 -0000 Hi Rajneesh, On Sat, Dec 31, 2011 at 00:12, Rajneesh Kumar wrote: > I want to modify the "arp" command in FreeBSD. Precisely I don't want it = to > display the time to expire for every entry. Which file should I edit? Wil= l > it be effective after kernel compilation and re-build? The arp command is part of userland, not the kernel. It is a utility which runs from user-space and can be run from any running system. Unless your file system is embedded in your kernel, you shouldn't need to rebuild your kernel. For arp, since it is in /usr/sbin, the source is in src/usr.sbin/arp. The file arp.c is the one you want to edit. So check our that directory, or go to it in your existing checkout, and edit arp.c. Run "make" to rebuild the arp binary. If you want to install it on your running system, do "make install" =E2=80=94 you have to do that as root, so use sudo or su first. You may want to send your changes to the list after you make them, as although this is a very simple change, it may be something the wider developer community would be interested, and could conceivably be committed. For example, if you added a new command line option to hide expiration times, or to make the output more machine-readable, or something of that sort, that might be of general utility. Good luck! Juli.