Subject: Re: bpf write() to local host
To: None <tech-net@netbsd.org>
From: Christopher Richards <richards+netbsd@CS.Princeton.EDU>
List: tech-net
Date: 01/21/2003 13:50:45
On 21 Jan 2003 18:39:40 GMT, Joel Wilsson wrote:
> Would you like to do something like this?
> ifconfig en0 link 00:03:93:ce:11:32
>
> I think I can throw together a patch for ifconfig to enable that...
> but I seem to recall there already is a way to change the MAC
> address. Or maybe that was in some other BSD. I couldn't find
> anything about it in ifconfig.c either.
FreeBSD's ifconfig uses "lladdr" (from FreeBSD ifconfig.8):
lladdr addr
Set the link-level address on an interface. This can be used to
e.g. set a new MAC address on an ethernet interface, though the
mechanism used is not ethernet-specific. The address addr is
specified as a series of colon-separated hex digits. If the
interface is already up when this option is used, it will be
briefly brought down and then brought back up again in order to
ensure that the receive filter in the underlying ethernet hard-
ware is properly reprogrammed.
--
Chris