summaryrefslogtreecommitdiff
path: root/lib/ofpbuf.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-09-01 12:55:38 -0700
committerBen Pfaff <blp@nicira.com>2010-09-01 12:55:50 -0700
commit68efcbec41b0acfd8bb7579a5d38afd71b6daf7c (patch)
tree2cfaa4c9688064bd29a01fdb8c588690e80427cd /lib/ofpbuf.h
parentf79cb67e689566cfbf3071e0ac0e29923ada5a97 (diff)
downloadopenvswitch-68efcbec41b0acfd8bb7579a5d38afd71b6daf7c.tar.gz
ofpbuf: Add ofpbuf_new_with_headroom(), ofpbuf_clone_with_headroom().
These new functions simplify an increasingly common usage pattern. Suggested-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib/ofpbuf.h')
-rw-r--r--lib/ofpbuf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h
index 736b8f5e5..5e20aab0b 100644
--- a/lib/ofpbuf.h
+++ b/lib/ofpbuf.h
@@ -48,7 +48,10 @@ void ofpbuf_uninit(struct ofpbuf *);
void ofpbuf_reinit(struct ofpbuf *, size_t);
struct ofpbuf *ofpbuf_new(size_t);
+struct ofpbuf *ofpbuf_new_with_headroom(size_t, size_t headroom);
struct ofpbuf *ofpbuf_clone(const struct ofpbuf *);
+struct ofpbuf *ofpbuf_clone_with_headroom(const struct ofpbuf *,
+ size_t headroom);
struct ofpbuf *ofpbuf_clone_data(const void *, size_t);
void ofpbuf_delete(struct ofpbuf *);