diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-11-03 13:03:16 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-11-03 14:01:33 -0700 |
commit | 75a4ead16d571a4e30cb4b54c5456e30a20c3d78 (patch) | |
tree | d0bf813017cd0ae0e0386a57a25ad85091a8f18c /lib/packets.c | |
parent | fb516ed8c26a1b8c6d2be45eb4de183de242ed87 (diff) |
cfm: Support tagged CCM PDUs.
This patch also causes eth_compose() to set the l2 and l3 pointers
of the packets which it modifies.
Diffstat (limited to 'lib/packets.c')
-rw-r--r-- | lib/packets.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/packets.c b/lib/packets.c index b704276c..03f92e36 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -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; } |