RtfwSetTCPIPLocalMemoryConfiguration

RtfwSetTCPIPLocalMemoryConfiguration specifies the local memory configuration of the RT-TCP/IP Stack.

Syntax

bool RtfwSetTCPIPLocalMemoryConfiguration(
    RTFW_TCPIP_CONFIGURATION * pConfiguration,
);

Parameters

pConfiguration

A pointer to a RTFW_NETWORK_LOCAL_MEMORY_CONFIGURATION structure that specifies the local memory configuration of the RT-TCP/IP Stack. The member Size must be set to sizeof(RTFW_NETWORK_LOCAL_MEMORY_CONFIGURATION), otherwise this API fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.

Return Value

The function returns true if it succeeds. Otherwise, it returns false, sets the last error value, and does not fill in the structure pointed to by pConfiguration with valid member values. Call GetLastError for additional error information.

Possible error codes:

Error Code Meaning
RT_ERROR_RESTART_TCPIP The RT-TCP/IP Stack must be restarted for 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:

  1. Call the Get function.
  2. Modify the value(s) you want to change.
  3. Call the corresponding Set function.
  4. 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 Subsystem is running when the RtfwGetLocalMemoryConfiguration API is called, the values returned by this function may differ from the values currently in use by the Subsystem.

Requirements

Minimum Required Version RTX64 4.0
Header RtfwAPI.h
Library RtfwAPI.lib

See Also:

RTFW_NETWORK_LOCAL_MEMORY_CONFIGURATION

RtfwGetTCPIPLocalMemoryConfiguration