Index | Thread | Search

From:
enh <enh@google.com>
Subject:
Re: ether_ntoa(3): make the argument const
To:
Theo Buehler <tb@theobuehler.org>
Cc:
Philip Guenther <guenther@gmail.com>, David Gwynne <david@gwynne.id.au>, tech@openbsd.org
Date:
Mon, 23 Jun 2025 08:53:46 -0400

Download raw body.

Thread
(it's already const in bionic/glibc/musl, so this change should make
life easier for ported code, unless there's some #ifdef'ery to be
removed :-) )

On Mon, Jun 23, 2025 at 1:31 AM Theo Buehler <tb@theobuehler.org> wrote:
>
> On Sun, Jun 22, 2025 at 10:22:33PM -0700, Philip Guenther wrote:
> > On Sun, Jun 22, 2025 at 10:08 PM David Gwynne <david@gwynne.id.au> wrote:
> > >
> > > this drives me nuts when i want to print something out of what's already
> > > const. casting it works, but feels gross.
> > >
> > > i dont know what the abi/api version issues for this would be though.
> > >
> > > ok?
> >
> > No ABI issue and AFAICT the only API issue is for the function pointer
> > (char *(*)(struct ether_addr *) != char *(*)(const struct ether_addr
> > *)), not for direct calls.  Meh, I'm not concerned
>
> Agreed. According to my slightly outdated symbols database, the
> following ports use it. So it should be easy to check there's no
> breakage:
>
> shells/nsh,static
> shells/nsh
> net/dhcpdump
> net/openmdns
> net/onioncat
> security/ipguard
> security/dsniff
> security/dsniff,no_x11
> net/tcptrace
> net/mac-telnet
> net/libslirp (probably false positive)
>