#include <stdbool.h>
#include <sys/time.h>
-#define BTSNOOP_TYPE_INVALID 0
-#define BTSNOOP_TYPE_HCI 1001
-#define BTSNOOP_TYPE_UART 1002
-#define BTSNOOP_TYPE_BCSP 1003
-#define BTSNOOP_TYPE_3WIRE 1004
-#define BTSNOOP_TYPE_MONITOR 2001
-#define BTSNOOP_TYPE_SIMULATOR 2002
+#define BTSNOOP_FORMAT_INVALID 0
+#define BTSNOOP_FORMAT_HCI 1001
+#define BTSNOOP_FORMAT_UART 1002
+#define BTSNOOP_FORMAT_BCSP 1003
+#define BTSNOOP_FORMAT_3WIRE 1004
+#define BTSNOOP_FORMAT_MONITOR 2001
+#define BTSNOOP_FORMAT_SIMULATOR 2002
#define BTSNOOP_FLAG_PKLG_SUPPORT (1 << 0)
#define BTSNOOP_OPCODE_ACL_RX_PKT 5
#define BTSNOOP_OPCODE_SCO_TX_PKT 6
#define BTSNOOP_OPCODE_SCO_RX_PKT 7
+#define BTSNOOP_OPCODE_OPEN_INDEX 8
+#define BTSNOOP_OPCODE_CLOSE_INDEX 9
+#define BTSNOOP_OPCODE_INDEX_INFO 10
+#define BTSNOOP_OPCODE_VENDOR_DIAG 11
+#define BTSNOOP_OPCODE_SYSTEM_NOTE 12
+#define BTSNOOP_OPCODE_USER_LOGGING 13
#define BTSNOOP_MAX_PACKET_SIZE (1486 + 4)
+#define BTSNOOP_TYPE_PRIMARY 0
+#define BTSNOOP_TYPE_AMP 1
+
+#define BTSNOOP_BUS_VIRTUAL 0
+#define BTSNOOP_BUS_USB 1
+#define BTSNOOP_BUS_PCCARD 2
+#define BTSNOOP_BUS_UART 3
+#define BTSNOOP_BUS_RS232 4
+#define BTSNOOP_BUS_PCI 5
+#define BTSNOOP_BUS_SDIO 6
+
struct btsnoop_opcode_new_index {
uint8_t type;
uint8_t bus;
char name[8];
} __attribute__((packed));
+struct btsnoop_opcode_index_info {
+ uint8_t bdaddr[6];
+ uint16_t manufacturer;
+} __attribute__((packed));
+
+#define BTSNOOP_PRIORITY_EMERG 0
+#define BTSNOOP_PRIORITY_ALERT 1
+#define BTSNOOP_PRIORITY_CRIT 2
+#define BTSNOOP_PRIORITY_ERR 3
+#define BTSNOOP_PRIORITY_WARNING 4
+#define BTSNOOP_PRIORITY_NOTICE 5
+#define BTSNOOP_PRIORITY_INFO 6
+#define BTSNOOP_PRIORITY_DEBUG 7
+
+struct btsnoop_opcode_user_logging {
+ uint8_t priority;
+ uint8_t ident_len;
+} __attribute__((packed));
+
struct btsnoop;
struct btsnoop *btsnoop_open(const char *path, unsigned long flags);
#ifdef __TIZEN_PATCH__
-struct btsnoop *btsnoop_create(const char *path, uint32_t type,
+struct btsnoop *btsnoop_create(const char *path, uint32_t format,
int16_t rotate_count, ssize_t file_size);
#else
-struct btsnoop *btsnoop_create(const char *path, uint32_t type);
+struct btsnoop *btsnoop_create(const char *path, uint32_t format);
#endif
struct btsnoop *btsnoop_ref(struct btsnoop *btsnoop);
void btsnoop_unref(struct btsnoop *btsnoop);
-uint32_t btsnoop_get_type(struct btsnoop *btsnoop);
+uint32_t btsnoop_get_format(struct btsnoop *btsnoop);
bool btsnoop_write(struct btsnoop *btsnoop, struct timeval *tv,
uint32_t flags, const void *data, uint16_t size);