@@ -690,7 +690,32 @@ typedef struct {
690690#define ESP_WIFI_MAX_SVC_NAME_LEN 256 /**< Maximum length of NAN service name */
691691#define ESP_WIFI_MAX_FILTER_LEN 256 /**< Maximum length of NAN service filter */
692692#define ESP_WIFI_MAX_SVC_INFO_LEN 64 /**< Maximum length of NAN service info */
693+ #define ESP_WIFI_MAX_FUP_SSI_LEN 2048 /**< Maximum length of NAN Service Specific Info in a Follow-up frame */
694+ #define ESP_WIFI_MAX_SVC_SSI_LEN 512 /**< Maximum length of NAN Service Specific Info in Publish/Subscribe SDF's */
693695#define ESP_WIFI_MAX_NEIGHBOR_REP_LEN 64 /**< Maximum length of NAN Neighbor Report */
696+ #define WIFI_OUI_LEN 3 /**< Length of OUI bytes in IE or attributes */
697+
698+ /**
699+ * @brief Protocol types in NAN service specific info attribute
700+ *
701+ */
702+ typedef enum {
703+ WIFI_SVC_PROTO_RESERVED = 0 , /**< Value 0 Reserved */
704+ WIFI_SVC_PROTO_BONJOUR = 1 , /**< Bonjour Protocol */
705+ WIFI_SVC_PROTO_GENERIC = 2 , /**< Generic Service Protocol */
706+ WIFI_SVC_PROTO_CSA_MATTER = 3 , /**< CSA Matter specific protocol */
707+ WIFI_SVC_PROTO_MAX , /**< Values 4-255 Reserved */
708+ } wifi_nan_svc_proto_t ;
709+
710+ /**
711+ * @brief WFA defined Protocol types in NAN service specific info attribute
712+ *
713+ */
714+ typedef struct {
715+ uint8_t wfa_oui [WIFI_OUI_LEN ]; /**< WFA OUI - 0x50, 0x6F, 0x9A */
716+ wifi_nan_svc_proto_t proto ; /**< WFA defined protocol types */
717+ uint8_t payload [0 ]; /**< Service Info payload */
718+ } wifi_nan_wfa_ssi_t ;
694719
695720/**
696721 * @brief NAN Services types
@@ -711,10 +736,14 @@ typedef struct {
711736 char service_name [ESP_WIFI_MAX_SVC_NAME_LEN ]; /**< Service name identifier */
712737 wifi_nan_service_type_t type ; /**< Service type */
713738 char matching_filter [ESP_WIFI_MAX_FILTER_LEN ]; /**< Comma separated filters for filtering services */
714- char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ]; /**< Service info shared in Publish frame */
739+ char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ]; /**< To be deprecated in next major release, use ssi instead */
715740 uint8_t single_replied_event : 1 ; /**< Give single Replied event or every time */
716741 uint8_t datapath_reqd : 1 ; /**< NAN Datapath required for the service */
717- uint8_t reserved : 6 ; /**< Reserved */
742+ uint8_t fsd_reqd : 1 ; /**< Further Service Discovery(FSD) required */
743+ uint8_t fsd_gas : 1 ; /**< 0 - Follow-up used for FSD, 1 - GAS used for FSD */
744+ uint8_t reserved : 4 ; /**< Reserved */
745+ uint16_t ssi_len ; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_SVC_SSI_LEN */
746+ uint8_t * ssi ; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
718747} wifi_nan_publish_cfg_t ;
719748
720749/**
@@ -725,20 +754,27 @@ typedef struct {
725754 char service_name [ESP_WIFI_MAX_SVC_NAME_LEN ]; /**< Service name identifier */
726755 wifi_nan_service_type_t type ; /**< Service type */
727756 char matching_filter [ESP_WIFI_MAX_FILTER_LEN ]; /**< Comma separated filters for filtering services */
728- char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ]; /**< Service info shared in Subscribe frame */
729- uint8_t single_match_event : 1 ; /**< Give single Match event or every time */
730- uint8_t reserved : 7 ; /**< Reserved */
757+ char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ]; /**< To be deprecated in next major release, use ssi instead */
758+ uint8_t single_match_event : 1 ; /**< Give single Match event(per SSI update) or every time */
759+ uint8_t datapath_reqd : 1 ; /**< NAN Datapath required for the service */
760+ uint8_t fsd_reqd : 1 ; /**< Further Service Discovery(FSD) required */
761+ uint8_t fsd_gas : 1 ; /**< 0 - Follow-up used for FSD, 1 - GAS used for FSD */
762+ uint8_t reserved : 4 ; /**< Reserved */
763+ uint16_t ssi_len ; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_SVC_SSI_LEN */
764+ uint8_t * ssi ; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
731765} wifi_nan_subscribe_cfg_t ;
732766
733767/**
734768 * @brief NAN Follow-up parameters
735769 *
736770 */
737771typedef struct {
738- uint8_t inst_id ; /**< Own service instance id */
739- uint8_t peer_inst_id ; /**< Peer's service instance id */
740- uint8_t peer_mac [6 ]; /**< Peer's MAC address */
741- char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< Service info(or message) to be shared */
772+ uint8_t inst_id ; /**< Own service instance id */
773+ uint8_t peer_inst_id ; /**< Peer's service instance id */
774+ uint8_t peer_mac [6 ]; /**< Peer's MAC address */
775+ char svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ]; /**< To be deprecated in next major release, use ssi instead */
776+ uint16_t ssi_len ; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_FUP_SSI_LEN */
777+ uint8_t * ssi ; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
742778} wifi_nan_followup_params_t ;
743779
744780/**
@@ -1146,6 +1182,15 @@ typedef struct {
11461182 uint8_t publish_id ; /**< Publish Service Identifier */
11471183 uint8_t pub_if_mac [6 ]; /**< NAN Interface MAC of the Publisher */
11481184 bool update_pub_id ; /**< Indicates whether publisher's service ID needs to be updated */
1185+ uint8_t datapath_reqd : 1 ; /**< NAN Datapath required for the service */
1186+ uint8_t fsd_reqd : 1 ; /**< Further Service Discovery(FSD) required */
1187+ uint8_t fsd_gas : 1 ; /**< 0 - Follow-up used for FSD, 1 - GAS used for FSD */
1188+ uint8_t reserved : 5 ; /**< Reserved */
1189+ uint32_t reserved_1 ; /**< Reserved */
1190+ uint32_t reserved_2 ; /**< Reserved */
1191+ uint8_t ssi_version ; /**< Indicates version of SSI in Publish instance, 0 if not available */
1192+ uint16_t ssi_len ; /**< Length of service specific info */
1193+ uint8_t ssi []; /**< Service specific info of Publisher */
11491194} wifi_event_nan_svc_match_t ;
11501195
11511196/**
@@ -1155,6 +1200,10 @@ typedef struct {
11551200 uint8_t publish_id ; /**< Publish Service Identifier */
11561201 uint8_t subscribe_id ; /**< Subscribe Service Identifier */
11571202 uint8_t sub_if_mac [6 ]; /**< NAN Interface MAC of the Subscriber */
1203+ uint32_t reserved_1 ; /**< Reserved */
1204+ uint32_t reserved_2 ; /**< Reserved */
1205+ uint16_t ssi_len ; /**< Length of service specific info */
1206+ uint8_t ssi []; /**< Service specific info of Subscriber */
11581207} wifi_event_nan_replied_t ;
11591208
11601209/**
@@ -1164,7 +1213,11 @@ typedef struct {
11641213 uint8_t inst_id ; /**< Our Service Identifier */
11651214 uint8_t peer_inst_id ; /**< Peer's Service Identifier */
11661215 uint8_t peer_if_mac [6 ]; /**< Peer's NAN Interface MAC */
1167- uint8_t peer_svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< Peer Service Info */
1216+ uint8_t peer_svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< To be deprecated in next major release, use ssi instead */
1217+ uint32_t reserved_1 ; /**< Reserved */
1218+ uint32_t reserved_2 ; /**< Reserved */
1219+ uint16_t ssi_len ; /**< Length of service specific info */
1220+ uint8_t ssi []; /**< Service specific info from Follow-up */
11681221} wifi_event_nan_receive_t ;
11691222
11701223/**
@@ -1175,7 +1228,11 @@ typedef struct {
11751228 uint8_t ndp_id ; /**< NDP instance id */
11761229 uint8_t peer_nmi [6 ]; /**< Peer's NAN Management Interface MAC */
11771230 uint8_t peer_ndi [6 ]; /**< Peer's NAN Data Interface MAC */
1178- uint8_t svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< Service Specific Info */
1231+ uint8_t svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< To be deprecated in next major release, use ssi instead */
1232+ uint32_t reserved_1 ; /**< Reserved */
1233+ uint32_t reserved_2 ; /**< Reserved */
1234+ uint16_t ssi_len ; /**< Length of service specific info */
1235+ uint8_t ssi []; /**< Service specific info from NDP/NDPE Attribute */
11791236} wifi_event_ndp_indication_t ;
11801237
11811238/**
@@ -1187,7 +1244,11 @@ typedef struct {
11871244 uint8_t peer_nmi [6 ]; /**< Peer's NAN Management Interface MAC */
11881245 uint8_t peer_ndi [6 ]; /**< Peer's NAN Data Interface MAC */
11891246 uint8_t own_ndi [6 ]; /**< Own NAN Data Interface MAC */
1190- uint8_t svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< Service Specific Info */
1247+ uint8_t svc_info [ESP_WIFI_MAX_SVC_INFO_LEN ];/**< To be deprecated in next major release, use ssi instead */
1248+ uint32_t reserved_1 ; /**< Reserved */
1249+ uint32_t reserved_2 ; /**< Reserved */
1250+ uint16_t ssi_len ; /**< Length of Service Specific Info */
1251+ uint8_t ssi []; /**< Service specific info from NDP/NDPE Attribute */
11911252} wifi_event_ndp_confirm_t ;
11921253
11931254/**
0 commit comments