Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Enumerations | Functions

** More...

Data Structures

struct  mc_mdns_service
 mDNS service info More...
 

Macros

#define MDNS_MAX_LABEL_LEN   63 /* defined by the standard */
 Maximum length of labels. More...
 
#define MDNS_MAX_NAME_LEN   255 /* defined by the standard : 255*/
 Maximum length of names. More...
 
#define MDNS_MAX_KEYVAL_LEN   255 /* defined by the standard : 255*/
 Maximum length of key/value pair. More...
 
#define MDNS_PROTO_TCP   0
 protocol values for the proto member of the mdns_service descriptor More...
 
#define MDNS_PROTO_UDP   1
 UDP Protocol. More...
 
#define MAX_MDNS_LST   5 /* Maximum no. of services */
 Maximum no. More...
 
#define ERR_MDNS_BASE   -36650
 Starting error code for all mdns errors. More...
 
#define ERR_MDNS_INVAL   -36651
 invalid argument More...
 
#define ERR_MDNS_BADSRC   -36652
 bad service descriptor More...
 
#define ERR_MDNS_TOOBIG   -36653
 not enough room for everything More...
 
#define ERR_MDNS_NOIMPL   -36654
 unimplemented feature More...
 
#define ERR_MDNS_NOMEM   -36655
 insufficient memory More...
 
#define ERR_MDNS_INUSE   -36656
 requested resource is in use More...
 
#define ERR_MDNS_NORESP   -36657
 requested resource is in use More...
 
#define ERR_MDNS_FSOC   -36658
 failed to create socket for mdns More...
 
#define ERR_MDNS_FREUSE   -36659
 failed to reuse multicast socket More...
 
#define ERR_MDNS_FBINDTODEVICE   -36660
 failed to bind mdns socket to device More...
 
#define ERR_MDNS_FBIND   -36661
 failed to bind mdns socket More...
 
#define ERR_MDNS_FMCAST_JOIN   -36662
 failed to join multicast socket More...
 
#define ERR_MDNS_FMCAST_SET   -36663
 failed to set multicast socket More...
 
#define ERR_MDNS_FQUERY_SOC   -36664
 failed to create query socket More...
 
#define ERR_MDNS_FQUERY_THREAD   -36665
 failed to create mdns thread More...
 
#define ERR_MDNS_END   -36670
 Last generic error code (inclusive) More...
 

Enumerations

Functions

int32_t MX_WIFI_MDNS_start (MX_WIFIObject_t *Obj, const char *domain, char *hostname)
 start mDNS service. More...
 
int32_t MX_WIFI_MDNS_stop (MX_WIFIObject_t *Obj)
 stop mDNS service. More...
 
int32_t MX_WIFI_MDNS_announce_service (MX_WIFIObject_t *Obj, struct mc_mdns_service *service, mwifi_if_t interface)
 announce a service. More...
 
int32_t MX_WIFI_MDNS_deannounce_service (MX_WIFIObject_t *Obj, struct mc_mdns_service *service, mwifi_if_t interface)
 deannounce a service. More...
 
int32_t MX_WIFI_MDNS_deannounce_service_all (MX_WIFIObject_t *Obj, mwifi_if_t interface)
 deannounce all services. More...
 
int32_t MX_WIFI_MDNS_iface_state_change (MX_WIFIObject_t *Obj, mwifi_if_t interface, enum iface_state state)
 Send interface state change event to mdns. More...
 
int32_t MX_WIFI_MDNS_set_hostname (MX_WIFIObject_t *Obj, char *hostname)
 Set new host name, use mdns_iface_state_change(interface, REANNOUNCE) to anounce the new host name. More...
 
int32_t MX_WIFI_MDNS_set_txt_rec (MX_WIFIObject_t *Obj, struct mc_mdns_service *service, char *keyvals, char separator)
 sets the TXT record field for a given mDNS service. More...
 

Detailed Description

**

mDNS related API **

Macro Definition Documentation

#define ERR_MDNS_BADSRC   -36652

bad service descriptor

Definition at line 1161 of file mx_wifi.h.

#define ERR_MDNS_BASE   -36650

Starting error code for all mdns errors.

Definition at line 1159 of file mx_wifi.h.

#define ERR_MDNS_END   -36670

Last generic error code (inclusive)

Definition at line 1175 of file mx_wifi.h.

#define ERR_MDNS_FBIND   -36661

failed to bind mdns socket

Definition at line 1170 of file mx_wifi.h.

#define ERR_MDNS_FBINDTODEVICE   -36660

failed to bind mdns socket to device

Definition at line 1169 of file mx_wifi.h.

#define ERR_MDNS_FMCAST_JOIN   -36662

failed to join multicast socket

Definition at line 1171 of file mx_wifi.h.

#define ERR_MDNS_FMCAST_SET   -36663

failed to set multicast socket

Definition at line 1172 of file mx_wifi.h.

#define ERR_MDNS_FQUERY_SOC   -36664

failed to create query socket

Definition at line 1173 of file mx_wifi.h.

#define ERR_MDNS_FQUERY_THREAD   -36665

failed to create mdns thread

Definition at line 1174 of file mx_wifi.h.

#define ERR_MDNS_FREUSE   -36659

failed to reuse multicast socket

Definition at line 1168 of file mx_wifi.h.

#define ERR_MDNS_FSOC   -36658

failed to create socket for mdns

Definition at line 1167 of file mx_wifi.h.

#define ERR_MDNS_INUSE   -36656

requested resource is in use

Definition at line 1165 of file mx_wifi.h.

#define ERR_MDNS_INVAL   -36651

invalid argument

Definition at line 1160 of file mx_wifi.h.

#define ERR_MDNS_NOIMPL   -36654

unimplemented feature

Definition at line 1163 of file mx_wifi.h.

#define ERR_MDNS_NOMEM   -36655

insufficient memory

Definition at line 1164 of file mx_wifi.h.

#define ERR_MDNS_NORESP   -36657

requested resource is in use

Definition at line 1166 of file mx_wifi.h.

#define ERR_MDNS_TOOBIG   -36653

not enough room for everything

Definition at line 1162 of file mx_wifi.h.

#define MAX_MDNS_LST   5 /* Maximum no. of services */

Maximum no.

of services allowed to be announced on a single interface.

Definition at line 1156 of file mx_wifi.h.

#define MDNS_MAX_KEYVAL_LEN   255 /* defined by the standard : 255*/

Maximum length of key/value pair.

TXT records associated with a service are populated with key/value pairs. These key/value pairs must not exceed this length.

Definition at line 1147 of file mx_wifi.h.

#define MDNS_MAX_LABEL_LEN   63 /* defined by the standard */

Maximum length of labels.

A label is one segment of a DNS name. For example, "foo" is a label in the name "foo.local.". RFC 1035 requires that labels do not exceed 63 bytes.

Definition at line 1133 of file mx_wifi.h.

#define MDNS_MAX_NAME_LEN   255 /* defined by the standard : 255*/

Maximum length of names.

A name is a list of labels such as "My Webserver.foo.local" or mydevice.local. RFC 1035 requires that names do not exceed 255 bytes.

Definition at line 1140 of file mx_wifi.h.

#define MDNS_PROTO_TCP   0

protocol values for the proto member of the mdns_service descriptor

TCP Protocol

Definition at line 1151 of file mx_wifi.h.

#define MDNS_PROTO_UDP   1

UDP Protocol.

Definition at line 1153 of file mx_wifi.h.

Enumeration Type Documentation

mDNS Interface State mDNS interface state can be changed by using mdns_iface_state_change() function.

For details about when to use the enum please refer to documentation for mdns_iface_state_change().

Enumerator
UP 

UP the interface and announce services mDNS will probe and announce all services announced via mdns_announce_service() and/or mdns_announce_service_arr().

mDNS will go through entire probing sequence explained in above functions. Interface state can be changed to UP, if its DOWN.

DOWN 

DOWN the interface and de-announce services mDNS sends good bye packet with ttl=0 so that mDNS clients can remove the services from their mDNS cache table.

REANNOUNCE 

Forcefully re-announce services This state should be used after services are already announced and force announcement is needed due to some reason.

mDNS will not perform probing sequence, as it does in case of UP, and will directly re-announce services.

Definition at line 1181 of file mx_wifi.h.

Function Documentation

int32_t MX_WIFI_MDNS_announce_service ( MX_WIFIObject_t Obj,
struct mc_mdns_service service,
mwifi_if_t  interface 
)

announce a service.

Parameters
Objpointer to module handle
serviceservice to announce
interfacewifi interface
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_deannounce_service ( MX_WIFIObject_t Obj,
struct mc_mdns_service service,
mwifi_if_t  interface 
)

deannounce a service.

Parameters
Objpointer to module handle
serviceservice to deannounce
interfacewifi interface
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_deannounce_service_all ( MX_WIFIObject_t Obj,
mwifi_if_t  interface 
)

deannounce all services.

Parameters
Objpointer to module handle
interfacewifi interface
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_iface_state_change ( MX_WIFIObject_t Obj,
mwifi_if_t  interface,
enum iface_state  state 
)

Send interface state change event to mdns.

Parameters
Objpointer to module handle
interfacewifi interface
statestate event, valid interface state from iface_state
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_set_hostname ( MX_WIFIObject_t Obj,
char *  hostname 
)

Set new host name, use mdns_iface_state_change(interface, REANNOUNCE) to anounce the new host name.

Parameters
Objpointer to module handle
hostnamenew hostname
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_set_txt_rec ( MX_WIFIObject_t Obj,
struct mc_mdns_service service,
char *  keyvals,
char  separator 
)

sets the TXT record field for a given mDNS service.

Parameters
Objpointer to module handle
servicemDNS service
keyvalsnew txt record string
separatorthe separator used to separate individual key value pairs
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_start ( MX_WIFIObject_t Obj,
const char *  domain,
char *  hostname 
)

start mDNS service.

Parameters
Objpointer to module handle
domaindomain of service
namehostname
Return values
OperationStatus.
int32_t MX_WIFI_MDNS_stop ( MX_WIFIObject_t Obj)

stop mDNS service.

Parameters
Objpointer to module handle
Return values
OperationStatus.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.