Filter results by

Older Versions

Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.

artik_network_module Struct Reference

Network module operations. More...

#include <connectivity/artik_network.h>

Data Fields

artik_error(* set_network_config )(artik_network_config *config, artik_network_interface_t interface)
 Set network configuration. More...
 
artik_error(* get_network_config )(artik_network_config *config, artik_network_interface_t interface)
 Get current network configuration. More...
 
artik_error(* get_current_public_ip )(artik_network_ip *ip)
 Get current public IP. More...
 
artik_error(* dhcp_client_start )(artik_network_dhcp_client_handle *handle, artik_network_interface_t interface)
 Start the DHCP client service. More...
 
artik_error(* dhcp_client_stop )(artik_network_dhcp_client_handle handle)
 Stop the DHCP client service. More...
 
artik_error(* dhcp_server_start )(artik_network_dhcp_server_handle *handle, artik_network_dhcp_server_config *config)
 Start the DHCP server. More...
 
artik_error(* dhcp_server_stop )(artik_network_dhcp_server_handle handle)
 Stop the DHCP server. More...
 
artik_error(* get_online_status )(bool *online_status)
 Get network online status. More...
 
artik_error(* add_watch_online_status )(watch_online_status_handle *handle, watch_online_status_callback func, void *user_data)
 Add a registered callback that watches online status. More...
 
artik_error(* remove_watch_online_status )(watch_online_status_handle handle)
 Remove a registered callback. More...
 

Detailed Description

Structure containing all the operations exposed by the network module

Examples:
network_test/artik_dhcp_client_test.c, network_test/artik_dhcp_server_test.c, and network_test/artik_network_test.c.

Definition at line 181 of file artik_network.h.

Field Documentation

artik_error(* artik_network_module::add_watch_online_status) (watch_online_status_handle *handle, watch_online_status_callback func, void *user_data)

Call callback function when online status change.

Parameters
[out]handleHandle reference of the registered callback
[in]funcThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 302 of file artik_network.h.

artik_error(* artik_network_module::dhcp_client_start) (artik_network_dhcp_client_handle *handle, artik_network_interface_t interface)
Parameters
[out]handleHandle returned by the API for later reference to the service
[in]interfaceThe network interface onto which to start the DHCP client
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_dhcp_client_test.c.

Definition at line 236 of file artik_network.h.

artik_error(* artik_network_module::dhcp_client_stop) (artik_network_dhcp_client_handle handle)
Parameters
[in]handleHandle returned by the API when calling dhcp_client_start
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_dhcp_client_test.c.

Definition at line 249 of file artik_network.h.

artik_error(* artik_network_module::dhcp_server_start) (artik_network_dhcp_server_handle *handle, artik_network_dhcp_server_config *config)
Parameters
[out]handleHandle returned by the API for later reference to the service
[in]configConfiguration of the DHCP server
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_dhcp_server_test.c.

Definition at line 262 of file artik_network.h.

artik_error(* artik_network_module::dhcp_server_stop) (artik_network_dhcp_server_handle handle)
Parameters
[in]handleHandle returned by the API when calling dhcp_server_start.
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_dhcp_server_test.c.

Definition at line 275 of file artik_network.h.

artik_error(* artik_network_module::get_current_public_ip) (artik_network_ip *ip)
Parameters
[out]ipPointer to an IP structure filled up by the function with the current public IP of the running device
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 224 of file artik_network.h.

artik_error(* artik_network_module::get_network_config) (artik_network_config *config, artik_network_interface_t interface)
Parameters
[out]configPointer to a network config structure filled up by the function with the given interface
[in]interfaceThe network interface in order to retrieve the current configuration
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 210 of file artik_network.h.

artik_error(* artik_network_module::get_online_status) (bool *online_status)
Parameters
[out]online_statusPointer to an integer filled up by the function with the current online status
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 287 of file artik_network.h.

artik_error(* artik_network_module::remove_watch_online_status) (watch_online_status_handle handle)
Parameters
[in]handleReference to the registered callback
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 314 of file artik_network.h.

artik_error(* artik_network_module::set_network_config) (artik_network_config *config, artik_network_interface_t interface)
Parameters
[in]configPointer to a network config structure filled up by the function with the given interface. MAC address will be not taken into account.
[in]interfaceThe network interface whose configuration is to be set
Returns
S_OK on success, error code otherwise
Examples:
network_test/artik_network_test.c.

Definition at line 194 of file artik_network.h.


The documentation for this struct was generated from the following file:
Last updated on: