do_write(tv, flags, data, size);
}
-int btsnoop_open(const char *path)
+int btsnoop_open(const char *path, uint32_t *type)
{
struct btsnoop_hdr hdr;
ssize_t len;
break;
}
+ if (type)
+ *type = btsnoop_type;
+
return 0;
}
void btsnoop_create(const char *path);
void btsnoop_write(struct timeval *tv, uint16_t index, uint16_t opcode,
const void *data, uint16_t size);
-int btsnoop_open(const char *path);
+int btsnoop_open(const char *path, uint32_t *type);
int btsnoop_read(struct timeval *tv, uint16_t *index, uint16_t *opcode,
void *data, uint16_t *size);
void btsnoop_close(void);
{
unsigned char buf[MAX_PACKET_SIZE];
uint16_t index, opcode, pktlen;
+ uint32_t type;
struct timeval tv;
- if (btsnoop_open(path) < 0)
+ if (btsnoop_open(path, &type) < 0)
return;
open_pager();