or UINT16_MAX. */
uint16_t l4_ofs; /* Transport-level header offset from 'frame',
or UINT16_MAX. */
- struct list list_node; /* Private list element for use by owner. */
+ struct ovs_list list_node; /* Private list element for use by owner. */
};
static inline void * ofpbuf_data(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);
void *ofpbuf_steal_data(struct ofpbuf *);
char *ofpbuf_to_string(const struct ofpbuf *, size_t maxbytes);
-static inline struct ofpbuf *ofpbuf_from_list(const struct list *);
-void ofpbuf_list_delete(struct list *);
+static inline struct ofpbuf *ofpbuf_from_list(const struct ovs_list *);
+void ofpbuf_list_delete(struct ovs_list *);
static inline bool ofpbuf_equal(const struct ofpbuf *, const struct ofpbuf *);
\f
? ofpbuf_pull(b, size) : NULL;
}
-static inline struct ofpbuf *ofpbuf_from_list(const struct list *list)
+static inline struct ofpbuf *ofpbuf_from_list(const struct ovs_list *list)
{
return CONTAINER_OF(list, struct ofpbuf, list_node);
}
? (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);