DLC Information on LLC_DIR_SET_MULTICAST_ADDRESS CommandLast reviewed: September 29, 1995Article ID: Q129022 |
The information in this article applies to:
SUMMARYThe 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 INFORMATIONThe following function demonstrates the command.
Sample CodeBOOL 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 DlcSetMulticastAddressBOOL 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |