check that tap device is actually created
[sliver-openvswitch.git] / lib / packets.h
index 973f3e8..b73ff63 100644 (file)
@@ -155,6 +155,7 @@ void set_mpls_lse(struct ofpbuf *, ovs_be32 label);
 void push_mpls(struct ofpbuf *packet, ovs_be16 ethtype, ovs_be32 lse);
 void pop_mpls(struct ofpbuf *, ovs_be16 ethtype);
 
+void set_mpls_lse_ttl(ovs_be32 *lse, uint8_t ttl);
 void set_mpls_lse_tc(ovs_be32 *lse, uint8_t tc);
 void set_mpls_lse_label(ovs_be32 *lse, ovs_be32 label);
 void set_mpls_lse_bos(ovs_be32 *lse, uint8_t bos);
@@ -548,10 +549,15 @@ static inline bool ipv6_mask_is_exact(const struct in6_addr *mask) {
     return ipv6_addr_equals(mask, &in6addr_exact);
 }
 
+static inline bool dl_type_is_ip_any(ovs_be16 dl_type)
+{
+    return dl_type == htons(ETH_TYPE_IP)
+        || dl_type == htons(ETH_TYPE_IPV6);
+}
+
 static inline bool is_ip_any(const struct flow *flow)
 {
-    return flow->dl_type == htons(ETH_TYPE_IP)
-        || flow->dl_type == htons(ETH_TYPE_IPV6);
+    return dl_type_is_ip_any(flow->dl_type);
 }
 
 void format_ipv6_addr(char *addr_str, const struct in6_addr *addr);