3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

eap-tls-common: Make databuf private

This commit is contained in:
Tim Kourt 2018-12-11 14:56:54 -08:00 committed by Denis Kenzior
parent 8a8a0df05c
commit fb656ff87a
2 changed files with 9 additions and 15 deletions

View File

@ -32,7 +32,13 @@
#include "src/eap-private.h" #include "src/eap-private.h"
#include "src/eap-tls-common.h" #include "src/eap-tls-common.h"
struct databuf *databuf_new(size_t capacity) struct databuf {
uint8_t *data;
size_t len;
size_t capacity;
};
static struct databuf *databuf_new(size_t capacity)
{ {
struct databuf *databuf; struct databuf *databuf;
@ -46,7 +52,7 @@ struct databuf *databuf_new(size_t capacity)
return databuf; return databuf;
} }
void databuf_append(struct databuf *databuf, const uint8_t *data, static void databuf_append(struct databuf *databuf, const uint8_t *data,
size_t data_len) size_t data_len)
{ {
size_t new_len; size_t new_len;
@ -66,7 +72,7 @@ void databuf_append(struct databuf *databuf, const uint8_t *data,
databuf->len = new_len; databuf->len = new_len;
} }
void databuf_free(struct databuf *databuf) static void databuf_free(struct databuf *databuf)
{ {
if (!databuf) if (!databuf)
return; return;

View File

@ -20,18 +20,6 @@
* *
*/ */
struct databuf {
uint8_t *data;
size_t len;
size_t capacity;
};
struct databuf;
struct databuf *databuf_new(size_t capacity);
void databuf_append(struct databuf *databuf, const uint8_t *data,
size_t data_len);
void databuf_free(struct databuf *databuf);
enum eap_tls_version { enum eap_tls_version {
EAP_TLS_VERSION_0 = 0x00, EAP_TLS_VERSION_0 = 0x00,
EAP_TLS_VERSION_1 = 0x01, EAP_TLS_VERSION_1 = 0x01,