RtfwtcpipSetConfiguration
RtfwtcpipSetConfiguration sets the global configuration of the TCP/IP Stack.
Syntax
bool RtfwtcpipSetConfiguration(
[in] RTFW_TCPIP_CONFIGURATION * pConfiguration,
);
Parameters
[in] pConfiguration
A pointer to an RTFW_TCPIP_CONFIGURATION structure that specifies the configuration of the TCP/IP Stack. The member Size must be set to sizeof(RTFW_TCPIP_CONFIGURATION), otherwise this API fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
RT_ERROR_RESTART_NETWORK |
The TCP/IP Stack was running when this function succeeded. Note: The TCP/IP Stack must be restarted for the changes to take effect. |
|
RT_ERROR_STRUCTURE_TOO_SMALL |
The member Size 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.
- Check error returns to see if a component needs to be restarted.
The values passed in by the Set function will be saved (persistent).
If the TCP/IP Stack is running when RtfwSetTCPIPConfiguration is called, the values specified within the structure will not take effect until the TCP/IP Stack is restarted
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwtcpipApi.h |
RtfwtcpipApi.lib |
See Also: