2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

cfm: Support tagged CCM PDUs.

This patch also causes eth_compose() to set the l2 and l3 pointers
of the packets which it modifies.
This commit is contained in:
Ethan Jackson
2011-11-03 13:03:16 -07:00
parent fb516ed8c2
commit 75a4ead16d
5 changed files with 24 additions and 3 deletions

View File

@@ -259,7 +259,8 @@ ipv6_is_cidr(const struct in6_addr *netmask)
/* Populates 'b' with an Ethernet II packet headed with the given 'eth_dst',
* 'eth_src' and 'eth_type' parameters. A payload of 'size' bytes is allocated
* in 'b' and returned. This payload may be populated with appropriate
* information by the caller.
* information by the caller. Sets 'b''s 'l2' and 'l3' pointers to the
* Ethernet header and payload respectively.
*
* The returned packet has enough headroom to insert an 802.1Q VLAN header if
* desired. */
@@ -282,6 +283,9 @@ eth_compose(struct ofpbuf *b, const uint8_t eth_dst[ETH_ADDR_LEN],
memcpy(eth->eth_src, eth_src, ETH_ADDR_LEN);
eth->eth_type = htons(eth_type);
b->l2 = eth;
b->l3 = data;
return data;
}