Disable zerocopy if we're notified about deferred copies, add a isZeroCopyWriteInProg...
[folly.git] / folly / IPAddressV6.h
index 8590993c3cacc5d8f1e297b14e239049cca7bf7d..f641bdcd85e988fa8562a0f986cb0aa467597f2a 100644 (file)
@@ -24,6 +24,7 @@
 #include <map>
 #include <stdexcept>
 
+#include <folly/FBString.h>
 #include <folly/Hash.h>
 #include <folly/Optional.h>
 #include <folly/Range.h>
@@ -173,7 +174,7 @@ class IPAddressV6 {
    * @see IPAddress#bitCount
    * @returns 128
    */
-  static size_t bitCount() {
+  static constexpr size_t bitCount() {
     return 128;
   }
 
@@ -231,6 +232,16 @@ class IPAddressV6 {
    */
   Optional<MacAddress> getMacAddressFromLinkLocal() const;
 
+  /**
+   * Return the mac address if this is an auto-configured IPv6 address based on
+   * EUI-64
+   *
+   * @return an Optional<MacAddress> union representing the mac address.
+   * If the address is not based on EUI-64 it will return an empty Optional.
+   * You can use Optional::value() to check whether the mac address is not null.
+   */
+  Optional<MacAddress> getMacAddressFromEUI64() const;
+
   /**
    * Return true if this is a multicast address.
    */