diff options
author | Sharo, Randall A CIV SPAWARSYSCEN-ATLANTIC, 55200 <randall.sharo@navy.mil> | 2014-12-23 23:42:05 +0000 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-01-13 16:22:44 -0800 |
commit | e60e935b1f37058e8a3e1a57d6a8fdd566df304c (patch) | |
tree | 74babda432851a4bf3481ad031ea07229850d13d /lib/ofpbuf.h | |
parent | ed5c51108ce7f809da953a74fd07d5c30b271972 (diff) | |
download | openvswitch-e60e935b1f37058e8a3e1a57d6a8fdd566df304c.tar.gz |
Implement set-field for IPv6 ND fields (nd_target, nd_sll, and nd_tll).
This patch adds set-field operations for nd_target, nd_sll, and nd_tll
fields, with and without masks, using Nicira extensions and OpenFlow 1.2
protocol.
Signed-off-by: Randall A Sharo <randall.sharo at navy.mil>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofpbuf.h')
-rw-r--r-- | lib/ofpbuf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h index 4c0f7eaa4..4e7038d0c 100644 --- a/lib/ofpbuf.h +++ b/lib/ofpbuf.h @@ -104,6 +104,7 @@ static inline const void *ofpbuf_get_tcp_payload(const struct ofpbuf *); static inline const void *ofpbuf_get_udp_payload(const struct ofpbuf *); static inline const void *ofpbuf_get_sctp_payload(const struct ofpbuf *); static inline const void *ofpbuf_get_icmp_payload(const struct ofpbuf *); +static inline const void *ofpbuf_get_nd_payload(const struct ofpbuf *); void ofpbuf_use(struct ofpbuf *, void *, size_t); void ofpbuf_use_stack(struct ofpbuf *, void *, size_t); @@ -374,6 +375,12 @@ static inline const void *ofpbuf_get_icmp_payload(const struct ofpbuf *b) ? (const char *)ofpbuf_l4(b) + ICMP_HEADER_LEN : NULL; } +static inline const void *ofpbuf_get_nd_payload(const struct ofpbuf *b) +{ + return OVS_LIKELY(ofpbuf_l4_size(b) >= ND_MSG_LEN) + ? (const char *)ofpbuf_l4(b) + ND_MSG_LEN : NULL; +} + #ifdef DPDK_NETDEV BUILD_ASSERT_DECL(offsetof(struct ofpbuf, mbuf) == 0); |