GBP V2
[vpp.git] / src / vpp-api / vom / types.hpp
index fd3b24b..53654c5 100644 (file)
@@ -52,6 +52,12 @@ enum class dependency_t
    */
   INTERFACE,
 
+  /**
+   * bond group binding is after interfaces but before
+   * anything else
+   */
+  BOND_BINDING,
+
   /**
    * Tunnel or virtual interfaces next
    */
@@ -88,7 +94,7 @@ struct rc_t : public enum_base<rc_t>
   /**
    * Destructor
    */
-  ~rc_t();
+  ~rc_t() = default;
 
   /**
    * The value un-set
@@ -105,12 +111,6 @@ struct rc_t : public enum_base<rc_t>
    */
   const static rc_t OK;
 
-  /**
-   * HW write is in progress. Also used for the 'want' events
-   * that never complete
-   */
-  const static rc_t INPROGRESS;
-
   /**
    * HW write reported invalid input
    */
@@ -159,6 +159,77 @@ struct direction_t : public enum_base<direction_t>
   const static direction_t OUTPUT;
 };
 
+/**
+ * Output ostream for direction_t
+ */
+std::ostream& operator<<(std::ostream& os, const direction_t& dir);
+
+/**
+ * Feature Ethertype
+ */
+struct ethertype_t : public enum_base<ethertype_t>
+{
+  /**
+   * Constructor
+   */
+  ethertype_t(int v, const std::string s);
+
+  /**
+   * Destructor
+   */
+  ~ethertype_t() = default;
+
+  /**
+   * Ethertype Arp
+   */
+  const static ethertype_t ARP;
+
+  /**
+   * Ethertype FCoE
+   */
+  const static ethertype_t FCOE;
+
+  /**
+   * Ethertype IPv4
+   */
+  const static ethertype_t IPV4;
+
+  /**
+   * Ethertype Ipv6
+   */
+  const static ethertype_t IPV6;
+
+  /**
+   * Ethertype MAC Security
+   */
+  const static ethertype_t MAC_SECURITY;
+
+  /**
+   * Ethertype MPLS unicast
+   */
+  const static ethertype_t MPLS_UNICAST;
+
+  /**
+   * Ethertype TRILL
+   */
+  const static ethertype_t TRILL;
+
+  /**
+   * Ethertype Unspecified
+   */
+  const static ethertype_t UNSPECIFIED;
+
+  /**
+   * Get the ethertype from the numeric value
+   */
+  static const ethertype_t& from_numeric_val(uint16_t numeric);
+};
+
+/**
+ * Output ostream for ethertype_t
+ */
+std::ostream& operator<<(std::ostream& os, const ethertype_t& eth);
+
 /**
  * A type declaration of an interface handle in VPP
  */
@@ -204,6 +275,11 @@ struct handle_t
    */
   uint32_t value() const;
 
+  /**
+   * reset the value of the handle to ~0
+   */
+  void reset();
+
 private:
   /**
    * VPP's handle value
@@ -221,8 +297,8 @@ std::ostream& operator<<(std::ostream& os, const handle_t& h);
  */
 struct mac_address_t
 {
-  mac_address_t(uint64_t address);
   mac_address_t(uint8_t bytes[6]);
+  mac_address_t(const std::string& str);
   mac_address_t(std::initializer_list<uint8_t> bytes);
   /**
    * Convert to byte array
@@ -254,11 +330,6 @@ struct mac_address_t
    */
   std::string to_string() const;
 
-  /**
-   * U64 conversion
-   */
-  uint64_t to_u64() const;
-
   /**
    * Underlying bytes array
    */