NTDEV : NDIS Is making me THINK

hi all,
I had a surprise that i would like to share with you all.I wrote a
Ndis miniport driver.I have found that in my Queryinformation handler I am
getting a OID_GEN_802_3_CURRENT_ADDRESS and OID_GEN_802_3_PERMANENT_ADDRESS
.I am returning a hardcoded value at this point.

Even if I do not return a right mac address on these calls I am able to
communicate through my driver.

Either there is some misunderstanding of these two OIDs on my part or
something really fishy is going.

Please help.

Ajitabh

Questions:

1.) When you return “incorrect” values to the queries, what MAC address does
the higher-level protocol pass down as the MAC address?
2.) In your miniport driver, do you overwrite the protocol-provided MAC
address with the hardcoded value before sending?
3.) When receiving, to you place the “correct” MAC address as the source
address before passing it up?

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - TDI Client - Windows 95 Redirector
http:

----- Original Message -----
From: Ajitabh Prakash
To: NT Developers Interest List
Sent: Saturday, February 26, 2000 1:18 AM
Subject: [ntdev] NTDEV : NDIS Is making me THINK

> hi all,
> I had a surprise that i would like to share with you all.I wrote a
> Ndis miniport driver.I have found that in my Queryinformation handler I am
> getting a OID_GEN_802_3_CURRENT_ADDRESS and
OID_GEN_802_3_PERMANENT_ADDRESS
> .I am returning a hardcoded value at this point.
>
> Even if I do not return a right mac address on these calls I am able to
> communicate through my driver.
>
> Either there is some misunderstanding of these two OIDs on my part or
> something really fishy is going.
>
> Please help.
>
> Ajitabh
></http:>

Thanks for the quick responce:
Answers :
1> i am getting the mac which i have passed to the upper layers (Hardcoded
mac).
2> I do not overwrite the Ip packet MAC both on the send or the receive
side.

ADDITIONAL INFORMATION:

The card for which i have written the driver is a PCMCIA card…that means
the card will allow HOT-SWAPPING.so the mac can change even after the
system boots up.But i cannot notify NDIS of this chnage in MAC so i will
get packets with the original mac address (Hardcoded MAC).It’s really
surprising to me hw it is working.

Any Clues ???
Thanks.

Ajitabh
-----Original Message-----
From: Thomas F. Divine [SMTP:xxxxx@pcausa.com]
Sent: Saturday, February 26, 2000 12:05 PM
To: NT Developers Interest List
Subject: [ntdev] Re: NTDEV : NDIS Is making me THINK

Questions:

1.) When you return “incorrect” values to the queries, what MAC address
does
the higher-level protocol pass down as the MAC address?
2.) In your miniport driver, do you overwrite the protocol-provided MAC
address with the hardcoded value before sending?
3.) When receiving, to you place the “correct” MAC address as the source
address before passing it up?

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - TDI Client - Windows 95 Redirector
http:

----- Original Message -----
From: Ajitabh Prakash
To: NT Developers Interest List
Sent: Saturday, February 26, 2000 1:18 AM
Subject: [ntdev] NTDEV : NDIS Is making me THINK

> hi all,
> I had a surprise that i would like to share with you all.I wrote
a
> Ndis miniport driver.I have found that in my Queryinformation handler I
am
> getting a OID_GEN_802_3_CURRENT_ADDRESS and
OID_GEN_802_3_PERMANENT_ADDRESS
> .I am returning a hardcoded value at this point.
>
> Even if I do not return a right mac address on these calls I am able to
> communicate through my driver.
>
> Either there is some misunderstanding of these two OIDs on my part or
> something really fishy is going.
>
> Please help.
>
> Ajitabh
>


You are currently subscribed to ntdev as: xxxxx@future.futsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</http:>

I guess I can understand part of the process.

The protocol takes whatever MAC address return from the query ans stashes it
away. It initializes the MAC source address with that value before it sends
a packet.

So, when you are given a packet to send you probably will see the MAC source
address as the query result.

You wrote the MAC driver, I guess. You apparently just send the packet with
whatever MAC source address that happens to be provided to you in the packet
(even if it’s bogus…).

What I can’t understand is how you ever receive anything…

If your MAC was operating in promiscuous mode, I guess it could work. You
would receive every packet - even packets that had the bogus MAC address.
The protocol would be happy!!! It sent a packet and received a packet both
with the same bogus MAC address. No problem.

If your adapter is not in promiscuous mode, then it is misbehaving. It is
allowing reception of a packet with a destination MAC address that doesn’t
match it’s “real” MAC address.

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - TDI Client - Windows 95 Redirector
http:

----- Original Message -----
From: Ajitabh Prakash
To: NT Developers Interest List
Sent: Saturday, February 26, 2000 2:57 AM
Subject: [ntdev] Re: NTDEV : NDIS Is making me THINK

> Thanks for the quick responce:
> Answers :
> 1> i am getting the mac which i have passed to the upper layers (Hardcoded
> mac).
> 2> I do not overwrite the Ip packet MAC both on the send or the receive
> side.
>
> ADDITIONAL INFORMATION:
>
> The card for which i have written the driver is a PCMCIA card…that means
> the card will allow HOT-SWAPPING.so the mac can change even after the
> system boots up.But i cannot notify NDIS of this chnage in MAC so i will
> get packets with the original mac address (Hardcoded MAC).It’s really
> surprising to me hw it is working.
>
> Any Clues ???
> Thanks.
>
> Ajitabh
> -----Original Message-----
> From: Thomas F. Divine [SMTP:xxxxx@pcausa.com]
> Sent: Saturday, February 26, 2000 12:05 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: NTDEV : NDIS Is making me THINK
>
> Questions:
>
> 1.) When you return “incorrect” values to the queries, what MAC address
> does
> the higher-level protocol pass down as the MAC address?
> 2.) In your miniport driver, do you overwrite the protocol-provided MAC
> address with the hardcoded value before sending?
> 3.) When receiving, to you place the “correct” MAC address as the source
> address before passing it up?
>
> Regards,
>
> Thomas F. Divine
>
> PCAUSA - Toolkits & Resources For Network Software Developers
> NDIS Protocol - TDI Client - Windows 95 Redirector
> http:
>
>
> ----- Original Message -----
> From: Ajitabh Prakash
> To: NT Developers Interest List
> Sent: Saturday, February 26, 2000 1:18 AM
> Subject: [ntdev] NTDEV : NDIS Is making me THINK
>
>
> > hi all,
> > I had a surprise that i would like to share with you all.I wrote
> a
> > Ndis miniport driver.I have found that in my Queryinformation handler I
> am
> > getting a OID_GEN_802_3_CURRENT_ADDRESS and
> OID_GEN_802_3_PERMANENT_ADDRESS
> > .I am returning a hardcoded value at this point.
> >
> > Even if I do not return a right mac address on these calls I am able to
> > communicate through my driver.
> >
> > Either there is some misunderstanding of these two OIDs on my part or
> > something really fishy is going.
> >
> > Please help.
> >
> > Ajitabh
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@future.futsoft.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
> —
> You are currently subscribed to ntdev as: xxxxx@pcausa.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
></http:></http:>

> > Answers :

> 1> i am getting the mac which i have passed to the upper
layers (Hardcoded
> mac).
> 2> I do not overwrite the Ip packet MAC both on the send or
the receive
> side.
>
> ADDITIONAL INFORMATION:
>
> The card for which i have written the driver is a PCMCIA
card…that means
> the card will allow HOT-SWAPPING.so the mac can change
even after the
> system boots up.But i cannot notify NDIS of this chnage in
MAC so i will
> get packets with the original mac address (Hardcoded
MAC).It’s really
> surprising to me hw it is working.

You wrote the MAC driver, I guess. You apparently just send
the packet with
whatever MAC source address that happens to be provided to
you in the packet
(even if it’s bogus…).

What I can’t understand is how you ever receive anything…

If your MAC was operating in promiscuous mode, I guess it
could work. You
would receive every packet - even packets that had the bogus
MAC address.
The protocol would be happy!!! It sent a packet and received
a packet both
with the same bogus MAC address. No problem.

If your adapter is not in promiscuous mode, then it is
misbehaving. It is
allowing reception of a packet with a destination MAC address
that doesn’t
match it’s “real” MAC address.

Any chance you programmed the NIC with the same wrong MAC address that
you’re feeding NDIS?? What MAC address are you returning to NDIS (and where
did it come from)??

I for one would love to see a packet trace of some basic comminucations
(basic PING with all ARPs).

Patrick Klos
Network Software Engineer
NuMega Lab / Compuware Corporation

Are you sure you are not inadvertently setting your station address to the
same as your hardcoded value, or that your controller is not inserting the
mac address you gave the upper edge as the SA on outgoing packets (for
example, the Intel part is capable of inserting the SA on transmitted
packets)? If you have access to a sniffer, take a look at outgoing and
incoming packets to see what mac address your link partners think you are
set to.

xxxxx@timesn.com

----- Original Message -----
From: “Ajitabh Prakash” <>
To: “NT Developers Interest List”
Sent: Saturday, February 26, 2000 12:18 AM
Subject: [ntdev] NTDEV : NDIS Is making me THINK

> hi all,
> I had a surprise that i would like to share with you all.I wrote a
> Ndis miniport driver.I have found that in my Queryinformation handler I am
> getting a OID_GEN_802_3_CURRENT_ADDRESS and
OID_GEN_802_3_PERMANENT_ADDRESS
> .I am returning a hardcoded value at this point.
>
> Even if I do not return a right mac address on these calls I am able to
> communicate through my driver.
>
> Either there is some misunderstanding of these two OIDs on my part or
> something really fishy is going.
>
> Please help.
>
> Ajitabh
>
> —
> You are currently subscribed to ntdev as: xxxxx@timesn.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>