- struct vlan_eth_header *veh = packet->l2;
- if (packet->size >= sizeof *veh
- && veh->veth_type == htons(ETH_TYPE_VLAN)) {
- struct eth_header tmp;
-
- memcpy(tmp.eth_dst, veh->veth_dst, ETH_ADDR_LEN);
- memcpy(tmp.eth_src, veh->veth_src, ETH_ADDR_LEN);
- tmp.eth_type = veh->veth_next_type;
-
- ofpbuf_pull(packet, VLAN_HEADER_LEN);
- packet->l2 = (char*)packet->l2 + VLAN_HEADER_LEN;
- memcpy(packet->data, &tmp, sizeof tmp);
- }
-}
-
-/* Return depth of mpls stack.
- *
- * 'packet->l2_5' should initially point to 'packet''s outer-most MPLS header
- * or may be NULL if there are no MPLS headers. */
-uint16_t
-eth_mpls_depth(const struct ofpbuf *packet)
-{
- struct mpls_hdr *mh = packet->l2_5;
- uint16_t depth;