Add zstd streaming interface
[folly.git] / folly / IPAddressV4.h
index 26a2dba38acdbf0efd1ecc049dd8754f755bd787..094969461934088b3ebad26bcf326d0e9a41fc8e 100644 (file)
@@ -79,6 +79,13 @@ class IPAddressV4 {
     return ByteRange((const unsigned char *) &addr_.inAddr_.s_addr, 4);
   }
 
+  /**
+   * Create a new IPAddress instance from the in-addr.arpa representation.
+   * @throws IPAddressFormatException if the input is not a valid in-addr.arpa
+   * representation
+   */
+  static IPAddressV4 fromInverseArpaName(const std::string& arpaname);
+
   /**
    * Convert a IPv4 address string to a long in network byte order.
    * @param [in] ip the address to convert
@@ -183,6 +190,8 @@ class IPAddressV4 {
   // @see IPAddress#str
   std::string str() const;
 
+  std::string toInverseArpaName() const;
+
   // return underlying in_addr structure
   in_addr toAddr() const { return addr_.inAddr_; }