WL865E4-P  36.07.001
m2mb_mdns.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
28 #ifndef M2MB_mDNS_API_H
29 #define M2MB_mDNS_API_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
44 /*-----------------------------------------------------------------------------------------------*/
45 
46 
52 /* Global declarations ==========================================================================*/
53 
54 #define M2MB_MDNS_MAX_TXT_RECORDS 10
57 /* Global typedefs ==============================================================================*/
58 
66 typedef enum M2MB_MDNS_COMMAND
67 {
79 
91 typedef struct M2MB_MDNS_TXT_RECORD
92 {
93  const CHAR *svcName;
94  const CHAR *txt;
96 
110 typedef struct M2MB_MDNS_SVC_REG_STATUS
111 {
112  const CHAR *svc_Name;
115 
124 typedef struct M2MB_MDNS_SVC_INFO
125 {
126  CHAR *instance;
132 
141 typedef struct M2MB_MDNS_START
142 {
147 
148 /*
149  @brief Structure for updating or adding a new text record.
150 
151  @details
152  This structure contains the text record in the format key=value and a service name
153  that is already registered. If the key in the text record already exists for
154  the given service name, the value is updated with the given value, otherwise,
155  the text record is added as a new text record.
156 */
157 typedef struct M2MB_MDNS_TXT
158 {
159  const CHAR *svc_Name;
160  const CHAR *txt;
162 
173 typedef UINT32(*M2MB_MDNS_CB_T)(VOID *arg);
175 
176 /* Global functions =========================================================*/
177 /*---------------------------------------------------------------------------*/
235 /*---------------------------------------------------------------------------*/
237 
238 /*---------------------------------------------------------------------------*/
290 /*---------------------------------------------------------------------------*/
292 
293 /*---------------------------------------------------------------------------*/
346 /*---------------------------------------------------------------------------*/
347 M2MB_STATUS_T m2mb_mdns_set_hostname(const CHAR *host_name);
348 
349 /*---------------------------------------------------------------------------*/
414 /*---------------------------------------------------------------------------*/
416 
417 /*---------------------------------------------------------------------------*/
482 /*---------------------------------------------------------------------------*/
484 
485 /*---------------------------------------------------------------------------*/
556 /*---------------------------------------------------------------------------*/
558 
562 /*-----------------------------------------------------------------------------------------------*/
563 
564 #ifdef __cplusplus
565 }
566 #endif
567 #endif
unsigned char UINT8
Definition: m2mb_types.h:83
M2MB_STATUS_T m2mb_mdns_register_service(M2MB_MDNS_SVC_INFO_T *svc_info, UINT8 blocking)
Registers a new service with mDNS.
#define M2MB_MDNS_MAX_TXT_RECORDS
Definition: m2mb_mdns.h:54
struct M2MB_MDNS_SVC_REG_STATUS M2MB_MDNS_SVC_REG_STATUS_T
Structure for registration status information.
UINT32 ip_version
Definition: m2mb_mdns.h:144
INT32 M2MB_STATUS_T
Definition: m2mb_status.h:95
struct M2MB_MDNS_TXT M2MB_MDNS_TXT_T
enum M2MB_MDNS_COMMAND M2MB_MDNS_COMMAND_T
Commands supported by the mDNS service.
struct M2MB_MDNS_TXT_RECORD M2MB_MDNS_TXT_RECORD_T
Structure for updating or adding a new text record.
struct M2MB_MDNS_START M2MB_MDNS_START_T
mDNS start command structure.
struct M2MB_MDNS_SVC_INFO M2MB_MDNS_SVC_INFO_T
Structure for registering the new service or advertising a service.
const CHAR * svc_Name
Definition: m2mb_mdns.h:160
mDNS start command structure.
Definition: m2mb_mdns.h:142
unsigned short UINT16
Definition: m2mb_types.h:84
const CHAR * txt
Definition: m2mb_mdns.h:161
unsigned long int UINT32
Definition: m2mb_types.h:85
M2MB_STATUS_T m2mb_mdns_set_hostname(const CHAR *host_name)
Sets the hostname for mDNS.
char CHAR
Definition: m2mb_types.h:74
M2MB_STATUS_T status
Definition: m2mb_mdns.h:114
CHAR * txt[M2MB_MDNS_MAX_TXT_RECORDS]
Definition: m2mb_mdns.h:130
M2MB_STATUS_T m2mb_mdns_start(M2MB_MDNS_START_T *start, M2MB_MDNS_CB_T app_cb, UINT8 blocking)
m2mb_mdns_start is called to Start the mDNS service.
UINT32(* M2MB_MDNS_CB_T)(VOID *arg)
mDNS application callback.
Definition: m2mb_mdns.h:174
Structure for updating or adding a new text record.
Definition: m2mb_mdns.h:92
void VOID
Definition: m2mb_types.h:72
Structure for registering the new service or advertising a service.
Definition: m2mb_mdns.h:125
const CHAR * txt
Definition: m2mb_mdns.h:95
M2MB_STATUS_T m2mb_mdns_update_txt(M2MB_MDNS_TXT_T *txt_update)
Updates a text record of registered service of mDNS.
M2MB_MDNS_COMMAND
Commands supported by the mDNS service.
Definition: m2mb_mdns.h:67
Structure for registration status information.
Definition: m2mb_mdns.h:111
M2MB_STATUS_T m2mb_mdns_unregister_service(const CHAR *svc_name)
unregisters a service with mDNS.
M2MB_STATUS_T m2mb_mdns_stop(VOID)
Stops the mDNS service.
const CHAR * svc_Name
Definition: m2mb_mdns.h:113
const CHAR * svcName
Definition: m2mb_mdns.h:94