The InitializeIpForwardEntry function initializes a MIB_IPFORWARD_ROW2 structure with default values for an IP route entry on a local computer.
VOID NETIOAPI_API_ InitializeIpForwardEntry( _Out_ PMIB_IPFORWARD_ROW2 Row );
On entry, a pointer to a MIB_IPFORWARD_ROW2 structure entry for an IP route entry.
On return, the MIB_IPFORWARD_ROW2 structure that this parameter points to is initialized with default values for an IP route entry.
Your driver must use the InitializeIpForwardEntry function 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, your driver must pass InitializeIpForwardEntry a new MIB_IPFORWARD_ROW2 structure to initialize.
On output, the members of the MIB_IPFORWARD_ROW2 structure that the Row parameter points to are initialized as follows.
ValidLifetime and PreferredLifetime
Set to an infinite value,
Loopback, AutoconfigureAddress, Publish, and Immortal
Set to TRUE.
SitePrefixLength, Metric, and Protocol
Set to illegal values.
All other members
Set to zero.
After a driver calls InitializeIpForwardEntry, the driver can then change the members in the MIB_IPFORWARD_ROW2 entry that it wants to modify, and then call the CreateIpForwardEntry2 to add the new IP route entry to the local computer.
Available in Windows Vista and later versions of the Windows operating systems.
|Netioapi.h (include Netioapi.h)|