Morse Micro IoT SDK  2.9.7

Detailed Description

Modules

 ip configuration variables
 

Data Structures

struct  mmagic_core_ip_status_rsp_args
 Response arguments structure for ip_status. More...
 
struct  mmagic_core_ip_enable_tcp_keepalive_offload_cmd_args
 Command arguments structure for ip_enable_tcp_keepalive_offload. More...
 
struct  mmagic_core_ip_set_whitelist_filter_cmd_args
 Command arguments structure for ip_set_whitelist_filter. More...
 
struct  mmagic_ip_link_status_event_args
 Event arguments structure for ip_link_status. More...
 

Typedefs

typedef void(* mmagic_ip_link_status_event_handler_t) (const struct mmagic_ip_link_status_event_args *event_args, void *arg)
 Handler for the ip-link_status event. More...
 

Functions

static enum mmagic_status mmagic_controller_ip_status (struct mmagic_controller *controller, struct mmagic_core_ip_status_rsp_args *rsp_args)
 Gets the status of the IP stack. More...
 
static enum mmagic_status mmagic_controller_ip_reload (struct mmagic_controller *controller)
 Reloads the IP stack network configuration based on the current values in the subsystem config. More...
 
static enum mmagic_status mmagic_controller_ip_enable_tcp_keepalive_offload (struct mmagic_controller *controller, struct mmagic_core_ip_enable_tcp_keepalive_offload_cmd_args *cmd_args)
 Enables sending periodic TCP keep-alive packets by the morse chip allowing the TCP connection to be maintained without waking up the host processor. More...
 
static enum mmagic_status mmagic_controller_ip_disable_tcp_keepalive_offload (struct mmagic_controller *controller)
 Disables sending of TCP keepalive packets. More...
 
static enum mmagic_status mmagic_controller_ip_set_whitelist_filter (struct mmagic_controller *controller, struct mmagic_core_ip_set_whitelist_filter_cmd_args *cmd_args)
 Sets the whitelist filter specifing which incoming packets can wake the system from standby mode. More...
 
static enum mmagic_status mmagic_controller_ip_clear_whitelist_filter (struct mmagic_controller *controller)
 Clears any applied whitelist filters. More...
 
void mmagic_controller_register_ip_link_status_handler (struct mmagic_controller *controller, mmagic_ip_link_status_event_handler_t handler, void *arg)
 Register a handler for the ip-link_status event. More...
 

Typedef Documentation

◆ mmagic_ip_link_status_event_handler_t

typedef void(* mmagic_ip_link_status_event_handler_t) (const struct mmagic_ip_link_status_event_args *event_args, void *arg)

Handler for the ip-link_status event.

Triggered when the IP stack has a valid address.

Note
This function will be invoked in the context of the controller data link thread and should perform minimal processing.
Warning
This function must not invoke any mmagic API functions.
Parameters
event_argsNotication arguments received from the agent.
argOpaque argument that was provided when the callback was registered.

Definition at line 4100 of file mmagic_controller.h.

Function Documentation

◆ mmagic_controller_ip_clear_whitelist_filter()

static enum mmagic_status mmagic_controller_ip_clear_whitelist_filter ( struct mmagic_controller *  controller)
inlinestatic

Clears any applied whitelist filters.

Parameters
controllerReference to the controller handle.
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 4060 of file mmagic_controller.h.

◆ mmagic_controller_ip_disable_tcp_keepalive_offload()

static enum mmagic_status mmagic_controller_ip_disable_tcp_keepalive_offload ( struct mmagic_controller *  controller)
inlinestatic

Disables sending of TCP keepalive packets.

Parameters
controllerReference to the controller handle.
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 3984 of file mmagic_controller.h.

◆ mmagic_controller_ip_enable_tcp_keepalive_offload()

static enum mmagic_status mmagic_controller_ip_enable_tcp_keepalive_offload ( struct mmagic_controller *  controller,
struct mmagic_core_ip_enable_tcp_keepalive_offload_cmd_args cmd_args 
)
inlinestatic

Enables sending periodic TCP keep-alive packets by the morse chip allowing the TCP connection to be maintained without waking up the host processor.

This needs to be enabled before opening a TCP connection. As of now, this feature will work only on the first TCP connection opened after this command.

Parameters
controllerReference to the controller handle.
[in]cmd_argsCommand arguments
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 3955 of file mmagic_controller.h.

◆ mmagic_controller_ip_reload()

static enum mmagic_status mmagic_controller_ip_reload ( struct mmagic_controller *  controller)
inlinestatic

Reloads the IP stack network configuration based on the current values in the subsystem config.

Parameters
controllerReference to the controller handle.
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 3916 of file mmagic_controller.h.

◆ mmagic_controller_ip_set_whitelist_filter()

static enum mmagic_status mmagic_controller_ip_set_whitelist_filter ( struct mmagic_controller *  controller,
struct mmagic_core_ip_set_whitelist_filter_cmd_args cmd_args 
)
inlinestatic

Sets the whitelist filter specifing which incoming packets can wake the system from standby mode.

Parameters
controllerReference to the controller handle.
[in]cmd_argsCommand arguments
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 4031 of file mmagic_controller.h.

◆ mmagic_controller_ip_status()

static enum mmagic_status mmagic_controller_ip_status ( struct mmagic_controller *  controller,
struct mmagic_core_ip_status_rsp_args rsp_args 
)
inlinestatic

Gets the status of the IP stack.

Parameters
controllerReference to the controller handle.
[out]rsp_argsPointer to the data structure to be filled out with the result. If the If the return code is not MMAGIC_STATUS_OK then the contents of this structure will be undefined.
Returns
MMAGIC_STATUS_OK else an appropriate error code.

Definition at line 3890 of file mmagic_controller.h.

◆ mmagic_controller_register_ip_link_status_handler()

void mmagic_controller_register_ip_link_status_handler ( struct mmagic_controller *  controller,
mmagic_ip_link_status_event_handler_t  handler,
void *  arg 
)

Register a handler for the ip-link_status event.

Triggered when the IP stack has a valid address.

Note
The handler callbacks will be invoked in the context of the controller data link thread. The handler should perform minimal processing.
Warning
The handler callback must not invoke any mmagic API functions.
Parameters
controllerReference to the the controller handle.
handlerThe handler function to register.
argOpaque argument to be passed to the handler when it is invoked.