X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fofpbuf.h;h=736b8f5e5ee35156f381e5390c7b2e33fd97a406;hb=67b30fcde789088b2e43407167f9ad656c2cc1e5;hp=259e703cf5c79cad90bf58af25877c914610949f;hpb=c69ee87c10818267f991236201150b1fa51ae519;p=openvswitch diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h index 259e703c..736b8f5e 100644 --- a/lib/ofpbuf.h +++ b/lib/ofpbuf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,10 +62,11 @@ void *ofpbuf_put_zeros(struct ofpbuf *, size_t); void *ofpbuf_put(struct ofpbuf *, const void *, size_t); void ofpbuf_reserve(struct ofpbuf *, size_t); void *ofpbuf_push_uninit(struct ofpbuf *b, size_t); +void *ofpbuf_push_zeros(struct ofpbuf *, size_t); void *ofpbuf_push(struct ofpbuf *b, const void *, size_t); -size_t ofpbuf_headroom(struct ofpbuf *); -size_t ofpbuf_tailroom(struct ofpbuf *); +size_t ofpbuf_headroom(const struct ofpbuf *); +size_t ofpbuf_tailroom(const struct ofpbuf *); void ofpbuf_prealloc_headroom(struct ofpbuf *, size_t); void ofpbuf_prealloc_tailroom(struct ofpbuf *, size_t); void ofpbuf_trim(struct ofpbuf *); @@ -74,6 +75,8 @@ void ofpbuf_clear(struct ofpbuf *); void *ofpbuf_pull(struct ofpbuf *, size_t); void *ofpbuf_try_pull(struct ofpbuf *, size_t); +char *ofpbuf_to_string(const struct ofpbuf *, size_t maxbytes); + #ifdef __cplusplus } #endif