TCPIP_STACK_Initialize Function

C

SYS_MODULE_OBJ TCPIP_STACK_Initialize(
    const SYS_MODULE_INDEX index, 
    const SYS_MODULE_INIT * const init
);

Description

This function initializes the stack. If an error occurs, the SYS_ERROR() is called and the function deinitializes itself.

Preconditions

None.

Parameters

ParametersDescription
indexIndex of the TCP/IP stack to be initialized.
initPointer to initialization data. It should be a TCPIP_STACK_INIT structure carrying the following data: - pNetConf - Pointer to an array of TCPIP_NETWORK_CONFIG to support - nNets - Number of network configurations in the array - pModConfig - Pointer to an array of TCPIP_STACK_MODULE_CONFIG - nModules - Number of modules to initialize

Returns

  • Valid handle to a driver object, if successful.

  • SYS_MODULE_OBJ_INVALID, if initialization failed.

Remarks

This function must be called before any of the stack or its component routines are used.

New TCPIP_NETWORK_CONFIG types could be added/removed at run time for implementations that support dynamic network interface creation.

Only one instance of the TCP/IP stack can run in the system and the index parameter is irrelevant.

If this call is made after the stack is successfully initialized, the current TCP/IP stack object handle will be returned.