Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jul 2000 16:24:32 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        net@FreeBSD.org
Subject:   Patches to ifconfig(8) to allow 'ether' to set ethernet addresses
Message-ID:  <39651530.2E0E0F8@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hey all,

I've patched the ifconfig(8) utility to add in enough of the backend
to the fake ether address "family" to allow setting addresses via the
"ether" keyword.  IOW, you can now do:

ifconfig fxp0 ether <mumble>

Nothing else has been changed as far as the user interface.  I did
change the address family of the 'ether' address to AF_LINK, and
just special cased the opening of the socket to fallback to AF_INET
if the family it was trying to open was AF_INET.  This also allowed
several extra checks in addition to address family checking in the
status output to be gotten rid of since the fake address "families"
don't conflict with inet anymore.  The patch can be found at
http://people.FreeBSD.org/~jhb/patches/ether.patch.

Also, as a side note, ifconfig -l <address family> is broken.  It
only seems to work for the 'ether' family for some reason.  Every
other address family lists all the interfaces.  The problem seems
to be that the sysctl() call isn't actually limiting the list it
returns by the address family.  For example, I have no IPX interfaces
configured on my current box, yet:

> ifconfig -a | grep -i ipx
> ifconfig -l ipx
fxp0 lo0 gif0 gif1 gif2 gif3 stf0 faith0

--

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39651530.2E0E0F8>