Export (0) Print
Expand All
Expand Minimize

InitializeIpForwardEntry function

The InitializeIpForwardEntry function initializes a MIB_IPFORWARD_ROW2 structure with default values for an IP route entry on the local computer.

Syntax


VOID InitializeIpForwardEntry(
  _Out_  PMIB_IPFORWARD_ROW2 Row
);

Parameters

Row [out]

On entry, a pointer to a MIB_IPFORWARD_ROW2 structure entry for an IP route entry. On return, the MIB_IPFORWARD_ROW2 structure pointed to by this parameter is initialized with default values for an IP route entry.

Return value

This function does not return a value.

Remarks

The InitializeIpForwardEntry function is defined on Windows Vista and later.

The InitializeIpForwardEntry function must be used to initialize the members of a MIB_IPFORWARD_ROW2 structure entry with default values for an IP route entry for later use with the CreateIpForwardEntry2 function.

On input, InitializeIpForwardEntry must be passed a new MIB_IPFORWARD_ROW2 structure to initialize.

On output, the ValidLifetime and PreferredLifetime members of the MIB_IPFORWARD_ROW2 structure pointed to by Row parameter will be initialized to infinite and the Loopback, AutoconfigureAddress, Publish, and Immortal members will be initialized to TRUE. In addition, the SitePrefixLength, Metric, and Protocol members are set to an illegal value and other fields are initialized to zero.

After calling InitializeIpForwardEntry, an application can then change the members in the MIB_IPFORWARD_ROW2 entry it wishes to modify, and then call the CreateIpForwardEntry2 to add the new IP route entry to the local computer.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netioapi.h (include Iphlpapi.h)

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

CreateIpForwardEntry2
DeleteIpForwardEntry2
GetBestRoute2
GetIpForwardEntry2
GetIpForwardTable2
MIB_IPFORWARD_ROW2
MIB_IPFORWARD_TABLE2
NotifyRouteChange2
SetIpForwardEntry2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft