$search

wpabuf.c File Reference

#include "includes.h"
#include "common.h"
#include "trace.h"
#include "wpabuf.h"
Include dependency graph for wpabuf.c:

Go to the source code of this file.

Functions

struct wpabufwpabuf_alloc (size_t len)
struct wpabufwpabuf_alloc_copy (const void *data, size_t len)
struct wpabufwpabuf_alloc_ext_data (u8 *data, size_t len)
struct wpabufwpabuf_concat (struct wpabuf *a, struct wpabuf *b)
struct wpabufwpabuf_dup (const struct wpabuf *src)
void wpabuf_free (struct wpabuf *buf)
static void wpabuf_overflow (const struct wpabuf *buf, size_t len)
void wpabuf_printf (struct wpabuf *buf, char *fmt,...)
void * wpabuf_put (struct wpabuf *buf, size_t len)
int wpabuf_resize (struct wpabuf **_buf, size_t add_len)
struct wpabufwpabuf_zeropad (struct wpabuf *buf, size_t len)

Function Documentation

struct wpabuf* wpabuf_alloc ( size_t  len  )  [read]

wpabuf_alloc - Allocate a wpabuf of the given size : Length for the allocated buffer Returns: Buffer to the allocated wpabuf or NULL on failure

Definition at line 118 of file wpabuf.c.

struct wpabuf* wpabuf_alloc_copy ( const void *  data,
size_t  len 
) [read]

Definition at line 163 of file wpabuf.c.

struct wpabuf* wpabuf_alloc_ext_data ( u8 data,
size_t  len 
) [read]

Definition at line 139 of file wpabuf.c.

struct wpabuf* wpabuf_concat ( struct wpabuf a,
struct wpabuf b 
) [read]

wpabuf_concat - Concatenate two buffers into a newly allocated one : First buffer : Second buffer Returns: wpabuf with concatenated a + b data or NULL on failure

Both buffers a and b will be freed regardless of the return value. Input buffers can be NULL which is interpreted as an empty buffer.

Definition at line 229 of file wpabuf.c.

struct wpabuf* wpabuf_dup ( const struct wpabuf src  )  [read]

Definition at line 172 of file wpabuf.c.

void wpabuf_free ( struct wpabuf buf  ) 

wpabuf_free - Free a wpabuf : wpabuf buffer

Definition at line 185 of file wpabuf.c.

static void wpabuf_overflow ( const struct wpabuf buf,
size_t  len 
) [static]

Definition at line 36 of file wpabuf.c.

void wpabuf_printf ( struct wpabuf buf,
char *  fmt,
  ... 
)

Definition at line 292 of file wpabuf.c.

void* wpabuf_put ( struct wpabuf buf,
size_t  len 
)

Definition at line 209 of file wpabuf.c.

int wpabuf_resize ( struct wpabuf **  _buf,
size_t  add_len 
)

Definition at line 53 of file wpabuf.c.

struct wpabuf* wpabuf_zeropad ( struct wpabuf buf,
size_t  len 
) [read]

wpabuf_zeropad - Pad buffer with 0x00 octets (prefix) to specified length : Buffer to be padded : Length for the padded buffer Returns: wpabuf padded to len octets or NULL on failure

If buf is longer than len octets or of same size, it will be returned as-is. Otherwise a new buffer is allocated and prefixed with 0x00 octets followed by the source data. The source buffer will be freed on error, i.e., caller will only be responsible on freeing the returned buffer. If buf is NULL, NULL will be returned.

Definition at line 269 of file wpabuf.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Mar 1 16:00:49 2013