![]() |
WL865E4-P
36.07.001
|
This file contains the M2MB APIs of Domain Name System(DNS) service discovery operation. More...
This file contains the M2MB APIs of Domain Name System(DNS) service discovery 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 63 of file m2mb_dns_service_discovery.h.
#define M2MB_DNSSD_MAX_TIMEOUT 5000 |
Timeout for a discovery request.
Definition at line 64 of file m2mb_dns_service_discovery.h.
typedef void(* M2MB_DNSSD_CB_T) (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 78 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.
enum M2MB_DNSSD_COMMAND_E |
Commands supported by DNS-SD.
List of commands to start, stop, initialize, perform discovery, and retrieve information from DNS-SD.
Definition at line 88 of file m2mb_dns_service_discovery.h.
Response types.
List of response types possible for a request.
Definition at line 104 of file m2mb_dns_service_discovery.h.
M2MB_STATUS_T m2mb_dnssd_discover | ( | 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] | svc_instance_name | Name of the service instance to be discovered. |
m2mb_dnssd_discover( "_MyDevice._http.tcp.local" );
M2MB_STATUS_T m2mb_dnssd_init | ( | M2MB_DNSSD_INIT_T * | init | ) |
m2mb_dnssd_init is called to initialize DNS service discovery.
m2mb_dnssd_init initializes the DNS-SD module.
[in] | init | Specifies the timeout, maximum entries, and callback. |
m2mb_dnssd_init( &init );
M2MB_STATUS_T m2mb_dnssd_start | ( | M2MB_DNSSD_START_T * | start | ) |
m2mb_dnssd_start is called to start DNS-SD.
m2mb_dnssd_start Kick-starts the DNS-SD service.
[in] | start | Start command arguments (IP version and interface name). |
m2mb_dnssd_start( &start );
M2MB_STATUS_T m2mb_dnssd_stop | ( | M2MB_DNSSD_CTXT_T * | ctxt | ) |
m2mb_dnssd_stop is called to stop DNS-SD module.
m2mb_dnssd_stop stops the DNS-SD module. It frees up all memory allocated during initialization process.
[in] | ctxt | Context of the DNS-SD to be stopped. |
m2mb_dnssd_stop(&ctxt);