Get Service List
169
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
mDNS
•
_ipp – bit 0
•
_divice-info – bit 1
•
_http – bit 2
•
_https – bit 3
•
_workstation – bit 4
•
_guid – bit 5
•
_h323 – bit 6
•
_ntp – bit 7
•
_objective – bit 8
•
_rdp – bit 9
•
_remote – bit 10
•
_rtsp – bit 11
•
_sip – bit 12
•
_smb – bit 13
•
_soap – bit 14
•
_ssh – bit 15
•
_telnet – bit 16
•
_tftp – bit 17
•
_xmpp-client – bit 18
•
_raop – bit 19
Example:
_i16 Status;
_u32 EventMask;
EventMask = BIT0 | BIT1 | BIT18;
Status
= sl_NetAppSet(SL_NETAPP_MDNS_ID,
SL_NETAPP_MDNS_QEVETN_MASK_OPT,
sizeof
(EventMask),&EventMask);
if
( Status )
{
/* Error */
}
10.5 Get Service List
The SimpleLink device can return a list of peer services, which are stored in the device, without issuing
any queries (relying on previously collected data stored in the cache). The list is in a form of a service
structure, which can include full-service parameters with text, full-service parameters, or short-service
parameters (port and IP only), dedicated for hosts with memory limitations (for different size of buffers).
The list size can store up to eight services, and when a new service is discovered, the oldest service entry
is replaced. The list is cleared when mDNS service is disabled or if Wi-Fi disconnects.
The host can retrieve or return different levels of details to support memory reduction in the host
application:
•
IPv4/IPv6 full-service parameters – IP address, port, service name, service host, and service text
•
IPv4/IPv6 partial-service parameters – IP address, port, service name, and service host
•
IPv4/IPv6 minimal-service parameters – IP address and port only
Example:
_i16 Status;
SlNetAppGetShortServiceIpv4List_t
listMdns[6];
/* Get a list of discovered services */
Status = sl_NetAppGetServiceList(0, 6,
/* Maximum number of services to receive */