SetIpTTL (Compact 2013)
3/26/2014
This function sets the default Time to Live (TTL) value for the local device.
Syntax
DWORD SetIpTTL(
UINT nTTL
);
Parameters
- nTTL
[in] The new TTL value for the local device.
Return Value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Return code |
Description |
---|---|
ERROR_ACCESS_DENIED |
Access is denied. |
ERROR_INVALID_PARAMETER |
An invalid parameter was passed to the function. This error is returned if the nTTL parameter is invalid. |
Other |
Use FormatMessage to obtain the message string for the returned error. |
Remarks
The default TTL can also be set by using the SetIpStatistics function.
Requirements
Header |
iphlpapi.h |
Library |
Iphlpapi.lib |
See Also
Reference
IP Helper Functions
MIB_IPSTATS
SetIpStatistics
SetIpStatisticsEx