Header: #include <applibs/networking.h>
Enables or disables a network interface.
int Networking_SetInterfaceState(const char *networkInterfaceName, bool isEnabled);
networkInterfaceNameThe name of the network interface to update.
isEnabledtrue to enable the interface, false to disable it.
Returns -1 if an error is encountered and sets
errno to the error value.
EACCES: the application manifest does not include the NetworkConfig capability.
ENOENT: the network interface does not exist.
EPERM: this function is not allowed on the interface.
EAGAIN: the networking stack isn't ready yet.
EIO: the interface is inaccessible.
errno may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.
Returns 0 for success, or -1 for failure, in which case
errno is set to the error value.
Application manifest requirements
The application manifest must include the NetworkConfig capability.
Concepts and samples
If Wi-Fi is disabled through Networking_SetInterfaceState the Wi-Fi subsystem will be in "light sleep" mode. This should also shut down RF emissions. However, if you are required to limit emissions due to compliance or certifications, please ensure you test and perform your own measurements.
In designs where Wi-Fi is not required, the RF front-end components can be excluded from the hardware design. For more information, see Disable Wi-Fi RF front end on MT3620.
Submit and view feedback for