123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584 |
- // ALG.idl : IDL source for ALG.dll
- //
- // This file will be processed by the MIDL tool to
- // produce the type library (ALG.tlb) and marshalling code.
- cpp_quote("//+-------------------------------------------------------------------------")
- cpp_quote("//")
- cpp_quote("// Microsoft Windows")
- cpp_quote("// Copyright (C) Microsoft Corporation, 1992-2001.")
- cpp_quote("//")
- cpp_quote("//--------------------------------------------------------------------------")
- cpp_quote("// MODULE: alg.h")
- cpp_quote("//")
- import "oaidl.idl";
- import "ocidl.idl";
- const int ALG_MAXIMUM_PORT_RANGE_SIZE=10;
- typedef enum _ALG_PROTOCOL
- {
- eALG_TCP = 0x01,
- eALG_UDP = 0x02
- } ALG_PROTOCOL;
- typedef enum _ALG_CAPTURE
- {
- eALG_SOURCE_CAPTURE = 0x01,
- eALG_DESTINATION_CAPTURE = 0x02
- } ALG_CAPTURE;
- typedef enum _ALG_DIRECTION
- {
- eALG_INBOUND = 0x01,
- eALG_OUTBOUND = 0x02,
- eALG_BOTH = 0x03
- } ALG_DIRECTION;
- typedef enum _ALG_ADAPTER_TYPE
- {
- eALG_PRIVATE = 0x01,
- eALG_BOUNDARY = 0x02,
- eALG_FIREWALLED = 0x04
- } ALG_ADAPTER_TYPE;
- typedef enum _ALG_NOTIFICATION
- {
- eALG_NONE = 0x00,
- eALG_SESSION_CREATION = 0x01,
- eALG_SESSION_DELETION = 0x02,
- eALG_SESSION_BOTH = 0x03
- } ALG_NOTIFICATION;
- typedef struct _ALG_PRIMARY_CHANNEL_PROPERTIES
- {
- ALG_PROTOCOL eProtocol;
- USHORT usCapturePort;
- ALG_CAPTURE eCaptureType;
- BOOL fCaptureInbound;
- ULONG ulListeningAddress;
- USHORT usListeningPort;
- } ALG_PRIMARY_CHANNEL_PROPERTIES;
- typedef struct _ALG_SECONDARY_CHANNEL_PROPERTIES
- {
- ALG_PROTOCOL eProtocol;
- ULONG ulPrivateAddress;
- USHORT usPrivatePort;
- ULONG ulPublicAddress;
- USHORT usPublicPort;
- ULONG ulRemoteAddress;
- USHORT usRemotePort;
- ULONG ulListenAddress;
- USHORT usListenPort;
- ALG_DIRECTION eDirection;
- BOOL fPersistent;
- } ALG_SECONDARY_CHANNEL_PROPERTIES;
- typedef struct _ALG_DATA_CHANNEL_PROPERTIES
- {
- ALG_PROTOCOL eProtocol;
- ULONG ulPrivateAddress;
- USHORT usPrivatePort;
- ULONG ulPublicAddress;
- USHORT usPublicPort;
- ULONG ulRemoteAddress;
- USHORT usRemotePort;
- ALG_DIRECTION eDirection;
- ALG_NOTIFICATION eDesiredNotification;
- } ALG_DATA_CHANNEL_PROPERTIES;
- typedef struct _ALG_PERSISTENT_DATA_CHANNEL_PROPERTIES
- {
- ALG_PROTOCOL eProtocol;
- ULONG ulPrivateAddress;
- USHORT usPrivatePort;
- ULONG ulPublicAddress;
- USHORT usPublicPort;
- ULONG ulRemoteAddress;
- USHORT usRemotePort;
- ALG_DIRECTION eDirection;
- } ALG_PERSISTENT_DATA_CHANNEL_PROPERTIES;
- [
- object,
- uuid(480BF94A-09FD-4F8A-A3E0-B0700282D84D),
- pointer_default(unique)
- ]
- interface IAdapterInfo : IUnknown
- {
- HRESULT GetAdapterIndex(
- [out] ULONG* pulIndex);
- HRESULT GetAdapterType(
- [out] ALG_ADAPTER_TYPE* pAdapterType);
- HRESULT GetAdapterAddresses(
- [out] ULONG* pulAddressCount,
- [out] ULONG** prgAddresses
- );
- };
- [
- object,
- uuid(B68E5043-3E3D-4CC2-B9C1-5F8F88FEE81C),
- pointer_default(unique)
- ]
- interface IPendingProxyConnection : IUnknown
- {
- HRESULT Cancel();
- };
- [
- object,
- uuid(AD42D12A-4AD0-4856-919E-E854C91D1856),
- pointer_default(unique),
- local
- ]
- interface IDataChannel : IUnknown
- {
- HRESULT Cancel();
- HRESULT GetChannelProperties(
- [out] ALG_DATA_CHANNEL_PROPERTIES** ppProperties
- );
- HRESULT GetSessionCreationEventHandle(
- [out] HANDLE* pHandle
- );
- HRESULT GetSessionDeletionEventHandle(
- [out] HANDLE* pHandle
- );
- };
- [
- object,
- uuid(A180E934-D92A-415D-9144-759F8054E8F6),
- pointer_default(unique)
- ]
- interface IPersistentDataChannel : IUnknown
- {
- HRESULT Cancel();
- HRESULT GetChannelProperties(
- [out] ALG_PERSISTENT_DATA_CHANNEL_PROPERTIES** ppProperties
- );
- };
- [
- object,
- uuid(1A2E8B62-9012-4BE6-84AE-32BD66BA657A),
- pointer_default(unique)
- ]
- interface IPrimaryControlChannel : IUnknown
- {
-
- HRESULT Cancel();
- HRESULT GetChannelProperties(
- [out] ALG_PRIMARY_CHANNEL_PROPERTIES** ppProperties
- );
- HRESULT GetOriginalDestinationInformation(
- [in] ULONG ulSourceAddress,
- [in] USHORT usSourcePort,
- [out] ULONG* pulOriginalDestinationAddress,
- [out] USHORT* pusOriginalDestinationPort,
- [out] ULONG* pulRemapDestinationAddress,
- [out] USHORT* pulRemapDestinationPort,
- [out] IAdapterInfo ** ppReceiveAdapter
- );
- };
- [
- object,
- uuid(A23F9D10-714C-41FE-8471-FFB19BC28454),
- pointer_default(unique)
- ]
- interface ISecondaryControlChannel : IUnknown
- {
- HRESULT Cancel();
- HRESULT GetChannelProperties(
- [out] ALG_SECONDARY_CHANNEL_PROPERTIES ** ppProperties
- );
- HRESULT GetOriginalDestinationInformation(
- [in] ULONG ulSourceAddress,
- [in] USHORT usSourcePort,
- [out] ULONG* pulOriginalDestinationAddress,
- [out] USHORT* pusOriginalDestinationPort,
- [out] IAdapterInfo** ppReceiveAdapter
- );
- };
- [
- object,
- uuid(A23F9D11-714C-41FE-8471-FFB19BC28454),
- pointer_default(unique)
- ]
- interface IEnumAdapterInfo : IUnknown
- {
- HRESULT Next(
- [in] ULONG celt,
- [out, size_is(celt), length_is(*pCeltFetched)] IAdapterInfo ** rgAI,
- [out] ULONG * pCeltFetched
- );
- HRESULT Skip(
- [in] ULONG celt
- );
- HRESULT Reset(
- );
- HRESULT Clone(
- [out] IEnumAdapterInfo ** ppEnum
- );
- }
- //
- // Implemented by ISV in there ALG proxy's
- //
- [
- object,
- uuid(44AB2DC3-23B2-47DE-8228-2E1CCEEB9911),
-
- helpstring("IAdapterNotificationSink Interface"),
- pointer_default(unique)
- ]
- interface IAdapterNotificationSink : IUnknown
- {
- HRESULT AdapterAdded(
- IAdapterInfo * pAdapter
- );
- HRESULT AdapterRemoved(
- IAdapterInfo* pAdapter
- );
- HRESULT AdapterModified(
- IAdapterInfo* pAdapter
- );
- };
- //
- // ALG main public interface
- //
- [
- object,
- uuid(5134842A-FDCE-485D-93CD-DE1640643BBE),
- pointer_default(unique)
- ]
- interface IApplicationGatewayServices : IUnknown
- {
- HRESULT CreatePrimaryControlChannel(
- [in] ALG_PROTOCOL eProtocol,
- [in] USHORT usPortToCapture,
- [in] ALG_CAPTURE eCaptureType,
- [in] BOOL fCaptureInbound,
- [in] ULONG ulListenAddress,
- [in] USHORT usListenPort,
- [out] IPrimaryControlChannel** ppIControlChannel
- );
- HRESULT CreateSecondaryControlChannel(
- [in] ALG_PROTOCOL eProtocol,
- [in] ULONG ulPrivateAddress,
- [in] USHORT usPrivatePort,
- [in] ULONG ulPublicAddress,
- [in] USHORT usPublicPort,
- [in] ULONG ulRemoteAddress,
- [in] USHORT usRemotePort,
- [in] ULONG ulListenAddress,
- [in] USHORT usListenPort,
- [in] ALG_DIRECTION eDirection,
- [in] BOOL fPersistent,
- [out] ISecondaryControlChannel** ppControlChannel
- );
- HRESULT GetBestSourceAddressForDestinationAddress(
- [in] ULONG ulDstAddress,
- [in] BOOL fDemandDial,
- [out] ULONG* pulBestSrcAddress
- );
- HRESULT PrepareProxyConnection(
- [in] ALG_PROTOCOL eProtocol,
- [in] ULONG ulSrcAddress,
- [in] USHORT usSrcPort,
- [in] ULONG ulDstAddress,
- [in] USHORT usDstPort,
- [in] BOOL fNoTimeout,
- [out] IPendingProxyConnection** ppPendingConnection
- );
- HRESULT PrepareSourceModifiedProxyConnection(
- [in] ALG_PROTOCOL eProtocol,
- [in] ULONG ulSrcAddress,
- [in] USHORT usSrcPort,
- [in] ULONG ulDstAddress,
- [in] USHORT usDstPort,
- [in] ULONG ulNewSrcAddress,
- [in] USHORT usNewSourcePort,
- [out] IPendingProxyConnection** ppPendingConnection
- );
- HRESULT CreateDataChannel(
- [in] ALG_PROTOCOL eProtocol,
- [in] ULONG ulPrivateAddress,
- [in] USHORT usPrivatePort,
- [in] ULONG ulPublicAddress,
- [in] USHORT usPublicPort,
- [in] ULONG ulRemoteAddress,
- [in] USHORT usRemotePort,
- [in] ALG_DIRECTION eDirection,
- [in] ALG_NOTIFICATION eDesiredNotification,
- [in] BOOL fNoTimeout,
- [out] IDataChannel** ppDataChannel
- );
-
- HRESULT CreatePersistentDataChannel(
- [in] ALG_PROTOCOL eProtocol,
- [in] ULONG ulPrivateAddress,
- [in] USHORT usPrivatePort,
- [in] ULONG ulPublicAddress,
- [in] USHORT usPublicPort,
- [in] ULONG ulRemoteAddress,
- [in] USHORT usRemotePort,
- [in] ALG_DIRECTION eDirection,
- [out] IPersistentDataChannel** ppIPersistentDataChannel
- );
- HRESULT ReservePort(
- [in] USHORT usPortCount,
- [out] USHORT* pusReservedPort
- );
- HRESULT ReleaseReservedPort(
- [in] USHORT usReservedPortBase,
- [in] USHORT usPortCount
- );
- HRESULT EnumerateAdapters(
- [out] IEnumAdapterInfo ** ppIEnumAdapterInfo
- );
- HRESULT StartAdapterNotifications(
- [in] IAdapterNotificationSink* pSink,
- [in] DWORD* pdwCookie
- );
- HRESULT StopAdapterNotifications(
- [in] DWORD dwCookieOfSink
- );
- };
- //
- // Implemented by the ISV ALG's
- //
- [
- object,
- uuid(5134842B-FDCE-485D-93CD-DE1640643BBE),
- pointer_default(unique)
- ]
- interface IApplicationGateway : IUnknown
- {
- HRESULT Initialize(
- [in] IApplicationGatewayServices* pAlgServices
- );
- HRESULT Stop(void);
- };
- //
- //
- // Must be implemented by the ALG Manager
- //
- [
- uuid(B6D1D098-E235-4B99-BA98-7C624FD875DB),
- version(1.0),
- helpstring("MyICS 1.0 Type Library")
- ]
- library ALGLib
- {
- importlib("stdole32.tlb");
- importlib("stdole2.tlb");
- [
- uuid(F8ADE1D3-49DF-4B75-9005-EF9508E6A337),
- helpstring("ApplicationGatewayServices Class")
- ]
- coclass ApplicationGatewayServices
- {
- [default] interface IApplicationGatewayServices;
- };
- [
- uuid(3CEB5509-C1CD-432F-9D8F-65D1E286AA80),
- helpstring("PrimaryControlChannel Class")
- ]
- coclass PrimaryControlChannel
- {
- [default] interface IPrimaryControlChannel;
- };
- [
- uuid(7B3181A0-C92F-4567-B0FA-CD9A10ECD7D1),
- helpstring("SecondaryControlChannel Class")
- ]
- coclass SecondaryControlChannel
- {
- [default] interface ISecondaryControlChannel;
- };
- [
- uuid(6F9942C9-C1B1-4AB5-93DA-6058991DC8F3),
- helpstring("AdapterInfo Class")
- ]
- coclass AdapterInfo
- {
- [default] interface IAdapterInfo;
- };
- [
- uuid(6F9942CA-C1B1-4AB5-93DA-6058991DC8F3),
- helpstring("EnumAdapterInfo Class")
- ]
- coclass EnumAdapterInfo
- {
- [default] interface IEnumAdapterInfo;
- };
- [
- uuid(D8A68E5E-2B37-426C-A329-C117C14C429E),
- helpstring("PendingProxyConnection Class")
- ]
- coclass PendingProxyConnection
- {
- [default] interface IPendingProxyConnection;
- };
- [
- uuid(BBB36F15-408D-4056-8C27-920843D40BE5),
- helpstring("DataChannel Class")
- ]
- coclass DataChannel
- {
- [default] interface IDataChannel;
- };
- [
- uuid(BC9B54AB-7883-4C13-909F-033D03267990),
- helpstring("PersistentDataChannel Class")
- ]
- coclass PersistentDataChannel
- {
- [default] interface IPersistentDataChannel;
- };
- };
|