Hi,
A key describe by the NDIS_802_11_KEY structure as defined as
follows:

typedef struct _NDIS_802_11_KEY
{
ULONG Length;
ULONG KeyIndex;
ULONG KeyLength;
NDIS_802_11_MAC_ADDRESS BSSID;
NDIS_802_11_KEY_RSC KeyRSC;
UCHAR KeyMaterial[1];
} NDIS_802_11_KEY, *PNDIS_802_11_KEY;

Notes: the member Length is sepcifies the length of the NDIS_802_11_KEY
structure in bytes.

When testing the HCT 12.0, the SetInformation of the OID_802_11_ADD_KEY
indicate the
InformationBufferLength was 104 bytes which meant the size of the
NDIS_802_11_KEY
structure was 104 bytes, but the member Length of the NDIS_802_11KEY
structure
was 72 (0x48) bytes. Why?

Thanks for the help.

Re: OID_802_11_ADD_KEY failed on HCT 12.0 by Michael

Michael
Wed Oct 13 03:43:32 CDT 2004

Paul,
I read carefully, due myself is working on the same driver.
But!!!

1. I don't find the OID and structure, that you named!
Probably you mean OID_802_11_ADD_WEP and NDIS_802_11_WEP structure ? ;)

2. Try OidScope.exe utility from
http://www.pcausa.com/Utilities/ndistools.htm

Regards,
Michael.

"Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
> Hi,
> A key describe by the NDIS_802_11_KEY structure as defined as
> follows:
>
> typedef struct _NDIS_802_11_KEY
> {
> ULONG Length;
> ULONG KeyIndex;
> ULONG KeyLength;
> NDIS_802_11_MAC_ADDRESS BSSID;
> NDIS_802_11_KEY_RSC KeyRSC;
> UCHAR KeyMaterial[1];
> } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
>
> Notes: the member Length is sepcifies the length of the
NDIS_802_11_KEY
> structure in bytes.
>
> When testing the HCT 12.0, the SetInformation of the
OID_802_11_ADD_KEY
> indicate the
> InformationBufferLength was 104 bytes which meant the size of the
> NDIS_802_11_KEY
> structure was 104 bytes, but the member Length of the NDIS_802_11KEY
> structure
> was 72 (0x48) bytes. Why?
>
> Thanks for the help.
>
>
>
>
>



Re: OID_802_11_ADD_KEY failed on HCT 12.0 by Paul

Paul
Wed Oct 13 07:01:47 CDT 2004

Michael,
OID_802_11_ADD_KEY is for WPA driver.
you can download the document from
http://www.microsoft.com/taiwan/whdc/hwdev/tech/network/802x/80211_netadapt.
mspx
"IEEE 802.11 Network Adapter Design Guidelines for Windows XP"

When building a WPA driver that supports WLAN and WPA OIDs, include the
ntddndis.h header file. When building a user-mode application that uses WMI
to query the WPA driver, include the ndisguid.h file.

BR,
Paul.

> Paul,
> I read carefully, due myself is working on the same driver.
> But!!!
>
> 1. I don't find the OID and structure, that you named!
> Probably you mean OID_802_11_ADD_WEP and NDIS_802_11_WEP structure ? ;)
>
> 2. Try OidScope.exe utility from
> http://www.pcausa.com/Utilities/ndistools.htm
>
> Regards,
> Michael.
>
> "Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
> news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
> > Hi,
> > A key describe by the NDIS_802_11_KEY structure as defined as
> > follows:
> >
> > typedef struct _NDIS_802_11_KEY
> > {
> > ULONG Length;
> > ULONG KeyIndex;
> > ULONG KeyLength;
> > NDIS_802_11_MAC_ADDRESS BSSID;
> > NDIS_802_11_KEY_RSC KeyRSC;
> > UCHAR KeyMaterial[1];
> > } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
> >
> > Notes: the member Length is sepcifies the length of the
> NDIS_802_11_KEY
> > structure in bytes.
> >
> > When testing the HCT 12.0, the SetInformation of the
> OID_802_11_ADD_KEY
> > indicate the
> > InformationBufferLength was 104 bytes which meant the size of the
> > NDIS_802_11_KEY
> > structure was 104 bytes, but the member Length of the
NDIS_802_11KEY
> > structure
> > was 72 (0x48) bytes. Why?
> >
> > Thanks for the help.
> >
> >
> >
> >
> >
>
>



Re: OID_802_11_ADD_KEY failed on HCT 12.0 by David

David
Wed Oct 13 12:38:39 CDT 2004

Do you know which test and test case you where running in HCT 12 when you
seen this issue. If possible could you post the log file?

--
David Harding
This posting is provided "AS IS" with no warranties, and confers no rights.

"Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
> Hi,
> A key describe by the NDIS_802_11_KEY structure as defined as
> follows:
>
> typedef struct _NDIS_802_11_KEY
> {
> ULONG Length;
> ULONG KeyIndex;
> ULONG KeyLength;
> NDIS_802_11_MAC_ADDRESS BSSID;
> NDIS_802_11_KEY_RSC KeyRSC;
> UCHAR KeyMaterial[1];
> } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
>
> Notes: the member Length is sepcifies the length of the
> NDIS_802_11_KEY
> structure in bytes.
>
> When testing the HCT 12.0, the SetInformation of the OID_802_11_ADD_KEY
> indicate the
> InformationBufferLength was 104 bytes which meant the size of the
> NDIS_802_11_KEY
> structure was 104 bytes, but the member Length of the NDIS_802_11KEY
> structure
> was 72 (0x48) bytes. Why?
>
> Thanks for the help.
>
>
>
>
>



Re: OID_802_11_ADD_KEY failed on HCT 12.0 by Michael

Michael
Wed Oct 13 11:57:46 CDT 2004

Paul,
oppa and thanks!

In spite of I have a problem with Chinese, I downloaded it. :)

Now question for you, Paul.
Does HCT 12.0 obligate WPA testing, or it may be passed?
I'm comming for HCT soon... :(
You may write on my privet mail directly, to stop flood in your subject...

One note for You, Paul.
Problem, that you described probably the HCT bug due test for WPA is new-new
and comes from 12.0 version only.
Call Microsoft support with bug report!

Regards,
Michael.


"Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
news:%23DrMkvRsEHA.2252@TK2MSFTNGP11.phx.gbl...
> Michael,
> OID_802_11_ADD_KEY is for WPA driver.
> you can download the document from
>
http://www.microsoft.com/taiwan/whdc/hwdev/tech/network/802x/80211_netadapt.
> mspx
> "IEEE 802.11 Network Adapter Design Guidelines for Windows XP"
>
> When building a WPA driver that supports WLAN and WPA OIDs, include the
> ntddndis.h header file. When building a user-mode application that uses
WMI
> to query the WPA driver, include the ndisguid.h file.
>
> BR,
> Paul.
>
> > Paul,
> > I read carefully, due myself is working on the same driver.
> > But!!!
> >
> > 1. I don't find the OID and structure, that you named!
> > Probably you mean OID_802_11_ADD_WEP and NDIS_802_11_WEP structure ? ;)
> >
> > 2. Try OidScope.exe utility from
> > http://www.pcausa.com/Utilities/ndistools.htm
> >
> > Regards,
> > Michael.
> >
> > "Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
> > news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > A key describe by the NDIS_802_11_KEY structure as defined as
> > > follows:
> > >
> > > typedef struct _NDIS_802_11_KEY
> > > {
> > > ULONG Length;
> > > ULONG KeyIndex;
> > > ULONG KeyLength;
> > > NDIS_802_11_MAC_ADDRESS BSSID;
> > > NDIS_802_11_KEY_RSC KeyRSC;
> > > UCHAR KeyMaterial[1];
> > > } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
> > >
> > > Notes: the member Length is sepcifies the length of the
> > NDIS_802_11_KEY
> > > structure in bytes.
> > >
> > > When testing the HCT 12.0, the SetInformation of the
> > OID_802_11_ADD_KEY
> > > indicate the
> > > InformationBufferLength was 104 bytes which meant the size of the
> > > NDIS_802_11_KEY
> > > structure was 104 bytes, but the member Length of the
> NDIS_802_11KEY
> > > structure
> > > was 72 (0x48) bytes. Why?
> > >
> > > Thanks for the help.
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>



RE: OID_802_11_ADD_KEY failed on HCT 12.0 by pavel_a

pavel_a
Wed Oct 13 13:37:09 CDT 2004

"Paul Simon" wrote:
> When testing the HCT 12.0, the SetInformation of the OID_802_11_ADD_KEY
> indicate the
> InformationBufferLength was 104 bytes which meant the size of the
> NDIS_802_11_KEY
> structure was 104 bytes, but the member Length of the NDIS_802_11KEY
> structure
> was 72 (0x48) bytes. Why?

Because this struct contains an "open" array:
UCHAR KeyMaterial[1];

The actual size of KeyMaterial can vary, and will be set in the length field.

--PA

Re: OID_802_11_ADD_KEY failed on HCT 12.0 by Paul

Paul
Wed Oct 13 21:49:19 CDT 2004

Ok, here is the log messages.

On test case 2c_wpa_adhoc
Variation #5 Verify directed send\recv in IBSS mode
This test will create and join an IBSS and verify directed packets can be
sent and received
NdisRequest
- OpenId = 0x02010001
- OID = OID_802_11_ADD_KEY
-------------------- NDIS_802_11_KEY --------------------
Length 72
KeyIndex 0x00000000
KeyLength 0
KeyMaterial:
BSSID: 00-00-00-00-00-00
Set OID_802_11_ADD_KEY failed (STATUS: NDIS_STATUS_INVALID_LENGTH)
vbCreateIBSS() failed (STATUS: NDIS_STATUS_INVALID_LENGTH)
FAILED: [88888] Failed to create IBSS cell

and I print the NDIS_802_11_KEY structure's raw data from our driver as
follows:
OID = 0x0D01011D
Buffer Size = 104
BytesWritten = 21757952
BytesNeeded = 21757952
Set:: OID_802_11_ADD_KEY [InformationBufferLength=104, pKey->Length=72]
48 00 00 00 03 00 00 80 20 00 00 00 FF FF FF FF
FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 23 45 67 89 01 23 45 67 89 01 23 45 67 89 01
23 45 67 89 01 23 45 67 89 01 23 45 67 89 01 23
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00

by the way, I have email this issue to whqlnet@microsoft.com.


"David Harding [MSFT]" <davhar@online.microsoft.com> wrote in message
> Do you know which test and test case you where running in HCT 12 when you
> seen this issue. If possible could you post the log file?
>
> --
> David Harding
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
> news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
> > Hi,
> > A key describe by the NDIS_802_11_KEY structure as defined as
> > follows:
> >
> > typedef struct _NDIS_802_11_KEY
> > {
> > ULONG Length;
> > ULONG KeyIndex;
> > ULONG KeyLength;
> > NDIS_802_11_MAC_ADDRESS BSSID;
> > NDIS_802_11_KEY_RSC KeyRSC;
> > UCHAR KeyMaterial[1];
> > } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
> >
> > Notes: the member Length is sepcifies the length of the
> > NDIS_802_11_KEY
> > structure in bytes.
> >
> > When testing the HCT 12.0, the SetInformation of the
OID_802_11_ADD_KEY
> > indicate the
> > InformationBufferLength was 104 bytes which meant the size of the
> > NDIS_802_11_KEY
> > structure was 104 bytes, but the member Length of the NDIS_802_11KEY
> > structure
> > was 72 (0x48) bytes. Why?
> >
> > Thanks for the help.
> >
> >
> >
> >
> >
>
>



Re: OID_802_11_ADD_KEY failed on HCT 12.0 by Thomas

Thomas
Wed Oct 13 22:47:21 CDT 2004


"Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
news:uYwDjfZsEHA.3604@TK2MSFTNGP15.phx.gbl...
> Ok, here is the log messages.
>
> On test case 2c_wpa_adhoc
> Variation #5 Verify directed send\recv in IBSS mode
> This test will create and join an IBSS and verify directed packets can be
> sent and received
> NdisRequest
> - OpenId = 0x02010001
> - OID = OID_802_11_ADD_KEY
> -------------------- NDIS_802_11_KEY --------------------
> Length 72
> KeyIndex 0x00000000
> KeyLength 0
> KeyMaterial:
> BSSID: 00-00-00-00-00-00
> Set OID_802_11_ADD_KEY failed (STATUS: NDIS_STATUS_INVALID_LENGTH)
> vbCreateIBSS() failed (STATUS: NDIS_STATUS_INVALID_LENGTH)
> FAILED: [88888] Failed to create IBSS cell
>
> and I print the NDIS_802_11_KEY structure's raw data from our driver as
> follows:
> OID = 0x0D01011D
> Buffer Size = 104
> BytesWritten = 21757952
> BytesNeeded = 21757952
> Set:: OID_802_11_ADD_KEY [InformationBufferLength=104, pKey->Length=72]
> 48 00 00 00 03 00 00 80 20 00 00 00 FF FF FF FF
> FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 01 23 45 67 89 01 23 45 67 89 01 23 45 67 89 01
> 23 45 67 89 01 23 45 67 89 01 23 45 67 89 01 23
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00
>

Paul,

It looks like the length of your information buffer are strange. Here is an
example dump of WZC making a successful call to add a key:

Oid : OID_802_11_ADD_KEY(0x0D01011D) - Set Information
Status: NDIS_STATUS_SUCCESS (0x00000000)
IB Len: 64; Needed: 0; W/R: 64
Information( 64 Bytes):
000000: 40 00 00 00 00 00 00 E0 : 20 00 00 00 00 0C 41 D7 @.......
.....A.
000010: E1 ED 00 00 00 00 00 00 : 00 00 00 00 00 00 00 00
................
000020: 12 1B 7C 45 5C 7B C0 54 : CF 67 8C A3 A9 82 9A E9
..|E\{.T.g......
000030: D3 32 EA 00 DB 56 EF 5A : FC 74 6A 91 65 85 B8 55
.2...V.Z.tj.e..U

There aren't 40 trailing zero bytes after the key material.

This could be a structure packing/alignment problem.

Good luck,

Thomas F. Divine, Windows DDK MVP
http://www.rawether.net
http://www.ndis.com



> by the way, I have email this issue to whqlnet@microsoft.com.
>
>
> "David Harding [MSFT]" <davhar@online.microsoft.com> wrote in message
>> Do you know which test and test case you where running in HCT 12 when you
>> seen this issue. If possible could you post the log file?
>>
>> --
>> David Harding
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>> "Paul Simon" <paul_paochen@hotmail.nospam.com> wrote in message
>> news:O6RcZEPsEHA.2316@TK2MSFTNGP12.phx.gbl...
>> > Hi,
>> > A key describe by the NDIS_802_11_KEY structure as defined as
>> > follows:
>> >
>> > typedef struct _NDIS_802_11_KEY
>> > {
>> > ULONG Length;
>> > ULONG KeyIndex;
>> > ULONG KeyLength;
>> > NDIS_802_11_MAC_ADDRESS BSSID;
>> > NDIS_802_11_KEY_RSC KeyRSC;
>> > UCHAR KeyMaterial[1];
>> > } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
>> >
>> > Notes: the member Length is sepcifies the length of the
>> > NDIS_802_11_KEY
>> > structure in bytes.
>> >
>> > When testing the HCT 12.0, the SetInformation of the
> OID_802_11_ADD_KEY
>> > indicate the
>> > InformationBufferLength was 104 bytes which meant the size of the
>> > NDIS_802_11_KEY
>> > structure was 104 bytes, but the member Length of the
>> > NDIS_802_11KEY
>> > structure
>> > was 72 (0x48) bytes. Why?
>> >
>> > Thanks for the help.
>> >
>> >
>> >
>> >
>> >
>>
>>
>
>