File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ bool WiFiSTAClass::enableIpV6()
733733}
734734
735735/* *
736- * Get the station interface IPv6 address.
736+ * Get the station interface local link IPv6 address.
737737 * @return IPv6Address
738738 */
739739IPv6Address WiFiSTAClass::localIPv6 ()
@@ -748,6 +748,22 @@ IPv6Address WiFiSTAClass::localIPv6()
748748 return IPv6Address (addr.addr );
749749}
750750
751+ /* *
752+ * Get the station interface local link IPv6 address.
753+ * @return IPv6Address
754+ */
755+ IPv6Address WiFiSTAClass::globalIPv6 ()
756+ {
757+ esp_ip6_addr_t addr;
758+ if (WiFiGenericClass::getMode () == WIFI_MODE_NULL){
759+ return IPv6Address ();
760+ }
761+ if (esp_netif_get_ip6_global (get_esp_interface_netif (ESP_IF_WIFI_STA), &addr)) {
762+ return IPv6Address ();
763+ }
764+ return IPv6Address (addr.addr );
765+ }
766+
751767
752768bool WiFiSTAClass::_smartConfigStarted = false ;
753769bool WiFiSTAClass::_smartConfigDone = false ;
You can’t perform that action at this time.
0 commit comments