/*++
*******************************************************************************
* Copyright (c) 1990-97 Digi International Inc., All Rights Reserved
*
* 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.
*
* Restricted Rights Legend
*
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
* Technical Data and Computer Software clause at DFARS 252.227-7031 or
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -
* Restricted Rights at 48 CFR 52.227-19, as applicable.
*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
*
*******************************************************************************

Module Name:

   sohbuild.h

Abstract:

   This module contains header definitions used to build the streams
   stacks.

Author:

   Jeff Romatoski


--*/


////////////////////////////////////////////////////////////////////////////////

#ifndef _SOHBUILD_H
#define _SOHBUILD_H

#include "sohreg.h"
#include "dxbreg.h"


#if NT5_BUILD


NTSTATUS
DigiSohCreateControllingStreams(
	IN PDEVICE_OBJECT	pDevObj,
	IN PSOH_DEV_EXT		pDevExt,
	IN ULONG			ulPort,
	IN HANDLE			hkLine
	);


void
DigiSohCloseControllingStreams(
	IN PSOH_DEV_EXT		pDevExt
	);


NTSTATUS
DigiSohBuildMiniportInstance(
	IN HANDLE					hkLine, 
    IN PDEVICE_OBJECT			pDevObj,
    IN PSOH_DEV_EXT				pDevExt
    );


#else

// Prototypes
NTSTATUS
DigiSohCreateControllingStreams(
	IN PDEVICE_OBJECT		pDevObj,
	IN PSOH_DEV_EXT			pDevExt,
	IN PUNICODE_STRING		pucParametersPath
	);

NTSTATUS
DigiSohEnumMiniportInstance(
    IN PWSTR					pwRegistryPath,
    IN PWSTR					pwDeviceName,
    IN PDEVICE_OBJECT			pDevObj,
    IN PSOH_DEV_EXT				pDevExt,
	IN PVOID					Nothing
    );


NTSTATUS
DigiSohBuildMiniportInstance(
    IN PWSTR					pwRegistryPath,
    IN PWSTR					pwDeviceName,
    IN PDEVICE_OBJECT			pDevObj,
    IN PSOH_DEV_EXT				pDevExt,
	IN PVOID					Nothing
    );

#endif

NTSTATUS
SohBuildFrameOverXWan(
    IN PDEVICE_OBJECT			pDevObj,
    IN PSOH_DEV_EXT				pDevExt,
	IN HANDLE					hKeyPort
	);

NTSTATUS
SohBuildX25OverXWan(
    IN PDEVICE_OBJECT			pDevObj,
    IN PSOH_DEV_EXT				pDevExt,
	IN HANDLE					hKeyPort
	);

STATIC NTSTATUS
SohLinkDevice(
	IN HANDLE  hStream,
	IN HANDLE  hLower, 
	OUT PULONG pMuxId
	);

#endif