Partager via


IPv6EnableFirewallHook function

The IPv6EnableFirewallHook function enables an IPv6 firewall-hook driver's FirewallHook function.

Syntax

NTSTATUS IPv6EnableFirewallHook(
  _In_ IPv6FirewallHookProc FirewallHookFunction
);

Parameters

  • FirewallHookFunction [in]
    A pointer to an IPv6 firewall-hook driver-provided FirewallHook function. After it's enabled, the IPv6 network stack calls this function with each received or transmitted IPv6 packet.

    This parameter is required and must not be NULL.

Return value

IPv6EnableFirewallHook returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS

The IPv6 firewall-hook driver's FirewallHook function was successfully enabled.

STATUS_INVALID_DEVICE_REQUEST

A FirewallHook function is already enabled in the IPv6 network stack. Only one FirewallHook function can be enabled at any time.

 

Remarks

An IPv6 firewall-hook driver calls the IPv6EnableFirewallHook function to enable the driver's FirewallHook function. After it's enabled, the IPv6 network stack calls the IPv6 firewall-hook driver's FirewallHook function with each received or transmitted IPv6 packet so that the IPv6 firewall-hook driver can determine if the packet is to be accepted or rejected.

An IPv6 firewall-hook driver calls the IPv6DisableFirewallHook function to disable a previously enabled FirewallHook function.

Requirements

Target platform

Desktop

Version

Available on Microsoft Windows XP with Service Pack 2 (SP2) and Windows Server 2003 with Service Pack 1 (SP1).

Header

Ip6firewall.h (include Ip6firewall.h)

Library

Tcpip6.lib

IRQL

Any level

See also

IPv6DisableFirewallHook

FirewallHook

 

 

Send comments about this topic to Microsoft