Subject: Re: Changing MAC addresses?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Matt Thomas <email@example.com>
Date: 06/17/2000 13:30:52
At 12:36 PM 6/15/2000 -0400, der Mouse wrote:
>The system in question is an AlphaPC 164LX 533, with a 21140A-based de0
>and a 3c905B-based ex0 (according to dmesg - full messages below).
>I wish to cause one or both of those to run with a different MAC
>address than its default. (More specifically, I want the machine to
>use the same MAC address on some subset of its interfaces.) I'm
>prepared to hack drivers as necessary...BUT...dev/pci/if_de.c is a maze
>of twisty little function pointers, all different, and I'm not even
>sure I've *found* the relevant driver files for the ex; it appears to
>be scattered over at least three directories. So what I'm looking for
>is someone who knows those drivers enough to give me an initial hand
>up, finding the appropriate place to wade in with a machete...anyone
>willing and able?
I've thought of adding an ioctl to do this. SIOCSIFADDR is too small
to contain a struct sockaddr_dl but you could get by with a struct
sockaddr and assume sa_data contains the data. The tricky part of
doing this is that you need to send out arp's or other packets to tell
hosts you've datalink datalink has changed.
If you are interested I can add the framework easily, but changing all
the drivers will be a pain. The de/tlp drivers are easy. Just pretend
the multicast filter changed.
I need such a mechanism for my Phase IV stack but I've had other things
to hack on that are more interesting.
Matt Thomas Internet: firstname.lastname@example.org
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message