IpHlpApiSetIpStatisticsEx Method

Toggles IP forwarding on or off and sets the default time-to-live (TTL) value for the local computer.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("IpHlpApi.dll", ExactSpelling = true)]
public static Win32ErrorCode SetIpStatisticsEx(
	ref IpStats refIpStats,
	AddressFamily family
)

Parameters

refIpStats  IpStats
A IpStats structure.

The caller should set the Forwarding and DefaultTTL members of this structure to the new values.

To keep one of the members at its current value, use MIB_USE_CURRENT_TTL or UseCurrentForwarding.

family  AddressFamily
The address family for which forwarding and TTL is to be set.

The values currently supported are InterNetwork, and InterNetworkV6.

Return Value

Win32ErrorCode
If this function succeeds, it returns ERROR_SUCCESS. Otherwise, it returns an Win32ErrorCode error code.

Remarks

See Also