bluez/monitor/vendor.h
Luiz Augusto von Dentz cd176eb2d4 monitor: Add latency when decoding BT_HCI_EVT_NUM_COMPLETED_PACKETS
This adds latency, min-max, and median information when decoding
BT_HCI_EVT_NUM_COMPLETED_PACKETS so it works similarly to --analyze:

> HCI Event: Number of Completed Packets (0x13) plen 5
        Num handles: 1
        Handle: 256 Address: XX:XX:XX:XX:XX:XX
        Count: 1
        Latency: 23 msec (2-66 msec ~19 msec)
2023-05-18 16:20:38 -07:00

35 lines
774 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2011-2014 Intel Corporation
* Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
*
*
*/
#include <stdint.h>
struct vendor_ocf {
uint16_t ocf;
const char *str;
void (*cmd_func) (uint16_t index, const void *data, uint8_t size);
uint8_t cmd_size;
bool cmd_fixed;
void (*rsp_func) (uint16_t index, const void *data, uint8_t size);
uint8_t rsp_size;
bool rsp_fixed;
};
struct vendor_evt {
uint8_t evt;
const char *str;
void (*evt_func) (struct timeval *tv, uint16_t index,
const void *data, uint8_t size);
uint8_t evt_size;
bool evt_fixed;
};
void vendor_event(uint16_t manufacturer, const void *data, uint8_t size);