Exemplo n.º 1
0
/* Modifies 'match' so that the VLAN PCP is wildcarded.  If the VID is already
 * wildcarded, then 'match' will match a packet regardless of whether it has an
 * 802.1Q header or not. */
void
match_set_any_pcp(struct match *match)
{
    if (match->wc.masks.vlan_tci & htons(VLAN_VID_MASK)) {
        match->wc.masks.vlan_tci &= ~htons(VLAN_PCP_MASK);
        match->flow.vlan_tci &= ~htons(VLAN_PCP_MASK);
    } else {
        match_set_dl_tci_masked(match, htons(0), htons(0));
    }
}
Exemplo n.º 2
0
void
match_set_dl_tci(struct match *match, ovs_be16 tci)
{
    match_set_dl_tci_masked(match, tci, htons(0xffff));
}
Exemplo n.º 3
0
FlowBuilder& FlowBuilder::tci(uint16_t tci, uint16_t mask) {
    match_set_dl_tci_masked(match(), htons(tci), htons(mask));
    return *this;
}