SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
In a continuous mDNS query mode, the device keeps sending queries to the network according to a specific service name. The queries are sent in IPv4 and IPv6 (if enabled) formats or both. To see the complete list of responding services, sl_NetAppGetServiceList must be called. To stop the continuous query, call the same API with length 0.
Continuous query configuration is persistent by default, and can be set according to a system-persistent configuration.
Example:
_i16 Status;
_i8 query[] = "_http._tcp.local";
/* Start continuous query */
Status = sl_NetAppSet(SL_NETAPP_MDNS_ID, SL_NETAPP_MDNS_CONT_QUERY_OPT, (unsigned char)strlen(&query[0]), query);
if( Status )
{
/* Error */
}
/* Stop continuous query */
Status = sl_NetAppSet(SL_NETAPP_MDNS_ID, SL_NETAPP_MDNS_CONT_QUERY_OPT,0 , 0);
/* Set length to zero to stop continuous query */if( Status )
{
/* Error */
}