Subject: Re: setting ethernet interface hardware address?
To: Kyunghwan KIM <>
From: Jason R Thorpe <>
List: tech-net
Date: 10/16/2001 21:26:10
On Wed, Oct 17, 2001 at 01:02:38PM +0900, Kyunghwan KIM wrote:

 > On Tue, Oct 16, 2001 at 06:29:06PM -0500, Alfred Perlstein wrote:
 > > Most likely I would be porting the FreeBSD system which is the
 > > SIOCLLADDR interface.  If there's something particularly gross
 > > about it please speak up as soon as possible.
 > SIOCGIFLLADDR exactly. :)

SIOCGIFLLADDR is not the correct way to do this.

SIOCSIFADDR *would* have been fine if the ifreq were large enough to
hold a sockaddr_dl with an Ethernet address, etc.  But it's not,
so the appropriate thing to do is to have an SIOCSIFADDR equivalent
that uses an ifreq-like structure that has a sockaddr_storage (or
a pointer to another sockaddr structure in userland and a "len"

In fact, the SIOCALIFADDR ioctl is close .. but we don't want "add"
semantics, we want "set" semantics -- so we'd want to have an
SIOCSLIFADDR ioctl that used the same arg structure.

        -- Jason R. Thorpe <>