Lines Matching refs:wpabuf

29 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf)  in wpabuf_get_trace()
37 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow()
52 int wpabuf_resize(struct wpabuf **_buf, size_t add_len) in wpabuf_resize()
54 struct wpabuf *buf = *_buf; in wpabuf_resize()
84 sizeof(struct wpabuf) + in wpabuf_resize()
89 buf = (struct wpabuf *) (trace + 1); in wpabuf_resize()
91 sizeof(struct wpabuf) + buf->used, 0, in wpabuf_resize()
94 nbuf = (unsigned char*)os_realloc(buf, sizeof(struct wpabuf) + in wpabuf_resize()
98 buf = (struct wpabuf *) nbuf; in wpabuf_resize()
99 memset(nbuf + sizeof(struct wpabuf) + buf->used, 0, in wpabuf_resize()
117 struct wpabuf * wpabuf_alloc(size_t len) in wpabuf_alloc()
121 sizeof(struct wpabuf) + len); in wpabuf_alloc()
122 struct wpabuf *buf; in wpabuf_alloc()
126 buf = (struct wpabuf *) (trace + 1); in wpabuf_alloc()
128 struct wpabuf *buf = (struct wpabuf *)os_zalloc(sizeof(struct wpabuf) + len); in wpabuf_alloc()
138 struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len) in wpabuf_alloc_ext_data()
142 sizeof(struct wpabuf)); in wpabuf_alloc_ext_data()
143 struct wpabuf *buf; in wpabuf_alloc_ext_data()
147 buf = (struct wpabuf *) (trace + 1); in wpabuf_alloc_ext_data()
149 struct wpabuf *buf = (struct wpabuf *)os_zalloc(sizeof(struct wpabuf)); in wpabuf_alloc_ext_data()
163 struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len) in wpabuf_alloc_copy()
165 struct wpabuf *buf = wpabuf_alloc(len); in wpabuf_alloc_copy()
172 struct wpabuf * wpabuf_dup(const struct wpabuf *src) in wpabuf_dup()
174 struct wpabuf *buf = wpabuf_alloc(wpabuf_len(src)); in wpabuf_dup()
185 void wpabuf_free(struct wpabuf *buf) in wpabuf_free()
210 void wpabuf_clear_free(struct wpabuf *buf) in wpabuf_clear_free()
219 void * wpabuf_put(struct wpabuf *buf, size_t len) in wpabuf_put()
239 struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b) in wpabuf_concat()
241 struct wpabuf *n = NULL; in wpabuf_concat()
279 struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len) in wpabuf_zeropad()
281 struct wpabuf *ret; in wpabuf_zeropad()
301 void wpabuf_printf(struct wpabuf *buf, const char *fmt, ...) in wpabuf_printf()