Modifying "arp" command

Juli Mallett jmallett at FreeBSD.org
Sat Dec 31 08:18:00 UTC 2011


Hi Rajneesh,

On Sat, Dec 31, 2011 at 00:12, Rajneesh Kumar <iwc2010005 at gmail.com> 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? Will
> 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" — 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.


More information about the freebsd-net mailing list