On Wed, Jan 03, 2024 at 08:35:41PM -0600, Nicholas Geovanis wrote:
> On Wed, Jan 3, 2024, 8:23 PM John Hasler <j...@sugarbit.com> wrote:
> 
> > The man page for /etc/ethers (a file) is in net-tools.  The file does
> > not exist on my Sid system.
> >
> > The man page:
> >
> >   NAME
> >        ethers - Ethernet address to IP number database
> >
> ....
> Isn't that file a somehow surviving BSD-ism?

According to <https://man.openbsd.org/ethers> it's used by the
ether_aton(3) and ether_ntoa(3) library calls.

Debian's (GNU's) libc *does* have those functions, or at least it has
a man page for them.

<https://manpages.debian.org/ether_ntoa> redirects to the current Debian
stable man page for these library functions.

What's not really stated anywhere is *why* these library functions
exist.  I don't see many practical application for a library function
that reads a text file full of MAC addresses and hostnames, looks up
one of them, and spits out the other half of the line it's on.  You'd
get more usefulness just doing "grep somename /etc/ethers".

The Debian ethers(5) page references arp(8), so one might conclude
that this file is intended to augment/prettify the output of "arp" so
that it contains hostnames in addition to (or instead of) MAC addresses.
But the main use of the "arp" command has always been to find out the MAC
address of a host whose IP address you already know (or can get from DNS),
but whose MAC address is not currently known.  So, if you've already got
a text file full of these MAC addresses, why would you even need to run
the arp command in the first place?

It just doesn't make sense to me.

Reply via email to