![]() |
WE310F5
39.00.000
|
This file contains the M2MB APIs of Domain Name System(DNS) service discovery (SD) operation. More...
#define | M2MB_DNSSD_MAX_BUF_ENTRIES 15 |
#define | M2MB_DNSSD_MAX_TIMEOUT 5000 |
enum | M2MB_DNSSD_RSP_TYPE_E { M2MB_DNSSD_IPV4_ADDR = 0x01, M2MB_DNSSD_PTR = 0x0c, M2MB_DNSSD_TYPE_TXT_INFO = 0x10, M2MB_DNSSD_IPV6_ADDR = 0x1c, M2MB_DNSSD_TYPE_TARGET_INFO = 0x21, M2MB_DNSSD_SEC = 0x2f, M2MB_DNSSD_ANY = 0xff } |
Response types. More... | |
typedef void(* | M2MB_DNSSD_CB_T) (void *cbCtx, struct M2MB_DNSSD_DISCOVER_T *param) |
DNS service discovery callback declaration. More... | |
typedef struct M2MB_DNSSD_INIT_PARAMS | M2MB_DNSSD_INIT_PARAMS_T |
DNS-SD initialization parameters. More... | |
typedef struct M2MB_DNSSD_DISCOVER_T | M2MB_DNSSD_DISCOVER_T |
DNS-SD discover data buffer. More... | |
M2MB_STATUS_T | m2mb_dnssd_init (HANDLE *handle, M2MB_DNSSD_INIT_PARAMS_T *init) |
m2mb_dnssd_init is called to initialize DNS service discovery. More... | |
M2MB_STATUS_T | m2mb_dnssd_deinit (HANDLE handle) |
m2mb_dnssd_deinit is called to de-initialize DNS-SD module. More... | |
M2MB_STATUS_T | m2mb_dnssd_discover (HANDLE handle, const CHAR *svc_instance_name) |
m2mb_dnssd_discover is called to discover a service. More... | |
This file contains the M2MB APIs of Domain Name System(DNS) service discovery (SD) operation.
DNS service discovery provides APIs that allow users to discover all the available services of a specific type on the local link.
User has to set the DNS server to get the host name resolved. This module stores the primary and secondary server IPaddress. User has to provide server IP address.
#define M2MB_DNSSD_MAX_BUF_ENTRIES 15 |
Maximum number of entries in the data buffer.
Definition at line 64 of file m2mb_dns_service_discovery.h.
#define M2MB_DNSSD_MAX_TIMEOUT 5000 |
Timeout for a discovery request.
Definition at line 65 of file m2mb_dns_service_discovery.h.
typedef void(* M2MB_DNSSD_CB_T) (void *cbCtx, struct M2MB_DNSSD_DISCOVER_T *param) |
DNS service discovery callback declaration.
When a discovery request is made by the user, the callback of the following types, registered during init, is invoked upon completion of the request.
Definition at line 79 of file m2mb_dns_service_discovery.h.
typedef struct M2MB_DNSSD_DISCOVER_T M2MB_DNSSD_DISCOVER_T |
DNS-SD discover data buffer.
Data buffer used to hold the responses corresponding to a discovery request.
typedef struct M2MB_DNSSD_INIT_PARAMS M2MB_DNSSD_INIT_PARAMS_T |
DNS-SD initialization parameters.
Contains information needed to initialize the DNS-SD service, such as context, timeout, maximum number of buffer entries, callback information, etc.
Response types.
List of response types possible for a request.
Definition at line 88 of file m2mb_dns_service_discovery.h.
M2MB_STATUS_T m2mb_dnssd_deinit | ( | HANDLE | handle | ) |
m2mb_dnssd_deinit is called to de-initialize DNS-SD module.
m2mb_dnssd_deinit de-initialize the DNS-SD module. It frees up all memory allocated during initialization process.
[in] | handle | Specifies the context handle initialized by m2mb_dnssd_init API. |
m2mb_dnssd_deinit(&ctxt);
M2MB_STATUS_T m2mb_dnssd_discover | ( | HANDLE | handle, |
const CHAR * | svc_instance_name | ||
) |
m2mb_dnssd_discover is called to discover a service.
Performs service discovery for the given service instance on the local link.
[in] | handle | Specifies the context handle initialized by m2mb_dnssd_init API. |
[in] | svc_instance_name | Name of the service instance to be discovered. |
m2mb_dnssd_discover( handle, "_MyDevice._http.tcp.local" );
M2MB_STATUS_T m2mb_dnssd_init | ( | HANDLE * | handle, |
M2MB_DNSSD_INIT_PARAMS_T * | init | ||
) |
m2mb_dnssd_init is called to initialize DNS service discovery.
m2mb_dnssd_init initializes the DNS-SD module.
[in] | handle | Specifies the pointer to the context handle that can be used by other dns-sd APIs. |
[in] | init | Specifies pointer to the initialization parameters the timeout, maximum entries, and callback. |
m2mb_dnssd_init( &handle, &init );