diff --git a/src/include/lwip/apps/mdns_opts.h b/src/include/lwip/apps/mdns_opts.h index 1eee3e38..48e0958e 100644 --- a/src/include/lwip/apps/mdns_opts.h +++ b/src/include/lwip/apps/mdns_opts.h @@ -58,6 +58,8 @@ /** The maximum number of services per netif */ #ifndef MDNS_MAX_SERVICES #define MDNS_MAX_SERVICES 1 +/** The maximum number of subtypes per service */ +#define MDNS_MAX_SERVICES_SUBTYPES 4 #endif /** The minimum delay between probes in ms. RFC 6762 require 250ms. diff --git a/src/include/lwip/apps/mdns_priv.h b/src/include/lwip/apps/mdns_priv.h index 5209ba00..1576531b 100644 --- a/src/include/lwip/apps/mdns_priv.h +++ b/src/include/lwip/apps/mdns_priv.h @@ -98,14 +98,18 @@ struct mdns_service { char name[MDNS_LABEL_MAXLEN + 1]; /** Type of service, like '_http' */ char service[MDNS_LABEL_MAXLEN + 1]; - /** Callback function and userdata - * to update txtdata buffer */ + /** SubType of service, like '_printer' */ + char subTypes[MDNS_MAX_SERVICES_SUBTYPES][MDNS_LABEL_MAXLEN + 1]; + /** Callback function and userdata/* + /* to update txtdata buffer */ service_get_txt_fn_t txt_fn; void *txt_userdata; /** Protocol, TCP or UDP */ u16_t proto; /** Port of the service */ u16_t port; + /** Number of the subtypes of a service */ + u16_t subtypes_nbr; }; /** mDNS output packet */