DLC Information on LLC_DIR_SET_MULTICAST_ADDRESS Command

Last reviewed: September 29, 1995
Article ID: Q129022
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows NT versions 3.1 and 3.5

SUMMARY

The DLC programming interface for Windows NT supports Ethernet multicast addressing via the LLC_DIR_SET_MULTICAST_ADDRESS command. This command must be successfully issued before Ethernet multicasts can be received. This article shows by example how to use the command.

MORE INFORMATION

The following function demonstrates the command.

Sample Code

BOOL DlcSetMulticastAddress( BYTE bAdapter, BYTE *pbResult, BYTE *pbAddress )

{

    LLC_CCB Ccb;

    Ccb.uchAdapterNumber  = bAdapter;
    Ccb.uchDlcCommand     = LLC_DIR_SET_MULTICAST_ADDRESS;

    // note:  Dlc expects Ethernet addresses to be specified in the
    //        non-canonical form.  In other words, reverse the bits
    //        before passing an Ethernet address.
    //
    //        Also, the first byte of the canonical form of an
    //        Ethernet multicast address must be 0x01.

    Ccb.u.pParameterTable = (PLLC_PARMS) pbAddress;

    if(!DlcSyncCall( &Ccb ))
        return FALSE;
    else
    {
        *pbResult = Ccb.uchDlcStatus;
        return TRUE;
    }
}

// AcsLan wrapper function used by DlcSetMulticastAddress

BOOL DlcSyncCall( PLLC_CCB pCcb ) {
   BOOL  fResult = FALSE;
   DWORD dwResult;

   pCcb->hCompletionEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

   if (!pCcb->hCompletionEvent)
      return FALSE;

   int iStatus = (int) AcsLan( pCcb, NULL );
   if ( iStatus != ACSLAN_STATUS_COMMAND_ACCEPTED )
      goto done;

   dwResult = WaitForSingleObject( pCcb->hCompletionEvent, INFINITE );

   if ( dwResult == WAIT_OBJECT_0 )
      fResult = TRUE;

done:
   CloseHandle( pCcb->hCompletionEvent );

   return fResult;
}


Additional reference words: 3.10 3.50
KBCategory: kbnetwork kbnetwork kbcode
KBSubcategory: NtwkMisc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.