svn commit: r362004 - head/sys/netgraph/bluetooth/include
Takanori Watanabe
takawata at FreeBSD.org
Wed Jun 10 04:54:02 UTC 2020
Author: takawata
Date: Wed Jun 10 04:54:02 2020
New Revision: 362004
URL: https://svnweb.freebsd.org/changeset/base/362004
Log:
Add LE events:
READ_REMOTE_FEATURES_COMPL
LONG_TERM_KEY_REQUEST
REMOTE_CONN_PARAM_REQUEST
DATA_LENGTH_CHANGE
READ_LOCAL_P256_PK_COMPL
GEN_DHKEY_COMPL
ENH_CONN_COMPL
PR: 247050
Submitted by: Marc Veldman marc at bumblingdork.com
Modified:
head/sys/netgraph/bluetooth/include/ng_hci.h
Modified: head/sys/netgraph/bluetooth/include/ng_hci.h
==============================================================================
--- head/sys/netgraph/bluetooth/include/ng_hci.h Wed Jun 10 04:08:16 2020 (r362003)
+++ head/sys/netgraph/bluetooth/include/ng_hci.h Wed Jun 10 04:54:02 2020 (r362004)
@@ -1992,11 +1992,65 @@ typedef struct {
u_int16_t conn_latency;
u_int16_t supervision_timeout;
}__attribute__((packed)) ng_hci_connection_update_complete_ep;
+
#define NG_HCI_LEEV_READ_REMOTE_FEATURES_COMPL 0x04
-//TBD
+typedef struct {
+ u_int8_t status;
+ u_int16_t connection_handle;
+ u_int8_t features[NG_HCI_FEATURES_SIZE];
+}__attribute__((packed)) ng_hci_le_read_remote_features_ep;
+
#define NG_HCI_LEEV_LONG_TERM_KEY_REQUEST 0x05
-//TBD
+typedef struct {
+ u_int16_t connection_handle;
+ u_int64_t random_number;
+ u_int16_t encrypted_diversifier;
+}__attribute__((packed)) ng_hci_le_long_term_key_request_ep;
+#define NG_HCI_LEEV_REMOTE_CONN_PARAM_REQUEST 0x06
+typedef struct {
+ u_int16_t connection_handle;
+ u_int16_t interval_min;
+ u_int16_t interval_max;
+ u_int16_t latency;
+ u_int16_t timeout;
+}__attribute__((packed)) ng_hci_le_remote_conn_param_ep;
+
+#define NG_HCI_LEEV_DATA_LENGTH_CHANGE 0x07
+typedef struct {
+ u_int16_t connection_handle;
+ u_int16_t min_tx_octets;
+ u_int16_t max_tx_time;
+ u_int16_t max_rx_octets;
+ u_int16_t max_rx_time;
+}__attribute__((packed)) ng_hci_le_data_length_change_ep;
+
+#define NG_HCI_LEEV_READ_LOCAL_P256_PK_COMPL 0x08
+typedef struct {
+ u_int8_t status;
+ u_int8_t local_p256_pk[64];
+}__attribute__((packed)) ng_hci_le_read_local_p256_pk_compl_ep;
+
+#define NG_HCI_LEEV_GEN_DHKEY_COMPL 0x09
+typedef struct {
+ u_int8_t status;
+ u_int8_t dh_key[32];
+}__attribute__((packed)) ng_hci_le_gen_dhkey_compl_ep;
+
+#define NG_HCI_LEEV_ENH_CONN_COMPL 0x0a
+typedef struct {
+ u_int8_t status;
+ u_int16_t connection_handle;
+ u_int8_t role;
+ u_int8_t peer_addr_type;
+ bdaddr_t peer_addr;
+ bdaddr_t local_res_private_addr;
+ bdaddr_t peer_res_private_addr;
+ u_int16_t conn_interval;
+ u_int16_t conn_latency;
+ u_int16_t supervision_timeout;
+ u_int8_t master_clock_accuracy;
+}__attribute__((packed)) ng_hci_le_enh_conn_compl_ep;
#define NG_HCI_EVENT_BT_LOGO 0xfe
More information about the svn-src-all
mailing list