diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index b018e93..351f843 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
#include "lib/hci.h"
#include "lib/hci_lib.h"
#include "lib/amp.h"
-#include "src/shared/util.h"
static uint16_t manufacturer = DEFAULT_COMPID;
diff --git a/tools/parser/l2cap.c b/tools/parser/l2cap.c
index 53dd726..a057964 100644
--- a/tools/parser/l2cap.c
+++ b/tools/parser/l2cap.c
#include "lib/hci.h"
#include "lib/a2mp.h"
#include "lib/amp.h"
-#include "src/shared/util.h"
typedef struct {
uint16_t handle;
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index c65b4b5..62b8ac5 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
#include <netinet/in.h>
#include "lib/bluetooth.h"
+#include "src/shared/util.h"
struct frame {
void *data;
uint16_t *u16_ptr = frm->ptr;
frm->ptr += 2;
frm->len -= 2;
- return ntohs(bt_get_unaligned(u16_ptr));
+ return get_be16(u16_ptr);
}
static inline uint32_t get_u32(struct frame *frm)
uint32_t *u32_ptr = frm->ptr;
frm->ptr += 4;
frm->len -= 4;
- return ntohl(bt_get_unaligned(u32_ptr));
+ return get_be32(u32_ptr);
}
static inline uint64_t get_u64(struct frame *frm)
{
uint64_t *u64_ptr = frm->ptr;
- uint64_t u64 = bt_get_unaligned(u64_ptr), tmp;
+ uint64_t u64 = get_unaligned(u64_ptr), tmp;
frm->ptr += 8;
frm->len -= 8;
tmp = ntohl(u64 & 0xffffffff);
diff --git a/tools/parser/ppp.c b/tools/parser/ppp.c
index 947ca56..256e172 100644
--- a/tools/parser/ppp.c
+++ b/tools/parser/ppp.c
uint8_t ctrl = get_u8(frm);
uint16_t fcs, proto;
- fcs = bt_get_unaligned((uint16_t *) (frm->ptr + frm->len - 2));
+ fcs = get_unaligned((uint16_t *) (frm->ptr + frm->len - 2));
frm->len -= 2;
p_indent(level, frm);