Hi
WDK.NDis5x.MSpecificOOB {} is below
typedef struct _MEDIA_SPECIFIC_INFORMATION
{
UINT NextEntryOffset;
NDIS_CLASS_ID ClassId;
UINT Size;
UCHAR ClassInformation[1];
} MEDIA_SPECIFIC_INFORMATION, *PMEDIA_SPECIFIC_INFORMATION;
NextEntryOffset
Specifies the byte offset to this member in the next record, if any. Zero indicates this is the last record in the buffer; the values of all remaining members in the last record are also zero. The value of this member must be quad-aligned.
Size
Specifies the number of bytes in the ClassInformation array, including any padding necessary to align the NextEntryOffset of the next record on a four-byte boundary.
So I added my members to above OOB struct and made it quad(4byte) aligned like below
typedef struct _MY_MEDIA_SPECIFIC_INFORMATION
{
UINT NextEntryOffset; //4
NDIS_CLASS_ID ClassId; //4, 8
UINT Size; //4, 12
//my oob data below…
UINT Flags; //4, 16
PVOID Tag; //4(8), 20(24)
UINT8 LastZeroOOBEntry[12];
} MY_MEDIA_SPECIFIC_INFORMATION, *PMY_MEDIA_SPECIFIC_INFORMATION;
I set my Size (on x86) to 4+4+12 = 20 (making my ClassInformation and the whole OOB sturcut as well quad-aligned)
I set NextEntryOffset to zero as I have only 1 medaispecific OOB enetry (class_ID). My question is on the below verbatim about NextEntryOffset
Zero indicates this is the last record in the buffer; ***the values of all remaining members in the last record are also zero***. The value of this member must be quad-aligned.
I am not sure what values are being referred to here, so I assumed those are the the above struct prolog members? and hence added that LastZeroOOBEntry of 12 bytes to account that “the remaining memebrs in the last recorded are also zero”. Does above look right? I am just concerned how an intermediate/filter will chain my OOB if it has its own MSpecific OOB to add before handing it over to the miniport.
–thanks