Updated to hostap_2_6
[mech_eap.git] / libeap / src / utils / wpabuf.h
index 64b3d8d..0458e3f 100644 (file)
@@ -41,6 +41,7 @@ void * wpabuf_put(struct wpabuf *buf, size_t len);
 struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b);
 struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len);
 void wpabuf_printf(struct wpabuf *buf, char *fmt, ...) PRINTF_FORMAT(2, 3);
+struct wpabuf * wpabuf_parse_bin(const char *buf);
 
 
 /**
@@ -85,7 +86,7 @@ static inline const void * wpabuf_head(const struct wpabuf *buf)
 
 static inline const u8 * wpabuf_head_u8(const struct wpabuf *buf)
 {
-       return (const u8 *)wpabuf_head(buf);
+       return (const u8 *) wpabuf_head(buf);
 }
 
 /**
@@ -100,42 +101,42 @@ static inline void * wpabuf_mhead(struct wpabuf *buf)
 
 static inline u8 * wpabuf_mhead_u8(struct wpabuf *buf)
 {
-       return (u8 *)wpabuf_mhead(buf);
+       return (u8 *) wpabuf_mhead(buf);
 }
 
 static inline void wpabuf_put_u8(struct wpabuf *buf, u8 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 1);
+       u8 *pos = (u8 *) wpabuf_put(buf, 1);
        *pos = data;
 }
 
 static inline void wpabuf_put_le16(struct wpabuf *buf, u16 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 2);
+       u8 *pos = (u8 *) wpabuf_put(buf, 2);
        WPA_PUT_LE16(pos, data);
 }
 
 static inline void wpabuf_put_le32(struct wpabuf *buf, u32 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 4);
+       u8 *pos = (u8 *) wpabuf_put(buf, 4);
        WPA_PUT_LE32(pos, data);
 }
 
 static inline void wpabuf_put_be16(struct wpabuf *buf, u16 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 2);
+       u8 *pos = (u8 *) wpabuf_put(buf, 2);
        WPA_PUT_BE16(pos, data);
 }
 
 static inline void wpabuf_put_be24(struct wpabuf *buf, u32 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 3);
+       u8 *pos = (u8 *) wpabuf_put(buf, 3);
        WPA_PUT_BE24(pos, data);
 }
 
 static inline void wpabuf_put_be32(struct wpabuf *buf, u32 data)
 {
-       u8 *pos = (u8 *)wpabuf_put(buf, 4);
+       u8 *pos = (u8 *) wpabuf_put(buf, 4);
        WPA_PUT_BE32(pos, data);
 }