You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
198 lines
5.9 KiB
198 lines
5.9 KiB
//
|
|
// ALG_Private.idl : IDL source to be use by ALG.exe an IPNatHlp.dll and will be link with the proxyStub HNETCNG.dll
|
|
//
|
|
// [email protected]
|
|
//
|
|
// This file will be processed by the MIDL tool to
|
|
//
|
|
|
|
import "oaidl.idl";
|
|
import "ocidl.idl";
|
|
|
|
|
|
|
|
//
|
|
//
|
|
// Must be implemented by the IPNatHlp (ALG part)
|
|
// The Only consumer of these interface is the ALG.exe
|
|
//
|
|
[
|
|
object,
|
|
uuid(FDD384CC-78C6-4E6D-8694-1DACBEE57F96),
|
|
|
|
helpstring("INat Interface"),
|
|
pointer_default(unique)
|
|
]
|
|
|
|
interface INat : IUnknown
|
|
{
|
|
[helpstring("method CreateRedirect")]
|
|
HRESULT CreateRedirect(
|
|
[in] ULONG Flags,
|
|
[in] UCHAR Protocol,
|
|
[in] ULONG DestinationAddress,
|
|
[in] USHORT DestinationPort,
|
|
[in] ULONG SourceAddress,
|
|
[in] USHORT SourcePort,
|
|
[in] ULONG NewDestinationAddress,
|
|
[in] USHORT NewDestinationPort,
|
|
[in] ULONG NewSourceAddress,
|
|
[in] USHORT NewSourcePort,
|
|
[in] ULONG RestrictAdapterIndex,
|
|
[in] DWORD_PTR dwAlgProcessId,
|
|
[in] HANDLE_PTR hCreateEvent,
|
|
[in] HANDLE_PTR hDeleteEvent
|
|
);
|
|
|
|
[helpstring("method CancelRedirect")]
|
|
HRESULT CancelRedirect(
|
|
[in] UCHAR Protocol,
|
|
[in] ULONG DestinationAddress,
|
|
[in] USHORT DestinationPort,
|
|
[in] ULONG SourceAddress,
|
|
[in] USHORT SourcePort,
|
|
[in] ULONG NewDestinationAddress,
|
|
[in] USHORT NewDestinationPort,
|
|
[in] ULONG NewSourceAddress,
|
|
[in] USHORT NewSourcePort
|
|
);
|
|
|
|
[helpstring("method CreateDynamicRedirect")]
|
|
HRESULT CreateDynamicRedirect(
|
|
[in] ULONG Flags,
|
|
[in] ULONG AdapterIndex,
|
|
[in] UCHAR Protocol,
|
|
[in] ULONG DestinationAddress,
|
|
[in] USHORT DestinationPort,
|
|
[in] ULONG SourceAddress,
|
|
[in] USHORT SourcePort,
|
|
[in] ULONG NewDestinationAddress,
|
|
[in] USHORT NewDestinationPort,
|
|
[in] ULONG NewSourceAddress,
|
|
[in] USHORT NewSourcePort,
|
|
[out] HANDLE_PTR* DynamicRedirectHandle
|
|
);
|
|
|
|
|
|
[helpstring("method CancelDynamicRedirect")]
|
|
HRESULT CancelDynamicRedirect(
|
|
[in] HANDLE_PTR DynamicRedirectHandle
|
|
);
|
|
|
|
[helpstring("method GetBestSourceAddressForDestinationAddress")]
|
|
HRESULT GetBestSourceAddressForDestinationAddress(
|
|
[in] ULONG ulDestinationAddress,
|
|
[in] BOOL fDemandDial,
|
|
[out] ULONG* pulBestSrcAddress
|
|
);
|
|
|
|
[helpstring("method LookupAdapterPortMapping")]
|
|
HRESULT LookupAdapterPortMapping(
|
|
[in] ULONG ulAdapterIndex,
|
|
[in] UCHAR Protocol,
|
|
[in] ULONG ulDestinationAddress,
|
|
[in] USHORT usDestinationPort,
|
|
[out] ULONG* pulRemapAddress,
|
|
[out] USHORT* pusRemapPort
|
|
);
|
|
|
|
[helpstring("method GetOriginalDestinationInformation")]
|
|
HRESULT GetOriginalDestinationInformation(
|
|
[in] UCHAR Protocol,
|
|
[in] ULONG ulDestinationAddress,
|
|
[in] USHORT usDestinationPort,
|
|
[in] ULONG ulSourceAddress,
|
|
[in] USHORT usSourcePort,
|
|
[out] ULONG* pulOriginalDestinationAddress,
|
|
[out] USHORT* pusOriginalDestinationPort,
|
|
[out] ULONG* pulAdapterIndex
|
|
);
|
|
|
|
|
|
[helpstring("method ReservePort")]
|
|
HRESULT ReservePort(
|
|
[in] USHORT PortCount,
|
|
[out] USHORT* ReservedPortBase
|
|
);
|
|
|
|
|
|
[helpstring("method ReleasePort")]
|
|
HRESULT ReleasePort(
|
|
[in] USHORT ReservedPortBase,
|
|
[in] USHORT PortCount
|
|
);
|
|
};
|
|
|
|
|
|
|
|
//
|
|
//
|
|
// Implemented in the ALG.exe the only consumer of these interface
|
|
// is IPNatHlp.dll
|
|
//
|
|
[
|
|
object,
|
|
uuid(B71BFBF1-2AF2-4820-810C-4F8EFF838E60),
|
|
|
|
pointer_default(unique)
|
|
]
|
|
interface IAlgController : IUnknown
|
|
{
|
|
HRESULT Start(
|
|
INat* pINat
|
|
);
|
|
|
|
HRESULT Stop();
|
|
|
|
HRESULT Adapter_Add(
|
|
[in] ULONG Index,
|
|
[in] short Type
|
|
);
|
|
|
|
HRESULT Adapter_Remove(
|
|
[in] ULONG Index
|
|
);
|
|
|
|
HRESULT Adapter_Modify(
|
|
[in] ULONG Index
|
|
);
|
|
|
|
HRESULT Adapter_Bind(
|
|
[in] ULONG Index,
|
|
[in] ULONG RealAdapterIndex,
|
|
[in] ULONG nAddressCount,
|
|
[in, size_is(nAddressCount)] LPDWORD anAddress
|
|
);
|
|
|
|
HRESULT Adapter_PortMappingChanged(
|
|
[in] ULONG Index,
|
|
[in] UCHAR Protocol,
|
|
[in] USHORT Port
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
[
|
|
uuid(B6D1D099-E235-4B99-BA98-7C624FD875DB),
|
|
version(1.0),
|
|
helpstring("MyICS Private 1.0 Type Library")
|
|
]
|
|
|
|
library ALGLibPrivate
|
|
|
|
{
|
|
importlib("stdole32.tlb");
|
|
importlib("stdole2.tlb");
|
|
|
|
|
|
[
|
|
uuid(D6015EC3-FA16-4813-9CA1-DA204574F5DA),
|
|
helpstring("AlgController Class")
|
|
]
|
|
coclass AlgController
|
|
{
|
|
[default] interface IAlgController;
|
|
};
|
|
}
|