Notifying new MAC to NDIS

Hi Folks,

I don’t know how silly is my question (I am new to all this, so can’t think
of but asking you guys)

I have a Gateway device (some proprietary network (let’s call it X Network)
to Ethernet) on our proprietary network.
This gate way device understands Ethernet over X type of network.
On the host side also I have a stack for X type of network.

So this gate way device assigns me the MAC each time I connect to it and I
indicate this MAC to NDIS in response to it’s OID queries.
When I connect to the device in MiniportInitialize then everything is fine,
I get the MAC from target device and is inidicated to NDIS when it reqests
the OID.

But if target gateway device is not reachable (suppose is cable is removed
for a while) and my device is initializing, I don’t connect to the target
device and defer
the procedure until I get a callback from X network stack.
Since MiniportInitialize has been returned, NDIS asks me for current MAC and
I return some fake MAC to it.
But When My callback get called notifying me that target gate way device is
available now, I communicate to it and get a new MAC address from gate way
device.

Now I want to communicate this new MAC to NDIS.

Regards
Deepak

Your principal ?driver? object (the one that represents the connected
resources on your gateway) should then be a WDM device that *enumerates* the
(virtual) miniport PDO when the gateway device is good and ready to provide
services (and a MAC address).

NDIS does not allow you to ?communicate? a new MAC address to an existing
NIC (virtual or otherwise). You need to stop and start the NIC (at the very
least). From driver-land, the simplest solution is probably the child
device approach.

It is possible to build a ?layered miniport? (sort of like half an IM
driver) and start and stop the miniport edge but this may be more trouble
than it is worth if your device inherently has hardware beneath it and
enumerates in the PnP stack already.

Good Luck,

Dave Cattley

Consulting Engineer

Systems Software Development

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Deepak Gupta
Sent: Tuesday, December 16, 2008 1:11 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Notifying new MAC to NDIS

Hi Folks,

I don’t know how silly is my question (I am new to all this, so can’t think
of but asking you guys)

I have a Gateway device (some proprietary network (let’s call it X Network)
to Ethernet) on our proprietary network.
This gate way device understands Ethernet over X type of network.
On the host side also I have a stack for X type of network.

So this gate way device assigns me the MAC each time I connect to it and I
indicate this MAC to NDIS in response to it’s OID queries.
When I connect to the device in MiniportInitialize then everything is fine,
I get the MAC from target device and is inidicated to NDIS when it reqests
the OID.

But if target gateway device is not reachable (suppose is cable is removed
for a while) and my device is initializing, I don’t connect to the target
device and defer
the procedure until I get a callback from X network stack.
Since MiniportInitialize has been returned, NDIS asks me for current MAC and
I return some fake MAC to it.
But When My callback get called notifying me that target gate way device is
available now, I communicate to it and get a new MAC address from gate way
device.

Now I want to communicate this new MAC to NDIS.

Regards
Deepak
— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

You are correct, I guess I will have to bug the team which deals with lower
stack X network stack.
Thanks for your input.

Regards
Deepak

On Wed, Dec 17, 2008 at 1:07 AM, David R. Cattley wrote:

> Your principal ‘driver’ object (the one that represents the connected
> resources on your gateway) should then be a WDM device that enumerates
> the (virtual) miniport PDO when the gateway device is good and ready to
> provide services (and a MAC address).
>
>
>
> NDIS does not allow you to ‘communicate’ a new MAC address to an existing
> NIC (virtual or otherwise). You need to stop and start the NIC (at the very
> least). From driver-land, the simplest solution is probably the child
> device approach.
>
>
>
> It is possible to build a ‘layered miniport’ (sort of like half an IM
> driver) and start and stop the miniport edge but this may be more trouble
> than it is worth if your device inherently has hardware beneath it and
> enumerates in the PnP stack already.
>
>
>
> Good Luck,
>
> Dave Cattley
>
> Consulting Engineer
>
> Systems Software Development
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Deepak Gupta
> Sent: Tuesday, December 16, 2008 1:11 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Notifying new MAC to NDIS
>
>
>
> Hi Folks,
>
> I don’t know how silly is my question (I am new to all this, so can’t think
> of but asking you guys)
>
> I have a Gateway device (some proprietary network (let’s call it X Network)
> to Ethernet) on our proprietary network.
> This gate way device understands Ethernet over X type of network.
> On the host side also I have a stack for X type of network.
>
> So this gate way device assigns me the MAC each time I connect to it and I
> indicate this MAC to NDIS in response to it’s OID queries.
> When I connect to the device in MiniportInitialize then everything is fine,
> I get the MAC from target device and is inidicated to NDIS when it reqests
> the OID.
>
> But if target gateway device is not reachable (suppose is cable is removed
> for a while) and my device is initializing, I don’t connect to the target
> device and defer
> the procedure until I get a callback from X network stack.
> Since MiniportInitialize has been returned, NDIS asks me for current MAC
> and I return some fake MAC to it.
> But When My callback get called notifying me that target gate way device is
> available now, I communicate to it and get a new MAC address from gate way
> device.
>
> Now I want to communicate this new MAC to NDIS.
>
> Regards
> Deepak
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>