/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
+/* Appends a formatted representation of 'sv' to 's'. */
+void
+mf_subvalue_format(const union mf_subvalue *sv, struct ds *s)
+{
+ ds_put_hex(s, sv, sizeof *sv);
+}
+
/* Returns true if 'wc' wildcards all the bits in field 'mf', false if 'wc'
* specifies at least one bit in the field.
*
return !(wc->masks.mpls_lse[0] & htonl(MPLS_TC_MASK));
case MFF_MPLS_BOS:
return !(wc->masks.mpls_lse[0] & htonl(MPLS_BOS_MASK));
+ case MFF_MPLS_TTL:
+ return !(wc->masks.mpls_lse[0] & htonl(MPLS_TTL_MASK));
case MFF_IPV4_SRC:
return !wc->masks.nw_src;
case MFF_ETH_DST:
case MFF_ETH_TYPE:
case MFF_VLAN_TCI:
+ case MFF_MPLS_TTL:
case MFF_IPV4_SRC:
case MFF_IPV4_DST:
case MFF_IPV6_SRC:
value->u8 = mpls_lse_to_bos(flow->mpls_lse[0]);
break;
+ case MFF_MPLS_TTL:
+ value->u8 = mpls_lse_to_ttl(flow->mpls_lse[0]);
+ break;
+
case MFF_IPV4_SRC:
value->be32 = flow->nw_src;
break;
match_set_mpls_bos(match, 0, value->u8);
break;
+ case MFF_MPLS_TTL:
+ match_set_mpls_ttl(match, 0, value->u8);
+ break;
+
case MFF_IPV4_SRC:
match_set_nw_src(match, value->be32);
break;
flow_set_mpls_bos(flow, 0, value->u8);
break;
+ case MFF_MPLS_TTL:
+ flow_set_mpls_ttl(flow, 0, value->u8);
+ break;
+
case MFF_IPV4_SRC:
flow->nw_src = value->be32;
break;
match_set_any_mpls_bos(match, 0);
break;
+ case MFF_MPLS_TTL:
+ match_set_any_mpls_ttl(match, 0);
+ break;
+
case MFF_IPV4_SRC:
case MFF_ARP_SPA:
match_set_nw_src_masked(match, htonl(0), htonl(0));
case MFF_MPLS_LABEL:
case MFF_MPLS_TC:
case MFF_MPLS_BOS:
+ case MFF_MPLS_TTL:
case MFF_IP_PROTO:
case MFF_IP_TTL:
case MFF_IP_DSCP: