Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Why multicast address failed on miniport driver ?

vinay_kpvinay_kp Member Posts: 182
I am trying to pass multicast address HLK test on my miniport driver . I didn't get why this error failed during this test case .

The HLK log is giving clue like this :
------------------------------------------------------------------
Add/Delete a multicast address multiple times - 0
---------------------------------------
ClOpen::AddMulticastAddress
Add address 01-02-03-04-05-06 to the multicast list on the Test open
NdisRequest for OID_802_3_MULTICAST_LIST of type SetInformation failed with status = NDIS_STATUS_MULTICAST_FULL
ClOpen::AddMulticastAddress: Adding Multicast address failed on the Device Test open Message: NDIS_STATUS_MULTICAST_FULL length 6
50008 AddMulticastAddress failed with status

Query Multicast address list to validate that Add was successfull.

Delete Multicast Address.
ClOpen::RemoveMulticastAddress
Remove address 01-02-03-04-05-06 to the multicast list on the Test open
NdisRequest for OID_802_3_MULTICAST_LIST of type SetInformation failed with status = NDIS_STATUS_MULTICAST_FULL
ClOpen::RemoveMulticastAddress: Removing Multicast address failed on the Device Test open Message: NDIS_STATUS_MULTICAST_FULL length 6
50008 RemoveMulticastAddress failed with status


Query Multicast address list to validate that Delete was successfull.
50013 Multicast list should be empty

----------------------------------------------------------------------------

This is my set & query implementation of OID_802_3_MULTICAST_LIST on miniport driver :



case OID_802_3_MAXIMUM_LIST_SIZE:
Information = &m_ulMaximumListSize; //m_ulMaximumListSize = 32
InformationLength = sizeof(m_ulMaximumListSize);
break;

for query :
-----------------

case OID_802_3_MULTICAST_LIST:
status = NDIS_STATUS_NOT_SUPPORTED;
break;

for set request :
------------------
case OID_802_3_MULTICAST_LIST:
if ((OidRequest->DATA.SET_INFORMATION.InformationBufferLength % 6 ) != 0) {
OidRequest->DATA.SET_INFORMATION.BytesNeeded = 0;
OidRequest->DATA.SET_INFORMATION.BytesRead = 0;
status = NDIS_STATUS_INVALID_LENGTH;
}
else{
status = NDIS_STATUS_MULTICAST_FULL;
}
break;

case OID_802_3_ADD_MULTICAST_ADDRESS:
case OID_802_3_DELETE_MULTICAST_ADDRESS:
OidRequest->DATA.SET_INFORMATION.BytesNeeded = 0;
status = NDIS_STATUS_NOT_SUPPORTED;
break;


Any suggestions ? Anything missing in code ?
Thanks

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,450
    [email protected].com wrote:
    > I am trying to pass multicast address HLK test on my miniport driver . I didn't get why this error failed during this test case .

    I don't understand how you can be confused:


    > case OID_802_3_MULTICAST_LIST:
    > if ((OidRequest->DATA.SET_INFORMATION.InformationBufferLength % 6 ) != 0) {
    > OidRequest->DATA.SET_INFORMATION.BytesNeeded = 0;
    > OidRequest->DATA.SET_INFORMATION.BytesRead = 0;
    > status = NDIS_STATUS_INVALID_LENGTH;
    > }
    > else{
    > status = NDIS_STATUS_MULTICAST_FULL;
    > }
    > break;

    If the request is not a multiple of 6, you return INVALID_LENGTH. If it
    is a multiple of 6, as the log said, you return MULTICAST_FULL. There
    is no success path here.

    Are you trying to support multicast, or are you trying NOT to support
    multicast?

    --
    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • vinay_kpvinay_kp Member Posts: 182
    Yeah correct . But after i handled this case also , i am facing same error :

    This is implementation :

    ==================================================

    m_ulMaximumListSize = 32 //maximum multicast list , mac address length = 6

    switch (OidRequest->DATA.SET_INFORMATION.Oid) {

    case OID_802_3_MULTICAST_LIST:

    OidRequest->DATA.SET_INFORMATION.BytesNeeded = 6;
    OidRequest->DATA.SET_INFORMATION.BytesRead = OidRequest->DATA.SET_INFORMATION.InformationBufferLength ;

    do{
    if(OidRequest->DATA.SET_INFORMATION.InformationBufferLength % 6){
    status = NDIS_STATUS_INVALID_LENGTH;
    break;
    }
    if(OidRequest->DATA.SET_INFORMATION.InformationBufferLength > (m_ulMaximumListSize *6)){
    status = NDIS_STATUS_MULTICAST_FULL;
    OidRequest->DATA.SET_INFORMATION.BytesNeeded = m_ulMaximumListSize *6;
    break;
    }
    //setting multicast address list
    NdisZeroMemory(m_ulMcList,m_ulMaximumListSize *6);
    NdisMoveMemory(m_ulMcList,OidRequest->DATA.SET_INFORMATION.InformationBuffer,OidRequest->DATA.SET_INFORMATION.InformationBufferLength);
    m_ulMclistSize = OidRequest->DATA.SET_INFORMATION.InformationBufferLength/6;

    }while(FALSE);

    ===================================================


    Still same error :

    ClOpen::AddMulticastAddress Add address 01-02-03-04-05-06 to the multicast list on the Test open NdisRequest for OID_802_3_MULTICAST_LIST of type SetInformation failed with status = NDIS_STATUS_MULTICAST_FULL ClOpen::AddMulticastAddress: Adding Multicast address failed on the Device Test open Message: NDIS_STATUS_MULTICAST_FULL length 6 50008 AddMulticastAddress failed with status Query Multicast address list to validate that Add was successful.

    Any suggestions ? I think my implementation is correct for OID_802_3_MULTICAST_LIST .
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA