From owner-svn-src-head@freebsd.org Wed Jun 10 04:54:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD7573285B1; Wed, 10 Jun 2020 04:54:02 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49hZQL4TLKz4fq0; Wed, 10 Jun 2020 04:54:02 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94DC721900; Wed, 10 Jun 2020 04:54:02 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05A4s2s7062646; Wed, 10 Jun 2020 04:54:02 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05A4s2gP062645; Wed, 10 Jun 2020 04:54:02 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202006100454.05A4s2gP062645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Wed, 10 Jun 2020 04:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362004 - head/sys/netgraph/bluetooth/include X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/include X-SVN-Commit-Revision: 362004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 04:54:02 -0000 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