Setting MAC address of miniport NDIS driver

Hi,

I’m attempting to set the MAC address of my miniport NDIS driver from
user-mode. I have successfully sent down the new address to the driver and
from user-mode I ask the driver to simulate a disconnect and reconnect from
the network. This causes OID_802_3_CURRENT_ADDRESS to be sent to the driver
and to which I respond with the new MAC address. However, this does not
appear to change the network adapter’s address.

I suspect one of the reasons is that OID_802_3_PERMANENT_ADDRESS, which was
sent when the driver was installed, still points to the old MAC address.

I’m wondering how I can change the MAC address without having to use the
registry approach, I see in use on Google.

Thanks!

IIRC NDIS does not allow any MAC address changes without the full
start/stop cycle for a device. The MAC address is queried very early by NDIS
itself, and stored inside NDIS.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Søren Dreijer”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Monday, February 20, 2006 12:44 AM
Subject: [ntdev] Setting MAC address of miniport NDIS driver

> Hi,
>
> I’m attempting to set the MAC address of my miniport NDIS driver from
> user-mode. I have successfully sent down the new address to the driver and
> from user-mode I ask the driver to simulate a disconnect and reconnect from
> the network. This causes OID_802_3_CURRENT_ADDRESS to be sent to the driver
> and to which I respond with the new MAC address. However, this does not
> appear to change the network adapter’s address.
>
> I suspect one of the reasons is that OID_802_3_PERMANENT_ADDRESS, which was
> sent when the driver was installed, still points to the old MAC address.
>
> I’m wondering how I can change the MAC address without having to use the
> registry approach, I see in use on Google.
>
> Thanks!
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Oh, so what do you recommend I do? I wish to do this programmatically.

Thanks,

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> IIRC NDIS does not allow any MAC address changes without the full
> start/stop cycle for a device. The MAC address is queried very early by
NDIS
> itself, and stored inside NDIS.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Søren Dreijer”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Monday, February 20, 2006 12:44 AM
> Subject: [ntdev] Setting MAC address of miniport NDIS driver
>
>
> > Hi,
> >
> > I’m attempting to set the MAC address of my miniport NDIS driver from
> > user-mode. I have successfully sent down the new address to the driver
and
> > from user-mode I ask the driver to simulate a disconnect and reconnect
from
> > the network. This causes OID_802_3_CURRENT_ADDRESS to be sent to the
driver
> > and to which I respond with the new MAC address. However, this does not
> > appear to change the network adapter’s address.
> >
> > I suspect one of the reasons is that OID_802_3_PERMANENT_ADDRESS, which
was
> > sent when the driver was installed, still points to the old MAC address.
> >
> > I’m wondering how I can change the MAC address without having to use the
> > registry approach, I see in use on Google.
> >
> > Thanks!
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>