Punt: specify packets by IP protocol Type
[vpp.git] / src / vnet / ip / ip_types.api
index e418ed3..4c68567 100644 (file)
  * limitations under the License.
  */
 
-typedef ip4_address {
-  u8 address[4];
-};
-
-typedef ip6_address {
-  u8 address[16];
-};
+typedef u8 ip4_address[4];
+typedef u8 ip6_address[16];
 
 enum address_family {
   ADDRESS_IP4 = 0,
   ADDRESS_IP6,
 };
 
+enum ip_proto {
+  IP_API_PROTO_TCP = 6,
+  IP_API_PROTO_UDP = 17,
+  IP_API_PROTO_EIGRP = 88,
+  IP_API_PROTO_OSPF = 89,
+};
+
 union address_union {
   vl_api_ip4_address_t ip4;
   vl_api_ip6_address_t ip6;
@@ -48,3 +50,13 @@ typedef mprefix {
   vl_api_address_union_t grp_address;
   vl_api_address_union_t src_address;
 };
+
+typedef ip6_prefix {
+  vl_api_ip6_address_t prefix;
+  u8 len;
+};
+
+typedef ip4_prefix {
+  vl_api_ip4_address_t prefix;
+  u8 len;
+};