2 * Copyright 2007 Jeff Latimer
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 *****************************************************************************
20 * The firewall management interface
24 import
"icftypes.idl";
29 uuid(A6207B2E
-7CDD
-426A
-951E-5E1CBC5AFEAD
),
32 interface INetFwIcmpSettings
: IDispatch
35 HRESULT AllowOutboundDestinationUnreachable
([out, retval] VARIANT_BOOL* allow
);
38 HRESULT AllowOutboundDestinationUnreachable
( [in] VARIANT_BOOL allow
);
41 HRESULT AllowRedirect
( [out, retval] VARIANT_BOOL* allow
);
44 HRESULT AllowRedirect
( [in] VARIANT_BOOL allow
);
47 HRESULT AllowInboundEchoRequest
( [out, retval] VARIANT_BOOL* allow
);
50 HRESULT AllowInboundEchoRequest
( [in] VARIANT_BOOL allow
);
53 HRESULT AllowOutboundTimeExceeded
( [out, retval] VARIANT_BOOL* allow
);
56 HRESULT AllowOutboundTimeExceeded
( [in] VARIANT_BOOL allow
);
59 HRESULT AllowOutboundParameterProblem
( [out, retval] VARIANT_BOOL* allow
);
62 HRESULT AllowOutboundParameterProblem
( [in] VARIANT_BOOL allow
);
65 HRESULT AllowOutboundSourceQuench
( [out, retval] VARIANT_BOOL* allow
);
68 HRESULT AllowOutboundSourceQuench
( [in] VARIANT_BOOL allow
);
71 HRESULT AllowInboundRouterRequest
( [out, retval] VARIANT_BOOL* allow
);
74 HRESULT AllowInboundRouterRequest
( [in] VARIANT_BOOL allow
);
77 HRESULT AllowInboundTimestampRequest
( [out, retval] VARIANT_BOOL* allow
);
80 HRESULT AllowInboundTimestampRequest
( [in] VARIANT_BOOL allow
);
83 HRESULT AllowInboundMaskRequest
( [out, retval] VARIANT_BOOL* allow
);
86 HRESULT AllowInboundMaskRequest
( [in] VARIANT_BOOL allow
);
89 HRESULT AllowOutboundPacketTooBig
( [out, retval] VARIANT_BOOL* allow
);
92 HRESULT AllowOutboundPacketTooBig
( [in] VARIANT_BOOL allow
);
97 uuid(E0483BA0
-47FF
-4D9C
-A6D6
-7741D0B195F7
),
100 interface INetFwOpenPort
: IDispatch
103 HRESULT Name
( [out, retval] BSTR* name
);
106 HRESULT Name
( [in] BSTR name
);
109 HRESULT IpVersion
( [out, retval] NET_FW_IP_VERSION
* ipVersion
);
112 HRESULT IpVersion
( [in] NET_FW_IP_VERSION ipVersion
);
115 HRESULT Protocol
( [out, retval] NET_FW_IP_PROTOCOL
* ipProtocol
);
118 HRESULT Protocol
( [in] NET_FW_IP_PROTOCOL ipProtocol
);
121 HRESULT Port
( [out, retval] LONG* portNumber
);
124 HRESULT Port
( [in] LONG portNumber
);
127 HRESULT Scope
( [out, retval] NET_FW_SCOPE
* scope
);
130 HRESULT Scope
( [in] NET_FW_SCOPE scope
);
133 HRESULT RemoteAddresses
( [out, retval] BSTR* remoteAddrs
);
136 HRESULT RemoteAddresses
( [in] BSTR remoteAddrs
);
139 HRESULT Enabled
( [out, retval] VARIANT_BOOL* enabled
);
142 HRESULT Enabled
( [in] VARIANT_BOOL enabled
);
145 HRESULT BuiltIn
( [out, retval] VARIANT_BOOL* builtIn
);
150 uuid(C0E9D7FA
-E07E
-430A
-B19A
-090CE82D92E2
),
153 interface INetFwOpenPorts
: IDispatch
156 HRESULT Count
( [out, retval] long* count
);
159 HRESULT Add
( [in] INetFwOpenPort
* port
);
162 HRESULT Remove
( [in] LONG portNumber
, [in] NET_FW_IP_PROTOCOL ipProtocol
);
165 HRESULT Item
( [in] LONG portNumber
, [in] NET_FW_IP_PROTOCOL ipProtocol
,
166 [out, retval] INetFwOpenPort
** openPort
);
168 [id(DISPID_NEWENUM
), propget, restricted]
169 HRESULT _NewEnum
( [out, retval] IUnknown
** newEnum
);
174 uuid(79FD57C8
-908E-4A36
-9888-D5B3F0A444CF
),
177 interface INetFwService
: IDispatch
180 HRESULT Name
( [out, retval] BSTR* name
);
183 HRESULT Type
( [out, retval] NET_FW_SERVICE_TYPE
* type
);
186 HRESULT Customized
( [out, retval] VARIANT_BOOL* customized
);
189 HRESULT IpVersion
( [out, retval] NET_FW_IP_VERSION
* ipVersion
);
192 HRESULT IpVersion
( [in] NET_FW_IP_VERSION ipVersion
);
195 HRESULT Scope
( [out, retval] NET_FW_SCOPE
* scope
);
198 HRESULT Scope
( [in] NET_FW_SCOPE scope
);
201 HRESULT RemoteAddresses
( [out, retval] BSTR* remoteAddrs
);
204 HRESULT RemoteAddresses
( [in] BSTR remoteAddrs
);
207 HRESULT Enabled
( [out, retval] VARIANT_BOOL* enabled
);
210 HRESULT Enabled
( [in] VARIANT_BOOL enabled
);
213 HRESULT GloballyOpenPorts
( [out, retval] INetFwOpenPorts
** openPorts
);
218 uuid(79649BB4
-903E-421B
-94C9
-79848E79F6EE
),
221 interface INetFwServices
: IDispatch
224 HRESULT Count
( [out, retval] long* count
);
227 HRESULT Item
( [in] NET_FW_SERVICE_TYPE svcType
,
228 [out, retval] INetFwService
** service
);
230 [id(DISPID_NEWENUM
), propget, restricted]
231 HRESULT _NewEnum
( [out, retval] IUnknown
** newEnum
);
236 uuid(B5E64FFA
-C2C5
-444E
-A301
-FB5E00018050
),
239 interface INetFwAuthorizedApplication
: IDispatch
242 HRESULT Name
( [out, retval] BSTR* name
);
245 HRESULT Name
( [in] BSTR name
);
248 HRESULT ProcessImageFileName
( [out, retval] BSTR* imageFileName
);
251 HRESULT ProcessImageFileName
( [in] BSTR imageFileName
);
254 HRESULT IpVersion
( [out, retval] NET_FW_IP_VERSION
* ipVersion
);
257 HRESULT IpVersion
( [in] NET_FW_IP_VERSION ipVersion
);
260 HRESULT Scope
( [out, retval] NET_FW_SCOPE
* scope
);
263 HRESULT Scope
( [in] NET_FW_SCOPE scope
);
266 HRESULT RemoteAddresses
( [out, retval] BSTR* remoteAddrs
);
269 HRESULT RemoteAddresses
( [in] BSTR remoteAddrs
);
272 HRESULT Enabled
( [out, retval] VARIANT_BOOL* enabled
);
275 HRESULT Enabled
( [in] VARIANT_BOOL enabled
);
280 uuid(D4BECDDF
-6F73
-4A83
-B832
-9C66874CD20E
),
283 interface INetFwRemoteAdminSettings
: IDispatch
286 HRESULT IpVersion
( [out, retval] NET_FW_IP_VERSION
* ipVersion
);
289 HRESULT IpVersion
( [in] NET_FW_IP_VERSION ipVersion
);
292 HRESULT Scope
( [out, retval] NET_FW_SCOPE
* scope
);
295 HRESULT Scope
( [in] NET_FW_SCOPE scope
);
298 HRESULT RemoteAddresses
( [out, retval] BSTR* remoteAddrs
);
301 HRESULT RemoteAddresses
( [in] BSTR remoteAddrs
);
304 HRESULT Enabled
( [out, retval] VARIANT_BOOL* enabled
);
307 HRESULT Enabled
( [in] VARIANT_BOOL enabled
);
313 uuid(644EFD52
-CCF9
-486C
-97A2
-39F352570B30
),
316 interface INetFwAuthorizedApplications
: IDispatch
319 HRESULT Count
( [out, retval] long* count
);
322 HRESULT Add
( [in] INetFwAuthorizedApplication
* app
);
325 HRESULT Remove
( [in] BSTR imageFileName
);
328 HRESULT Item
( [in] BSTR imageFileName
,
329 [out, retval] INetFwAuthorizedApplication
** app
);
331 [id(DISPID_NEWENUM
), propget, restricted]
332 HRESULT _NewEnum
( [out, retval] IUnknown
** newEnum
);
338 uuid(af230d27
-baba
-4e42
-aced
-f524f22cfce2
),
341 interface INetFwRule
: IDispatch
344 HRESULT Name
( [out, retval] BSTR *name
);
346 HRESULT Name
( [in] BSTR name
);
349 HRESULT Description
( [out, retval] BSTR* desc
);
351 HRESULT Description
( [in] BSTR desc
);
354 HRESULT ApplicationName
( [out, retval] BSTR *imagename
);
356 HRESULT ApplicationName
( [in] BSTR imagename
);
359 HRESULT ServiceName
( [out, retval] BSTR *service
);
361 HRESULT ServiceName
( [in] BSTR service
);
364 HRESULT Protocol
( [out, retval] long* protocol
);
366 HRESULT Protocol
( [in] long protocol
);
369 HRESULT LocalPorts
( [out, retval] BSTR* ports
);
371 HRESULT LocalPorts
( [in] BSTR ports
);
374 HRESULT RemotePorts
( [out, retval] BSTR *ports
);
376 HRESULT RemotePorts
( [in] BSTR ports
);
379 HRESULT LocalAddresses
([out, retval] BSTR* address
);
381 HRESULT LocalAddresses
([in] BSTR address
);
384 HRESULT RemoteAddresses
( [out, retval] BSTR* address
);
386 HRESULT RemoteAddresses
( [in] BSTR address
);
389 HRESULT IcmpTypesAndCodes
( [out, retval] BSTR *codes
);
391 HRESULT IcmpTypesAndCodes
( [in] BSTR codes
);
394 HRESULT Direction
( [out, retval] NET_FW_RULE_DIRECTION
* dir
);
396 HRESULT Direction
( [in] NET_FW_RULE_DIRECTION dir
);
399 HRESULT Interfaces
( [out, retval] VARIANT* interfaces
);
401 HRESULT Interfaces
( [in] VARIANT interfaces
);
404 HRESULT InterfaceTypes
( [out, retval] BSTR* types
);
406 HRESULT InterfaceTypes
( [in] BSTR types
);
409 HRESULT Enabled
( [out, retval] VARIANT_BOOL* enabled
);
411 HRESULT Enabled
( [in] VARIANT_BOOL enabled
);
414 HRESULT Grouping
( [out, retval] BSTR* context
);
416 HRESULT Grouping
( [in] BSTR context
);
419 HRESULT Profiles
( [out, retval] long* profiles
);
421 HRESULT Profiles
( [in] long profiles
);
424 HRESULT EdgeTraversal
( [out, retval] VARIANT_BOOL* enabled
);
426 HRESULT EdgeTraversal
( [in] VARIANT_BOOL enabled
);
429 HRESULT Action
( [out, retval] NET_FW_ACTION
* action
);
431 HRESULT Action
( [in] NET_FW_ACTION action
);
437 uuid(9C27C8DA
-189B
-4DDE
-89F7
-8B39A316782C
),
440 interface INetFwRule2
: INetFwRule
443 HRESULT EdgeTraversalOptions
( [out, retval] long* lOptions
);
445 HRESULT EdgeTraversalOptions
( [in] long lOptions
);
451 uuid(B21563FF
-D696
-4222-AB46
-4E89B73AB34A
),
454 interface INetFwRule3
: INetFwRule2
457 HRESULT LocalAppPackageId
( [out, retval] BSTR* wszPackageId
);
459 HRESULT LocalAppPackageId
( [in] BSTR wszPackageId
);
462 HRESULT LocalUserOwner
( [out, retval] BSTR* wszUserOwner
);
464 HRESULT LocalUserOwner
( [in] BSTR wszUserOwner
);
467 HRESULT LocalUserAuthorizedList
( [out, retval] BSTR* wszUserAuthList
);
469 HRESULT LocalUserAuthorizedList
( [in] BSTR wszUserAuthList
);
472 HRESULT RemoteUserAuthorizedList
( [out, retval] BSTR* wszUserAuthList
);
474 HRESULT RemoteUserAuthorizedList
( [in] BSTR wszUserAuthList
);
477 HRESULT RemoteMachineAuthorizedList
( [out, retval] BSTR* wszUserAuthList
);
479 HRESULT RemoteMachineAuthorizedList
( [in] BSTR wszUserAuthList
);
482 HRESULT SecureFlags
( [out, retval] long* lOptions
);
484 HRESULT SecureFlags
( [in] long lOptions
);
490 uuid(9c4c6277
-5027-441e
-afae
-ca1f542da009
),
493 interface INetFwRules
: IDispatch
496 HRESULT Count
( [out, retval] long* count
);
499 HRESULT Add
( [in] INetFwRule
* rule
);
502 HRESULT Remove
( [in] BSTR name
);
505 HRESULT Item
( [in] BSTR name
, [out, retval] INetFwRule
** rule
);
507 [id(DISPID_NEWENUM
), propget, restricted]
508 HRESULT _NewEnum
( [out, retval] IUnknown
** newEnum
);
514 uuid(8267bbe3
-f890
-491c
-b7b6
-2db1ef0e5d2b
),
517 interface INetFwServiceRestriction
: IDispatch
520 HRESULT RestrictService
( [in] BSTR serviceName
, [in] BSTR appName
,
521 [in] VARIANT_BOOL restrictService
, [in] VARIANT_BOOL serviceSidRestricted
);
524 HRESULT ServiceRestricted
( [in] BSTR serviceName
, [in] BSTR appName
,
525 [out, retval] VARIANT_BOOL* serviceRestricted
);
528 HRESULT Rules
( [out, retval] INetFwRules
** rules
);
533 uuid(174A0DDA
-E9F9
-449D
-993B
-21AB667CA456
),
536 interface INetFwProfile
: IDispatch
539 HRESULT Type
( [out, retval] NET_FW_PROFILE_TYPE
* type
);
542 HRESULT FirewallEnabled
( [out, retval] VARIANT_BOOL* enabled
);
545 HRESULT FirewallEnabled
( [in] VARIANT_BOOL enabled
);
548 HRESULT ExceptionsNotAllowed
( [out, retval] VARIANT_BOOL* notAllowed
);
551 HRESULT ExceptionsNotAllowed
( [in] VARIANT_BOOL notAllowed
);
554 HRESULT NotificationsDisabled
( [out, retval] VARIANT_BOOL* disabled
);
557 HRESULT NotificationsDisabled
( [in] VARIANT_BOOL disabled
);
560 HRESULT UnicastResponsesToMulticastBroadcastDisabled
( [out, retval] VARIANT_BOOL* disabled
);
563 HRESULT UnicastResponsesToMulticastBroadcastDisabled
( [in] VARIANT_BOOL disabled
);
566 HRESULT RemoteAdminSettings
( [out, retval] INetFwRemoteAdminSettings
** remoteAdminSettings
);
569 HRESULT IcmpSettings
( [out, retval] INetFwIcmpSettings
** icmpSettings
);
572 HRESULT GloballyOpenPorts
( [out, retval] INetFwOpenPorts
** openPorts
);
575 HRESULT Services
( [out, retval] INetFwServices
** services
);
578 HRESULT AuthorizedApplications
( [out, retval] INetFwAuthorizedApplications
** apps
);
583 uuid(D46D2478
-9AC9
-4008-9DC7
-5563CE5536CC
),
586 interface INetFwPolicy
: IDispatch
589 HRESULT CurrentProfile
( [out, retval] INetFwProfile
** profile
);
592 HRESULT GetProfileByType
( [in] NET_FW_PROFILE_TYPE profileType
,
593 [out, retval] INetFwProfile
** profile
);
599 uuid(98325047-c671
-4174-8d81
-defcd3f03186
),
602 interface INetFwPolicy2
: IDispatch
605 HRESULT CurrentProfileTypes
( [out, retval] long *profile
);
608 HRESULT FirewallEnabled
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] VARIANT_BOOL* enabled
);
611 HRESULT FirewallEnabled
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] VARIANT_BOOL enabled
);
614 HRESULT ExcludedInterfaces
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] VARIANT *interfaces
);
617 HRESULT ExcludedInterfaces
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] VARIANT interfaces
);
620 HRESULT BlockAllInboundTraffic
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] VARIANT_BOOL* block
);
623 HRESULT BlockAllInboundTraffic
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] VARIANT_BOOL block
);
626 HRESULT NotificationsDisabled
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] VARIANT_BOOL* disabled
);
628 HRESULT NotificationsDisabled
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] VARIANT_BOOL disabled
);
631 HRESULT UnicastResponsesToMulticastBroadcastDisabled
( [in] NET_FW_PROFILE_TYPE2 profileType
,
632 [out, retval] VARIANT_BOOL* disabled
);
634 HRESULT UnicastResponsesToMulticastBroadcastDisabled
( [in] NET_FW_PROFILE_TYPE2 profileType
,
635 [in] VARIANT_BOOL disabled
);
638 HRESULT Rules
( [out, retval] INetFwRules
** rules
);
641 HRESULT ServiceRestriction
( [out, retval] INetFwServiceRestriction
**ServiceRestriction
);
644 HRESULT EnableRuleGroup
( [in] long profileTypesBitmask
, [in] BSTR group
, [in] VARIANT_BOOL enable
);
647 HRESULT IsRuleGroupEnabled
( [in] long profileTypesBitmask
, [in] BSTR group
, [out, retval] VARIANT_BOOL *enabled
);
650 HRESULT RestoreLocalFirewallDefaults
();
653 HRESULT DefaultInboundAction
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] NET_FW_ACTION
* action
);
656 HRESULT DefaultInboundAction
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] NET_FW_ACTION action
);
659 HRESULT DefaultOutboundAction
( [in] NET_FW_PROFILE_TYPE2 profileType
, [out, retval] NET_FW_ACTION
* action
);
662 HRESULT DefaultOutboundAction
( [in] NET_FW_PROFILE_TYPE2 profileType
, [in] NET_FW_ACTION action
);
665 HRESULT IsRuleGroupCurrentlyEnabled
( [in] BSTR group
, [out, retval] VARIANT_BOOL* enabled
);
668 HRESULT LocalPolicyModifyState
( [out, retval] NET_FW_MODIFY_STATE
* modifyState
);
673 uuid(F7898AF5
-CAC4
-4632-A2EC
-DA06E5111AF2
),
676 interface INetFwMgr
: IDispatch
679 HRESULT LocalPolicy
( [out, retval] INetFwPolicy
** localPolicy
);
682 HRESULT CurrentProfileType
( [out, retval] NET_FW_PROFILE_TYPE
* profileType
);
685 HRESULT RestoreDefaults
();
688 HRESULT IsPortAllowed
( [in] BSTR imageFileName
, [in] NET_FW_IP_VERSION ipVersion
,
689 [in] LONG portNumber
, [in] BSTR localAddress
,
690 [in] NET_FW_IP_PROTOCOL ipProtocol
, [out] VARIANT* allowed
,
691 [out] VARIANT* restricted );
694 HRESULT IsIcmpTypeAllowed
( [in] NET_FW_IP_VERSION ipVersion
, [in] BSTR localAddress
,
695 [in] BYTE type
, [out] VARIANT* allowed
,
696 [out] VARIANT* restricted );
702 uuid(71881699-18f4
-458b
-b892
-3ffce5e07f75
),
705 interface INetFwProduct
: IDispatch
708 HRESULT RuleCategories
([out, retval] VARIANT *ruleCategories
);
711 HRESULT RuleCategories
([in] VARIANT ruleCategories
);
714 HRESULT DisplayName
([out, retval] BSTR *displayName
);
717 HRESULT DisplayName
([in] BSTR displayName
);
720 HRESULT PathToSignedProductExe
([out, retval] BSTR *path
);
726 uuid(39eb36e0
-2097-40bd
-8af2
-63a13b525362
),
729 interface INetFwProducts
: IDispatch
732 HRESULT Count
([out, retval] LONG *count
);
735 HRESULT Register
([in] INetFwProduct
*product
, [out, retval] IUnknown
**registration
);
738 HRESULT Item
([in] LONG index
, [out, retval] INetFwProduct
**product
);
740 [id(DISPID_NEWENUM
), propget, restricted]
741 HRESULT _NewEnum
([out, retval] IUnknown
**newEnum
);
745 uuid(DB4F3345
-3EF8
-45ED
-B976
-25A6D3B81B71
),
748 library NetFwPublicTypeLib
750 importlib
("stdole2.tlb");
751 interface INetFwRemoteAdminSettings
;
752 interface INetFwIcmpSettings
;
753 interface INetFwOpenPort
;
754 interface INetFwOpenPorts
;
755 interface INetFwService
;
756 interface INetFwServices
;
757 interface INetFwAuthorizedApplication
;
758 interface INetFwAuthorizedApplications
;
759 interface INetFwServiceRestriction
;
760 interface INetFwRule
;
761 interface INetFwRules
;
762 interface INetFwProfile
;
763 interface INetFwPolicy
;
764 interface INetFwPolicy2
;
766 interface INetFwProduct
;
767 interface INetFwProducts
;
770 uuid(0CA545C6
-37AD
-4A6C
-BF92
-9F7610067EF5
)
772 coclass NetFwOpenPort
774 [default] interface INetFwOpenPort
;
778 uuid(EC9846B3
-2762-4A6B
-A214
-6ACB603462D2
)
780 coclass NetFwAuthorizedApplication
782 [default] interface INetFwAuthorizedApplication
;
786 uuid(304CE942
-6E39
-40D8
-943A
-B913C40C9CD4
)
790 [default] interface INetFwMgr
;
794 uuid(e2b3c97f
-6ae1
-41ac
-817a
-f6f92166d7dd
)
798 [default] interface INetFwPolicy2
;
802 uuid(2c5bc43e
-3369
-4c33
-ab0c
-be9469677af4
)
806 [default] interface INetFwRule
;
810 uuid(9d745ed8
-c514
-4d1d
-bf42
-751fed2d5ac7
)
814 [default] interface INetFwProduct
;
818 uuid(cc19079b
-8272-4d73
-bb70
-cdb533527b61
)
820 coclass NetFwProducts
822 [default] interface INetFwProducts
;