Network Component
Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
|
Core system functions to be called by user. More...
Functions | |
netStatus | netInitialize (void) |
Initialize Network Component and interfaces. [not_thread-safe]. More... | |
netStatus | netUninitialize (void) |
De-initialize Network Component and interfaces. [not_thread-safe]. More... | |
const char * | netSYS_GetHostName (void) |
Retrieve localhost name. [thread-safe]. More... | |
netStatus | netSYS_SetHostName (const char *hostname) |
Set localhost name. [thread-safe]. More... | |
Core system functions to be called by user.
System Functions represent the core of the protocol stack. They form an operating system that calls all other protocol module functions. The functions require a CMSIS-RTOS compatible RTOS to run and are not reentrant.
The functions are part of the Network Component library and are defined in rl_net.h.
netStatus netInitialize | ( | void | ) |
Initialize Network Component and interfaces. [not_thread-safe].
The function netInitialize initializes the Network Core's system resources, protocols, threads and applications. Since the function also creates RTOS objects, the RTOS must be previously initialized.
Possible netStatus return values:
Code Example
const char * netSYS_GetHostName | ( | void | ) |
Retrieve localhost name. [thread-safe].
The function netSYS_GetHostName returns the name of the local host. The name is set with NET_HOST_NAME
in the Net_Config.c, and can be changed at runtime.
Code Example
netStatus netSYS_SetHostName | ( | const char * | hostname | ) |
Set localhost name. [thread-safe].
[in] | hostname | new localhost name, a null-terminated string. |
The function netSYS_SetHostName sets the name of the local host. Default name is set with NET_HOST_NAME
in the Net_Config.c, and can be changed at runtime.
The argument hostname is a pointer to the localhost name that is to be set, which is a null-terminated string. The function copies the content of the hostname to the localhost name. The maximum length of the hostname string is limited to 15 characters.
Possible netStatus return values:
Code Example
netStatus netUninitialize | ( | void | ) |
De-initialize Network Component and interfaces. [not_thread-safe].
The function netUninitialize de-initializes the Network Core's system resources, protocols, threads and applications. Network drivers are de-initialized and powered off. After calling this function the networking environment is in initial state. To use it again, you must call netInitialize function again.
Possible netStatus return values:
Code Example