diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-02-27 00:55:34 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-02-27 00:55:34 -0800 |
commit | ee39765d310e7a10f7ad1c5f1e885156ab2935ad (patch) | |
tree | 224bbbb9d728699d7e8899f3e389cd7cba4a296b /monitor/packet.h | |
parent | 987ffb7360b3b4e42a81fd898c403f9619c6dbb8 (diff) | |
download | bluez-ee39765d310e7a10f7ad1c5f1e885156ab2935ad.tar.gz |
monitor: Add support for hcidump fallback
Diffstat (limited to 'monitor/packet.h')
-rw-r--r-- | monitor/packet.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/monitor/packet.h b/monitor/packet.h new file mode 100644 index 000000000..90fc7ec41 --- /dev/null +++ b/monitor/packet.h @@ -0,0 +1,54 @@ +/* + * + * 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 <stdbool.h> +#include <sys/time.h> + +#define PACKET_FILTER_SHOW_INDEX (1 << 0) +#define PACKET_FILTER_SHOW_DATE (1 << 1) +#define PACKET_FILTER_SHOW_TIME (1 << 2) +#define PACKET_FILTER_SHOW_ACL_DATA (1 << 3) +#define PACKET_FILTER_SHOW_SCO_DATA (1 << 4) + +void packet_set_filter(unsigned long filter); + +void packet_hexdump(const unsigned char *buf, uint16_t len); + +void packet_control(struct timeval *tv, uint16_t index, uint16_t opcode, + const void *data, uint16_t size); +void packet_monitor(struct timeval *tv, uint16_t index, uint16_t opcode, + const void *data, uint16_t size); + +void packet_new_index(struct timeval *tv, uint16_t index, const char *label, + uint8_t type, uint8_t bus, const char *name); +void packet_del_index(struct timeval *tv, uint16_t index, const char *label); + +void packet_hci_command(struct timeval *tv, uint16_t index, + const void *data, uint16_t size); +void packet_hci_event(struct timeval *tv, uint16_t index, + const void *data, uint16_t size); +void packet_hci_acldata(struct timeval *tv, uint16_t index, bool in, + const void *data, uint16_t size); +void packet_hci_scodata(struct timeval *tv, uint16_t index, bool in, + const void *data, uint16_t size); |