/*++


*****************************************************************************
*                                                                           *
*  This software contains proprietary and confidential information of       *
*                                                                           *
*                    Digi International Inc.                                *
*                                                                           *
*  By accepting transfer of this copy, Recipient agrees to retain this      *
*  software in confidence, to prevent disclosure to others, and to make     *
*  no use of this software other than that for which it was delivered.      *
*  This is an unpublished copyrighted work of Digi International Inc.       *
*  Except as permitted by federal law, 17 USC 117, copying is strictly      *
*  prohibited.                                                              *
*                                                                           *
*****************************************************************************

Module Name:

   setquery.c

Abstract:


Revision History:

   $Log: /Components/Windows/NT/Sync/Wan/SETQUERY.C $
 * 
 * 5     4/28/97 1:55p Mikez
 * Updated to use DsApi library.  Uses IoBuildDeviceIoControlRequest to
 * alloc Irps causing two problems.  Because ioctls are METHOD_BUFFERED, a
 * systemBuffer is alloc'd, but, because the completionroutines return
 * STATUS_MORE_PROCESSING_REQUIRED, never gets freed.  Also, SystemBuffer
 * is not copied to OutputBuffer until after completionRoutine returns
 * STATUS_SUCCESS.  Need to move from METHOD_BUFFER or from using
 * IoBuildDeviceIoControlRequest.
 * 
 * 4     2/28/97 9:36a Mikez
 * Removed unimplemented optional routines: DevSpecific and Dial.
 * 
 * 3     12/19/96 11:28a Mikez
 * Removed OidTapiAccept since it's optional and wasn't implemented.
 * 
 * 2     10/28/96 1:25p Mikez
 * Updated to support latest firmware release, v1.1.2b.
 * 
 * 1     3/11/96 5:06p Mikez
 * Revision 1.8  1996/01/04  17:08:14  unknown
 * Delayed the call to Listen during OidTapiDrop until after disconnect
 * confirm has been received (N_DC).  Also, fixed buggy LSAP address code.
 * 
 * Revision 1.7  1995/10/06  07:00:03  Craig_Harrison
 * Version 1.0.1.2 
 * 
 * Revision 1.6  1995/09/15  00:00:00  Craig_Harrison
 * First beta release
 * 
 * Revision 1.4  1995/06/01  10:09:18  rik
 * Updated for various problems and enhancements
 * 
 * Revision 1.3  1995/01/23  09:26:54  rik
 * Got direct X25 connections working reliably
 * 
 * Revision 1.2  1994/03/23  22:17:41  rik
 * Updated to compile with first integration
 *
 * Revision 1.1  1994/03/17  10:04:16  rik
 * Initial revision
 *

--*/
#include <ntddk.h>
#include <ndis.h>
#include <ndiswan.h>

#include "DsApi.h"
#include "digix25.h"
#include "digix25p.h"
#include "digifile.h"



/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//                      Local Define's                                     //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

#define  OID_GEN_INFO   0x00000000
#define  OID_8023_INFO  0x01000000
#define  OID_WAN_INFO   0x04000000
#define  OID_TAPI_INFO  0x07000000



/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//                        Prototypes                                       //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

//
// Wan wrapper prototypes
//
NDIS_STATUS OidWanPermanentAddress( IN NDIS_HANDLE MiniportAdapterContext,
                                    IN PVOID InformationBuffer,
                                    IN ULONG InformationBufferLength,
                                    OUT PULONG BytesWritten,
                                    OUT PULONG BytesNeeded,
                                    IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanCurrentAddress( IN NDIS_HANDLE MiniportAdapterContext,
                                  IN PVOID InformationBuffer,
                                  IN ULONG InformationBufferLength,
                                  OUT PULONG BytesWritten,
                                  OUT PULONG BytesNeeded,
                                  IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanQualityOfService( IN NDIS_HANDLE MiniportAdapterContext,
                                    IN PVOID InformationBuffer,
                                    IN ULONG InformationBufferLength,
                                    OUT PULONG BytesWritten,
                                    OUT PULONG BytesNeeded,
                                    IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanProtocolType( IN NDIS_HANDLE MiniportAdapterContext,
                                IN PVOID InformationBuffer,
                                IN ULONG InformationBufferLength,
                                OUT PULONG BytesWritten,
                                OUT PULONG BytesNeeded,
                                IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanMediumSubType( IN NDIS_HANDLE MiniportAdapterContext,
                                 IN PVOID InformationBuffer,
                                 IN ULONG InformationBufferLength,
                                 OUT PULONG BytesWritten,
                                 OUT PULONG BytesNeeded,
                                 IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanHeaderFormat( IN NDIS_HANDLE MiniportAdapterContext,
                                IN PVOID InformationBuffer,
                                IN ULONG InformationBufferLength,
                                OUT PULONG BytesWritten,
                                OUT PULONG BytesNeeded,
                                IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanGetInfo( IN NDIS_HANDLE MiniportAdapterContext,
                           IN PVOID InformationBuffer,
                           IN ULONG InformationBufferLength,
                           OUT PULONG BytesWritten,
                           OUT PULONG BytesNeeded,
                           IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanGetLinkInfo( IN NDIS_HANDLE MiniportAdapterContext,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded,
                               IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanSetLinkInfo( IN NDIS_HANDLE MiniportAdapterContext,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded,
                               IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanGetSetBridgeInfo( IN NDIS_HANDLE MiniportAdapterContext,
                                    IN PVOID InformationBuffer,
                                    IN ULONG InformationBufferLength,
                                    OUT PULONG BytesWritten,
                                    OUT PULONG BytesNeeded,
                                    IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanGetCompInfo( IN NDIS_HANDLE MiniportAdapterContext,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded,
                               IN BOOLEAN QueryInfo );

NDIS_STATUS OidWanSetCompInfo( IN NDIS_HANDLE MiniportAdapterContext,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded,
                               IN BOOLEAN QueryInfo );



//
// Tapi wrapper prototypes
//

NDIS_STATUS OidTapiAccept( IN NDIS_HANDLE MiniportAdapterContext,
                           IN PVOID InformationBuffer,
                           IN ULONG InformationBufferLength,
                           OUT PULONG BytesWritten,
                           OUT PULONG BytesNeeded,
                           IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiAnswer( IN NDIS_HANDLE MiniportAdapterContext,
                           IN PVOID InformationBuffer,
                           IN ULONG InformationBufferLength,
                           OUT PULONG BytesWritten,
                           OUT PULONG BytesNeeded,
                           IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiClose( IN NDIS_HANDLE MiniportAdapterContext,
                          IN PVOID InformationBuffer,
                          IN ULONG InformationBufferLength,
                          OUT PULONG BytesWritten,
                          OUT PULONG BytesNeeded,
                          IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiCloseCall( IN NDIS_HANDLE MiniportAdapterContext,
                              IN PVOID InformationBuffer,
                              IN ULONG InformationBufferLength,
                              OUT PULONG BytesWritten,
                              OUT PULONG BytesNeeded,
                              IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiConditionalMediaDetection( IN NDIS_HANDLE MiniportAdapterContext,
                                              IN PVOID InformationBuffer,
                                              IN ULONG InformationBufferLength,
                                              OUT PULONG BytesWritten,
                                              OUT PULONG BytesNeeded,
                                              IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiDrop( IN NDIS_HANDLE MiniportAdapterContext,
                         IN PVOID InformationBuffer,
                         IN ULONG InformationBufferLength,
                         OUT PULONG BytesWritten,
                         OUT PULONG BytesNeeded,
                         IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetAddressCaps( IN NDIS_HANDLE MiniportAdapterContext,
                                   IN PVOID InformationBuffer,
                                   IN ULONG InformationBufferLength,
                                   OUT PULONG BytesWritten,
                                   OUT PULONG BytesNeeded,
                                   IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetAddressId( IN NDIS_HANDLE MiniportAdapterContext,
                                 IN PVOID InformationBuffer,
                                 IN ULONG InformationBufferLength,
                                 OUT PULONG BytesWritten,
                                 OUT PULONG BytesNeeded,
                                 IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetAddresStatus( IN NDIS_HANDLE MiniportAdapterContext,
                                    IN PVOID InformationBuffer,
                                    IN ULONG InformationBufferLength,
                                    OUT PULONG BytesWritten,
                                    OUT PULONG BytesNeeded,
                                    IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetCallAddressId( IN NDIS_HANDLE MiniportAdapterContext,
                                     IN PVOID InformationBuffer,
                                     IN ULONG InformationBufferLength,
                                     OUT PULONG BytesWritten,
                                     OUT PULONG BytesNeeded,
                                     IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetCallInfo( IN NDIS_HANDLE MiniportAdapterContext,
                                IN PVOID InformationBuffer,
                                IN ULONG InformationBufferLength,
                                OUT PULONG BytesWritten,
                                OUT PULONG BytesNeeded,
                                IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetCallStatus( IN NDIS_HANDLE MiniportAdapterContext,
                                  IN PVOID InformationBuffer,
                                  IN ULONG InformationBufferLength,
                                  OUT PULONG BytesWritten,
                                  OUT PULONG BytesNeeded,
                                  IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetDevCaps( IN NDIS_HANDLE MiniportAdapterContext,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded,
                               IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetId( IN NDIS_HANDLE MiniportAdapterContext,
                          IN PVOID InformationBuffer,
                          IN ULONG InformationBufferLength,
                          OUT PULONG BytesWritten,
                          OUT PULONG BytesNeeded,
                          IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiGetLineDevStatus( IN NDIS_HANDLE MiniportAdapterContext,
                                     IN PVOID InformationBuffer,
                                     IN ULONG InformationBufferLength,
                                     OUT PULONG BytesWritten,
                                     OUT PULONG BytesNeeded,
                                     IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiMakeCall( IN NDIS_HANDLE MiniportAdapterContext,
                             IN PVOID InformationBuffer,
                             IN ULONG InformationBufferLength,
                             OUT PULONG BytesWritten,
                             OUT PULONG BytesNeeded,
                             IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiOpen( IN NDIS_HANDLE MiniportAdapterContext,
                         IN PVOID InformationBuffer,
                         IN ULONG InformationBufferLength,
                         OUT PULONG BytesWritten,
                         OUT PULONG BytesNeeded,
                         IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiProviderInitialize( IN NDIS_HANDLE MiniportAdapterContext,
                                       IN PVOID InformationBuffer,
                                       IN ULONG InformationBufferLength,
                                       OUT PULONG BytesWritten,
                                       OUT PULONG BytesNeeded,
                                       IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiProviderShutdown( IN NDIS_HANDLE MiniportAdapterContext,
                                     IN PVOID InformationBuffer,
                                     IN ULONG InformationBufferLength,
                                     OUT PULONG BytesWritten,
                                     OUT PULONG BytesNeeded,
                                     IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiSetAppSpecific( IN NDIS_HANDLE MiniportAdapterContext,
                                   IN PVOID InformationBuffer,
                                   IN ULONG InformationBufferLength,
                                   OUT PULONG BytesWritten,
                                   OUT PULONG BytesNeeded,
                                   IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiSetCallParams( IN NDIS_HANDLE MiniportAdapterContext,
                                  IN PVOID InformationBuffer,
                                  IN ULONG InformationBufferLength,
                                  OUT PULONG BytesWritten,
                                  OUT PULONG BytesNeeded,
                                  IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiSetDefaultMediaDetection( IN NDIS_HANDLE MiniportAdapterContext,
                                             IN PVOID InformationBuffer,
                                             IN ULONG InformationBufferLength,
                                             OUT PULONG BytesWritten,
                                             OUT PULONG BytesNeeded,
                                             IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiSetMediaMode( IN NDIS_HANDLE MiniportAdapterContext,
                                 IN PVOID InformationBuffer,
                                 IN ULONG InformationBufferLength,
                                 OUT PULONG BytesWritten,
                                 OUT PULONG BytesNeeded,
                                 IN BOOLEAN QueryInfo );

NDIS_STATUS OidTapiStatusMessages( IN NDIS_HANDLE MiniportAdapterContext,
                                   IN PVOID InformationBuffer,
                                   IN ULONG InformationBufferLength,
                                   OUT PULONG BytesWritten,
                                   OUT PULONG BytesNeeded,
                                   IN BOOLEAN QueryInfo );



typedef NDIS_STATUS (*POID_CRACKER_HANDLER)( IN NDIS_HANDLE AdapterContext,
                                             IN PVOID InformationBuffer,
                                             IN ULONG InformationBufferLength,
                                             OUT PULONG BytesWritten,
                                             OUT PULONG BytesNeeded,
                                             IN BOOLEAN QueryInfo );

/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//                Local typedef's and global variables                     //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

typedef struct _OID_CRACKER_
{
   NDIS_OID Oid;
   POID_CRACKER_HANDLER OidHandler;
} OID_CRACKER, *POID_CRACKER;


//
// Array of Wan Oid dispatch handlers.
//

OID_CRACKER OidWanCrackers[] =
{
   { OID_WAN_PERMANENT_ADDRESS,  OidWanPermanentAddress },
   { OID_WAN_CURRENT_ADDRESS,    OidWanCurrentAddress },
   { OID_WAN_QUALITY_OF_SERVICE, OidWanQualityOfService },
   { OID_WAN_PROTOCOL_TYPE,      OidWanProtocolType },
   { OID_WAN_MEDIUM_SUBTYPE,     OidWanMediumSubType },
   { OID_WAN_HEADER_FORMAT,      OidWanHeaderFormat },
   { OID_WAN_GET_INFO,           OidWanGetInfo },

   { OID_WAN_SET_LINK_INFO,      OidWanSetLinkInfo },
   { OID_WAN_GET_LINK_INFO,      OidWanGetLinkInfo },

   { OID_WAN_GET_BRIDGE_INFO,    OidWanGetSetBridgeInfo },
   { OID_WAN_SET_BRIDGE_INFO,    OidWanGetSetBridgeInfo },

   { OID_WAN_GET_COMP_INFO,      OidWanGetCompInfo },
   { OID_WAN_SET_COMP_INFO,      OidWanSetCompInfo },
};

//
// Array of Tapi Oid dispatch handlers.
//

OID_CRACKER OidTapiCrackers[] =
{
   // { OID_TAPI_ACCEPT,                        OidTapiAccept },
   { OID_TAPI_ANSWER,                        OidTapiAnswer },
   { OID_TAPI_CLOSE,                         OidTapiClose },
   { OID_TAPI_CLOSE_CALL,                    OidTapiCloseCall },
   { OID_TAPI_CONDITIONAL_MEDIA_DETECTION,   OidTapiConditionalMediaDetection },
   // { OID_TAPI_CONFIG_DIALOG,                  OidTapiConfigDialog },
   // { OID_TAPI_DEV_SPECIFIC,                  OidTapiDevSpecific },
   // { OID_TAPI_DIAL,                          OidTapiDial },
   { OID_TAPI_DROP,                          OidTapiDrop },
   { OID_TAPI_GET_ADDRESS_CAPS,              OidTapiGetAddressCaps },
   { OID_TAPI_GET_ADDRESS_ID,                OidTapiGetAddressId },
   { OID_TAPI_GET_ADDRESS_STATUS,            OidTapiGetAddresStatus },
   { OID_TAPI_GET_CALL_ADDRESS_ID,           OidTapiGetCallAddressId },
   { OID_TAPI_GET_CALL_INFO,                 OidTapiGetCallInfo },
   { OID_TAPI_GET_CALL_STATUS,               OidTapiGetCallStatus },
   { OID_TAPI_GET_DEV_CAPS,                  OidTapiGetDevCaps },
   // { OID_TAPI_GET_DEV_CONFIG,                OidTapiGetDevConfig },
   // { OID_TAPI_GET_EXTENSION_ID,              OidTapiGetExtensionId },
   { OID_TAPI_GET_ID,                        OidTapiGetId },
   { OID_TAPI_GET_LINE_DEV_STATUS,           OidTapiGetLineDevStatus },
   { OID_TAPI_MAKE_CALL,                     OidTapiMakeCall },
   // { OID_TAPI_NEGOTIATE_EXT_VERSION,          OidTapiNegotiateExtVersion },
   { OID_TAPI_OPEN,                          OidTapiOpen },
   { OID_TAPI_PROVIDER_INITIALIZE,           OidTapiProviderInitialize },
   { OID_TAPI_PROVIDER_SHUTDOWN,             OidTapiProviderShutdown },
   // { OID_TAPI_SECURE_CALL,                   OidTapiSecureCall },
   // { OID_TAPI_SELECT_EXT_VERSION,            OidTapiSelectExtVersion },
   // { OID_TAPI_SEND_USER_USER_INFO,           OidTapiSendUserUserInfo },
   { OID_TAPI_SET_APP_SPECIFIC,              OidTapiSetAppSpecific },
   { OID_TAPI_SET_CALL_PARAMS,               OidTapiSetCallParams },
   { OID_TAPI_SET_DEFAULT_MEDIA_DETECTION,   OidTapiSetDefaultMediaDetection },
   // { OID_TAPI_SET_DEV_CONFIG,                OidTapiSetDevConfig },
   { OID_TAPI_SET_MEDIA_MODE,                OidTapiSetMediaMode },
   { OID_TAPI_SET_STATUS_MESSAGES,           OidTapiStatusMessages }
};

const ULONG OidWanCrackersSize = (sizeof(OidWanCrackers)/sizeof(OID_CRACKER));
const ULONG OidTapiCrackersSize = (sizeof(OidTapiCrackers)/sizeof(OID_CRACKER));



NDIS_STATUS MiniportQueryInfo( IN NDIS_HANDLE MiniportAdapterContext,
                               IN NDIS_OID Oid,
                               IN PVOID InformationBuffer,
                               IN ULONG InformationBufferLength,
                               OUT PULONG BytesWritten,
                               OUT PULONG BytesNeeded )
/*++

Routine Description:

Arguments:


Return Value:

   None.

--*/
{
   ULONG i;
   NDIS_STATUS Status = NDIS_STATUS_SUCCESS;

   (*BytesNeeded) = 0;
   (*BytesWritten) = 0;

   switch( Oid & 0xFF000000 )
   {
      case OID_GEN_INFO:
      case OID_8023_INFO:

         Status = LanOidHandler( MiniportAdapterContext,
                                 Oid,
                                 InformationBuffer,
                                 InformationBufferLength,
                                 BytesWritten,
                                 BytesNeeded );
         break;

      case OID_TAPI_INFO:

         for( i = 0; i < OidTapiCrackersSize; i++ )
         {
            if( Oid == OidTapiCrackers[i].Oid )
            {
               Status = OidTapiCrackers[i].OidHandler( MiniportAdapterContext,
                                                       InformationBuffer,
                                                       InformationBufferLength,
                                                       BytesWritten,
                                                       BytesNeeded,
                                                       TRUE );
               break;
            }
         }

         if( i >= OidTapiCrackersSize )
         {
            DigiDump( DIGIERRORS, ("Invalid GetInfo Tapi OID = 0x%x\n", Oid ) );
            Status = NDIS_STATUS_TAPI_OPERATIONUNAVAIL;
         }
         break;

      case OID_WAN_INFO:

         for( i = 0; i < OidWanCrackersSize; i++ )
         {
            if( Oid == OidWanCrackers[i].Oid )
            {
               Status = OidWanCrackers[i].OidHandler( MiniportAdapterContext,
                                                      InformationBuffer,
                                                      InformationBufferLength,
                                                      BytesWritten,
                                                      BytesNeeded,
                                                      TRUE );
               break;
            }
         }

         if( i >= OidWanCrackersSize )
         {
            DigiDump( DIGIERRORS, ("Invalid GetInfo Wan OID = 0x%x\n", Oid ) );
            Status = NDIS_STATUS_INVALID_OID;
         }
         break;

      default:

         DigiDump( DIGIERRORS, ("Invalid GetInfo OID = 0x%x\n", Oid ) );
         Status = NDIS_STATUS_INVALID_OID;
			break;
   }

   return( Status );
}  // end MiniportQueryInfo



NDIS_STATUS MiniportSetInfo( IN NDIS_HANDLE MiniportAdapterContext,
                             IN NDIS_OID Oid,
                             IN PVOID InformationBuffer,
                             IN ULONG InformationBufferLength,
                             OUT PULONG BytesRead,
                             OUT PULONG BytesNeeded )
/*++

Routine Description:

Arguments:


Return Value:

   None.

--*/
{
   ULONG i;
   NDIS_STATUS Status = NDIS_STATUS_SUCCESS;

   switch( Oid & 0xFF000000 )
   {
      case OID_GEN_INFO:
      case OID_8023_INFO:
         Status = LanOidHandler( MiniportAdapterContext,
                                 Oid,
                                 InformationBuffer,
                                 InformationBufferLength,
                                 BytesRead,
                                 BytesNeeded );
         break;

      case OID_TAPI_INFO:

         for( i = 0; i < OidTapiCrackersSize; i++ )
         {
            if( Oid == OidTapiCrackers[i].Oid )
            {
               Status = OidTapiCrackers[i].OidHandler( MiniportAdapterContext,
                                                       InformationBuffer,
                                                       InformationBufferLength,
                                                       BytesRead,
                                                       BytesNeeded,
                                                       FALSE );
               break;
            }
         }

         if( i >= OidTapiCrackersSize )
         {
            DigiDump( DIGIERRORS, ("Invalid SetInfo Wan OID = 0x%x\n", Oid ) );
            Status = NDIS_STATUS_TAPI_OPERATIONUNAVAIL;
         }
         break;

      case OID_WAN_INFO:

         for( i = 0; i < OidWanCrackersSize; i++ )
         {
            if( Oid == OidWanCrackers[i].Oid )
            {
               Status = OidWanCrackers[i].OidHandler( MiniportAdapterContext,
                                                      InformationBuffer,
                                                      InformationBufferLength,
                                                      BytesRead,
                                                      BytesNeeded,
                                                      FALSE );
               break;
            }
         }

         if( i >= OidWanCrackersSize )
         {
            DigiDump( DIGIERRORS, ("Invalid SetInfo Wan OID = 0x%x\n", Oid ) );
            Status = NDIS_STATUS_INVALID_OID;
         }
         break;

      default:

         DigiDump( DIGIERRORS, ("Invalid SetInfo OID = 0x%x\n", Oid ) );
         Status = NDIS_STATUS_INVALID_OID;
			break;
   }

   return( Status );

}  // end MiniportSetInfo
