Lines Matching refs:buf

29 	u8 *buf; /* pointer to the head of the buffer */  member
35 int wpabuf_resize(struct wpabuf **buf, size_t add_len);
40 void wpabuf_free(struct wpabuf *buf);
41 void wpabuf_clear_free(struct wpabuf *buf);
42 void * wpabuf_put(struct wpabuf *buf, size_t len);
44 struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len);
45 void wpabuf_printf(struct wpabuf *buf, const char *fmt, ...) PRINTF_FORMAT(2, 3);
53 static inline size_t wpabuf_size(const struct wpabuf *buf) in wpabuf_size() argument
55 return buf->size; in wpabuf_size()
63 static inline size_t wpabuf_len(const struct wpabuf *buf) in wpabuf_len() argument
65 return buf->used; in wpabuf_len()
73 static inline size_t wpabuf_tailroom(const struct wpabuf *buf) in wpabuf_tailroom() argument
75 return buf->size - buf->used; in wpabuf_tailroom()
83 static inline const void * wpabuf_head(const struct wpabuf *buf) in wpabuf_head() argument
85 return buf->buf; in wpabuf_head()
88 static inline const u8 * wpabuf_head_u8(const struct wpabuf *buf) in wpabuf_head_u8() argument
90 return wpabuf_head(buf); in wpabuf_head_u8()
98 static inline void * wpabuf_mhead(struct wpabuf *buf) in wpabuf_mhead() argument
100 return buf->buf; in wpabuf_mhead()
103 static inline u8 * wpabuf_mhead_u8(struct wpabuf *buf) in wpabuf_mhead_u8() argument
105 return wpabuf_mhead(buf); in wpabuf_mhead_u8()
108 static inline void wpabuf_put_u8(struct wpabuf *buf, u8 data) in wpabuf_put_u8() argument
110 u8 *pos = wpabuf_put(buf, 1); in wpabuf_put_u8()
114 static inline void wpabuf_put_le16(struct wpabuf *buf, u16 data) in wpabuf_put_le16() argument
116 u8 *pos = wpabuf_put(buf, 2); in wpabuf_put_le16()
120 static inline void wpabuf_put_le32(struct wpabuf *buf, u32 data) in wpabuf_put_le32() argument
122 u8 *pos = wpabuf_put(buf, 4); in wpabuf_put_le32()
126 static inline void wpabuf_put_be16(struct wpabuf *buf, u16 data) in wpabuf_put_be16() argument
128 u8 *pos = wpabuf_put(buf, 2); in wpabuf_put_be16()
132 static inline void wpabuf_put_be24(struct wpabuf *buf, u32 data) in wpabuf_put_be24() argument
134 u8 *pos = wpabuf_put(buf, 3); in wpabuf_put_be24()
138 static inline void wpabuf_put_be32(struct wpabuf *buf, u32 data) in wpabuf_put_be32() argument
140 u8 *pos = wpabuf_put(buf, 4); in wpabuf_put_be32()
144 static inline void wpabuf_put_data(struct wpabuf *buf, const void *data, in wpabuf_put_data() argument
148 os_memcpy(wpabuf_put(buf, len), data, len); in wpabuf_put_data()
157 static inline void wpabuf_set(struct wpabuf *buf, const void *data, size_t len) in wpabuf_set() argument
159 buf->buf = (u8 *) data; in wpabuf_set()
160 buf->flags = WPABUF_FLAG_EXT_DATA; in wpabuf_set()
161 buf->size = buf->used = len; in wpabuf_set()