RtfwSetNetworkConfiguration
RtfwSetNetworkConfiguration sets the configuration of the RT-TCP/IP Stack.
Syntax
bool RtfwSetNetworkConfiguration( const RTFW_NETWORK_CONFIGURATION * pNetworkConfiguration, unsigned int reserved );
Parameters
pNetworkConfiguration
A pointer to a RTFW_NETWORK_CONFIGURATION structure that specifies the configuration of the RT-TCP/IP Stack. This value cannot be NULL, and the member Size must be set to sizeof(RTFW_NETWORK_CONFIGURATION), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
reserved
This parameter must always be zero.
Return Value
The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.
Possible error codes:
Error Code | Meaning |
---|---|
RT_ERROR_RESTART_NETWORK |
The RT-TCP/IP Stack was running when this function succeeded. RtfwRestartRequired will report that the RT-TCP/IP Stack must be restarted. NOTE: The RT-TCP/IP Stack must be restarted for the changes to take effect. |
RT_ERROR_STRUCTURE_TOO_SMALL | The Size member of a structure is too small. |
Remarks
The following is the best practice for using Native Library Get/Set APIs that take structures as arguments:
- Call the Get function.
- Modify the value(s) you want to change.
- Call the corresponding Set function.
The values passed in by the Set function will be saved (persistent).
Requirements
Minimum Required Version | RTX64 3.4 |
Header | RtfwAPI.h |
Library | RtfwAPI.lib |
See Also: