mdns : Add subtypes table to the service structe

This commit is contained in:
Abdellatif IDIRY 2021-10-25 10:32:13 +02:00
parent e8741da9d2
commit d7b05eed68
2 changed files with 8 additions and 2 deletions

View File

@ -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.

View File

@ -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 */