CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/cache/sources/hcitools/monitor/packet.h
Views: 3959
1
/*
2
*
3
* BlueZ - Bluetooth protocol stack for Linux
4
*
5
* Copyright (C) 2011-2012 Intel Corporation
6
* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>
7
*
8
*
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
*
23
*/
24
25
#include <stdint.h>
26
#include <stdbool.h>
27
#include <sys/time.h>
28
29
#define PACKET_FILTER_SHOW_INDEX (1 << 0)
30
#define PACKET_FILTER_SHOW_DATE (1 << 1)
31
#define PACKET_FILTER_SHOW_TIME (1 << 2)
32
#define PACKET_FILTER_SHOW_TIME_OFFSET (1 << 3)
33
#define PACKET_FILTER_SHOW_ACL_DATA (1 << 4)
34
#define PACKET_FILTER_SHOW_SCO_DATA (1 << 5)
35
36
void packet_set_filter(unsigned long filter);
37
void packet_add_filter(unsigned long filter);
38
void packet_del_filter(unsigned long filter);
39
40
void packet_select_index(uint16_t index);
41
42
void packet_hexdump(const unsigned char *buf, uint16_t len);
43
void packet_print_version(const char *label, uint8_t version,
44
const char *sublabel, uint16_t subversion);
45
void packet_print_company(const char *label, uint16_t company);
46
void packet_print_addr(const char *label, const void *data, bool random);
47
void packet_print_ad(const void *data, uint8_t size);
48
void packet_print_features_ll(const uint8_t *features);
49
void packet_print_channel_map_ll(const uint8_t *map);
50
51
void packet_control(struct timeval *tv, uint16_t index, uint16_t opcode,
52
const void *data, uint16_t size);
53
void packet_monitor(struct timeval *tv, uint16_t index, uint16_t opcode,
54
const void *data, uint16_t size);
55
void packet_simulator(struct timeval *tv, uint16_t frequency,
56
const void *data, uint16_t size);
57
58
void packet_new_index(struct timeval *tv, uint16_t index, const char *label,
59
uint8_t type, uint8_t bus, const char *name);
60
void packet_del_index(struct timeval *tv, uint16_t index, const char *label);
61
62
void packet_hci_command(struct timeval *tv, uint16_t index,
63
const void *data, uint16_t size);
64
void packet_hci_event(struct timeval *tv, uint16_t index,
65
const void *data, uint16_t size);
66
void packet_hci_acldata(struct timeval *tv, uint16_t index, bool in,
67
const void *data, uint16_t size);
68
void packet_hci_scodata(struct timeval *tv, uint16_t index, bool in,
69
const void *data, uint16_t size);
70
71