WE310F5  39.00.000
m2mb_mdns.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
29 #ifndef M2MB_mDNS_API_H
30 #define M2MB_mDNS_API_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
57 /*-----------------------------------------------------------------------------------------------*/
58 
59 
64 /*-----------------------------------------------------------------------------------------------*/
65 /* Global declarations ==========================================================================*/
66 
67 #define M2MB_MDNS_MAX_TXT_RECORDS 10
69 /* Global typedefs ==============================================================================*/
70 
82 typedef struct M2MB_MDNS_TXT_RECORD
83 {
84  const UINT8 *svcName;
85  const UINT8 *txt;
87 
102 {
103  const CHAR *svc_Name;
106 
115 typedef struct M2MB_MDNS_SVC_INFO
116 {
123 
124 /*
125  @brief Structure for updating or adding a new text record.
126 
127  @details
128  This structure contains the text record in the format key=value and a service name
129  that is already registered. If the key in the text record already exists for
130  the given service name, the value is updated with the given value, otherwise,
131  the text record is added as a new text record.
132 */
133 typedef struct M2MB_MDNS_TXT
134 {
135  const CHAR *svc_Name;
136  const CHAR *txt[10];
138 
193 typedef UINT32(*M2MB_MDNS_CB_T)(VOID *arg);
194 
202 typedef enum M2MB_MDNS_CONF_ID
203 {
207 
215 typedef struct M2MB_MDNS_INIT_PARAMS
216 {
227 
236 typedef union
237 {
240 
241 /* Global functions =========================================================*/
242 
247 typedef void(*MDNS_NAME_RESULT_CB_T)(struct netif* netif, UINT8 result);
248 
250 
251 /*---------------------------------------------------------------------------*/
307 /*---------------------------------------------------------------------------*/
309 
310 /*---------------------------------------------------------------------------*/
363 /*---------------------------------------------------------------------------*/
364 M2MB_STATUS_T m2mb_mdns_set_hostname(HANDLE handle, const CHAR *host_name);
365 
366 /*---------------------------------------------------------------------------*/
434 /*---------------------------------------------------------------------------*/
436  M2MB_MDNS_SVC_INFO_T *svc_info, UINT8 blocking );
437 
438 /*---------------------------------------------------------------------------*/
502 /*---------------------------------------------------------------------------*/
503 M2MB_STATUS_T m2mb_mdns_unregister_service(HANDLE handle, const CHAR *svc_name);
504 
505 /*---------------------------------------------------------------------------*/
596 /*---------------------------------------------------------------------------*/
598  M2MB_MDNS_CONF_PARAMS_T * conf_params);
599 
600 /*---------------------------------------------------------------------------*/
661 /*---------------------------------------------------------------------------*/
663 
667 /*-----------------------------------------------------------------------------------------------*/
668 
669 #ifdef __cplusplus
670 }
671 #endif
672 #endif
struct M2MB_MDNS_INIT_PARAMS M2MB_MDNS_INIT_PARAMS_T
MDNS initialization parameters.
const UINT8 * txt
Definition: m2mb_mdns.h:85
void m2mb_mdns_resp_register_name_result_cb(MDNS_NAME_RESULT_CB_T cb)
MDNS initialization parameters.
Definition: m2mb_mdns.h:215
M2MB_STATUS_T status
Definition: m2mb_mdns.h:104
unsigned char UINT8
Definition: m2mb_types.h:86
enum M2MB_MDNS_CONF_ID M2MB_MDNS_CONF_ID_E
MDNS SET Configuration enumeration.
M2MB_STATUS_T m2mb_mdns_deinit(HANDLE handle)
m2mb_mdns_deinit API de-initializes the mDNS module.
struct M2MB_MDNS_TXT M2MB_MDNS_TXT_T
INT32 M2MB_STATUS_T
Definition: m2mb_status.h:97
M2MB_STATUS_T m2mb_mdns_init(HANDLE *handle, M2MB_MDNS_INIT_PARAMS_T *init_params)
m2mb_mdns_init is called to Start the mDNS service.
const CHAR * svc_Name
Definition: m2mb_mdns.h:135
unsigned short UINT16
Definition: m2mb_types.h:87
M2MB_MDNS_CONF_ID
MDNS SET Configuration enumeration.
Definition: m2mb_mdns.h:202
M2MB_STATUS_T m2mb_mdns_set_cfg(HANDLE handle, M2MB_MDNS_CONF_ID_E conf_id, M2MB_MDNS_CONF_PARAMS_T *conf_params)
SET the MDNS configuration parameters.
M2MB_STATUS_T m2mb_mdns_set_hostname(HANDLE handle, const CHAR *host_name)
Sets the hostname for mDNS.
struct M2MB_MDNS_SVC_INFO M2MB_MDNS_SVC_INFO_T
Structure for registering the new service or advertising a service.
void(* MDNS_NAME_RESULT_CB_T)(struct netif *netif, UINT8 result)
Definition: m2mb_mdns.h:247
char CHAR
Definition: m2mb_types.h:76
Structure for registration status information.
Definition: m2mb_mdns.h:101
M2MB_STATUS_T m2mb_mdns_unregister_service(HANDLE handle, const CHAR *svc_name)
unregisters a service with mDNS.
void VOID
Definition: m2mb_types.h:74
CHAR * txt[M2MB_MDNS_MAX_TXT_RECORDS]
Definition: m2mb_mdns.h:120
const CHAR * svc_Name
Definition: m2mb_mdns.h:103
#define M2MB_MDNS_MAX_TXT_RECORDS
Definition: m2mb_mdns.h:67
struct M2MB_MDNS_TXT_RECORD M2MB_MDNS_TXT_RECORD_T
Structure for updating or adding a new text record.
M2MB_MDNS_TXT_T * txt_update
Definition: m2mb_mdns.h:238
M2MB_STATUS_T m2mb_mdns_register_service(HANDLE handle, M2MB_MDNS_SVC_INFO_T *svc_info, UINT8 blocking)
Registers a new service with mDNS.
struct M2MB_MDNS_SVC_REG_STATUS M2MB_MDNS_SVC_REG_STATUS_T
Structure for registration status information.
unsigned long int UINT32
Definition: m2mb_types.h:88
UINT32(* M2MB_MDNS_CB_T)(VOID *arg)
mDNS application callback.
Definition: m2mb_mdns.h:193
M2MB_MDNS_CB_T app_cb
Definition: m2mb_mdns.h:220
void * HANDLE
Definition: m2mb_types.h:98
Structure for updating or adding a new text record.
Definition: m2mb_mdns.h:82
Structure is used by SET configuration parameter of CONF IDs mentioned in enum M2MB_MDNS_CONF_ID_E. Maximum of 10 text records are supported.
Definition: m2mb_mdns.h:236
const UINT8 * svcName
Definition: m2mb_mdns.h:84
Structure for registering the new service or advertising a service.
Definition: m2mb_mdns.h:115
const CHAR * txt[10]
Definition: m2mb_mdns.h:136