Diff between a9134a625d13de2c5edc6e980093354b4b16e49e and f8444cbe7a97eb96930e66f22c602dbce6b03fdf

Changed Files

File Additions Deletions Status
Makefile.tools +2 -1 modified
monitor/ll.c +35 -0 added
monitor/ll.h +27 -0 added
monitor/packet.c +2 -1 modified

Full Patch

diff --git a/Makefile.tools b/Makefile.tools
index f7fbc40..0509e68 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -23,7 +23,8 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
 					monitor/vendor.h monitor/vendor.c \
 					monitor/l2cap.h monitor/l2cap.c \
 					monitor/uuid.h monitor/uuid.c \
-					monitor/sdp.h monitor/sdp.c
+					monitor/sdp.h monitor/sdp.c \
+					monitor/ll.h monitor/ll.c
 monitor_btmon_LDADD = lib/libbluetooth-internal.la
 endif
 
diff --git a/monitor/ll.c b/monitor/ll.c
new file mode 100644
index 0000000..95fed72
--- /dev/null
+++ b/monitor/ll.c
@@ -0,0 +1,35 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2011-2012  Intel Corporation
+ *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "packet.h"
+#include "ll.h"
+
+void ll_packet(uint16_t frequency, const void *data, uint8_t size)
+{
+	packet_hexdump(data, size);
+}
diff --git a/monitor/ll.h b/monitor/ll.h
new file mode 100644
index 0000000..496bc22
--- /dev/null
+++ b/monitor/ll.h
@@ -0,0 +1,27 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2011-2012  Intel Corporation
+ *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include <stdint.h>
+
+void ll_packet(uint16_t frequency, const void *data, uint8_t size);
diff --git a/monitor/packet.c b/monitor/packet.c
index 1d69c17..4070e60 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -43,6 +43,7 @@
 
 #include "display.h"
 #include "bt.h"
+#include "ll.h"
 #include "uuid.h"
 #include "l2cap.h"
 #include "control.h"
@@ -2293,7 +2294,7 @@ void packet_simulator(struct timeval *tv, uint16_t frequency,
 
 	print_packet(tv, 0, '*', COLOR_PHY_PACKET, label, NULL, extra);
 
-	packet_hexdump(data, size);
+	ll_packet(frequency, data, size);
 }
 
 static void null_cmd(const void *data, uint8_t size)