Rtos API example

Embed: (wiki syntax)

« Back to documentation index

dns_api_msg Struct Reference

dns_api_msg Struct Reference

As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, it has its own struct (to avoid struct api_msg getting bigger than necessary). More...

#include <api_msg.h>

Public Member Functions

ip_addr_t API_MSG_M_DEF (addr)
 The resolved address is stored here.
sys_sem_t API_MSG_M_DEF_SEM (sem)
 This semaphore is posted when the name is resolved, the application thread should wait on it.
err_t API_MSG_M_DEF (err)
 Errors are given back here.

Data Fields

char name [DNS_MAX_NAME_LENGTH]
 Hostname to query or dotted IP address string.
u8_t dns_addrtype
 Type of resolve call.

Detailed Description

As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, it has its own struct (to avoid struct api_msg getting bigger than necessary).

lwip_netconn_do_gethostbyname must be called using tcpip_callback instead of tcpip_apimsg (see netconn_gethostbyname).

Definition at line 159 of file api_msg.h.


Member Function Documentation

ip_addr_t API_MSG_M_DEF ( addr   )

The resolved address is stored here.

err_t API_MSG_M_DEF ( err   )

Errors are given back here.

sys_sem_t API_MSG_M_DEF_SEM ( sem   )

This semaphore is posted when the name is resolved, the application thread should wait on it.


Field Documentation

Type of resolve call.

Definition at line 170 of file api_msg.h.

char name[DNS_MAX_NAME_LENGTH]

Hostname to query or dotted IP address string.

Definition at line 162 of file api_msg.h.