2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00

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>
This commit is contained in:
Sharo, Randall A CIV SPAWARSYSCEN-ATLANTIC, 55200
2014-12-23 23:42:05 +00:00
committed by Ben Pfaff
parent ed5c51108c
commit e60e935b1f
14 changed files with 293 additions and 11 deletions

View File

@@ -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);