From: Archie Pusaka <apusaka@xxxxxxxxxxxx> "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. --- monitor/packet.c | 110 +++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/monitor/packet.c b/monitor/packet.c index b6c7fe7234..3609235d06 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2722,11 +2722,11 @@ void packet_print_features_msft(const uint8_t *features) #define LE_STATE_ACTIVE_SCAN 0x0020 #define LE_STATE_PASSIVE_SCAN 0x0040 #define LE_STATE_INITIATING 0x0080 -#define LE_STATE_CONN_MASTER 0x0100 -#define LE_STATE_CONN_SLAVE 0x0200 -#define LE_STATE_MASTER_MASTER 0x0400 -#define LE_STATE_SLAVE_SLAVE 0x0800 -#define LE_STATE_MASTER_SLAVE 0x1000 +#define LE_STATE_CONN_CENTRAL 0x0100 +#define LE_STATE_CONN_PERIPHERAL 0x0200 +#define LE_STATE_CENTRAL_CENTRAL 0x0400 +#define LE_STATE_PERIPHERAL_PERIPHERAL 0x0800 +#define LE_STATE_CENTRAL_PERIPHERAL 0x1000 static const struct bitfield_data le_states_desc_table[] = { { 0, "Scannable Advertising State" }, @@ -2749,59 +2749,59 @@ static const struct { uint8_t bit; uint16_t states; } le_states_comb_table[] = { - { 0, LE_STATE_NONCONN_ADV }, - { 1, LE_STATE_SCAN_ADV }, - { 2, LE_STATE_CONN_ADV }, - { 3, LE_STATE_HIGH_DIRECT_ADV }, - { 4, LE_STATE_PASSIVE_SCAN }, - { 5, LE_STATE_ACTIVE_SCAN }, - { 6, LE_STATE_INITIATING | LE_STATE_CONN_MASTER }, - { 7, LE_STATE_CONN_SLAVE }, - { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, - { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, - { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, - { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, - { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, - { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, - { 18, LE_STATE_CONN_MASTER | LE_STATE_NONCONN_ADV }, - { 19, LE_STATE_CONN_MASTER | LE_STATE_SCAN_ADV }, - { 20, LE_STATE_CONN_SLAVE | LE_STATE_NONCONN_ADV }, - { 21, LE_STATE_CONN_SLAVE | LE_STATE_SCAN_ADV }, - { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, - { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, - { 24, LE_STATE_CONN_MASTER | LE_STATE_PASSIVE_SCAN }, - { 25, LE_STATE_CONN_MASTER | LE_STATE_ACTIVE_SCAN }, - { 26, LE_STATE_CONN_SLAVE | LE_STATE_PASSIVE_SCAN }, - { 27, LE_STATE_CONN_SLAVE | LE_STATE_ACTIVE_SCAN }, - { 28, LE_STATE_INITIATING | LE_STATE_CONN_MASTER | - LE_STATE_MASTER_MASTER }, - { 29, LE_STATE_LOW_DIRECT_ADV }, - { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, - { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, + { 0, LE_STATE_NONCONN_ADV }, + { 1, LE_STATE_SCAN_ADV }, + { 2, LE_STATE_CONN_ADV }, + { 3, LE_STATE_HIGH_DIRECT_ADV }, + { 4, LE_STATE_PASSIVE_SCAN }, + { 5, LE_STATE_ACTIVE_SCAN }, + { 6, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL }, + { 7, LE_STATE_CONN_PERIPHERAL }, + { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, + { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, + { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, + { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, + { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, + { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, + { 18, LE_STATE_CONN_CENTRAL | LE_STATE_NONCONN_ADV }, + { 19, LE_STATE_CONN_CENTRAL | LE_STATE_SCAN_ADV }, + { 20, LE_STATE_CONN_PERIPHERAL | LE_STATE_NONCONN_ADV }, + { 21, LE_STATE_CONN_PERIPHERAL | LE_STATE_SCAN_ADV }, + { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, + { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, + { 24, LE_STATE_CONN_CENTRAL | LE_STATE_PASSIVE_SCAN }, + { 25, LE_STATE_CONN_CENTRAL | LE_STATE_ACTIVE_SCAN }, + { 26, LE_STATE_CONN_PERIPHERAL | LE_STATE_PASSIVE_SCAN }, + { 27, LE_STATE_CONN_PERIPHERAL | LE_STATE_ACTIVE_SCAN }, + { 28, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL | + LE_STATE_CENTRAL_CENTRAL }, + { 29, LE_STATE_LOW_DIRECT_ADV }, + { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, + { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, { 32, LE_STATE_INITIATING | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 33, LE_STATE_INITIATING | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 34, LE_STATE_INITIATING | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 35, LE_STATE_CONN_MASTER | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 36, LE_STATE_CONN_MASTER | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 37, LE_STATE_CONN_MASTER | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 38, LE_STATE_CONN_SLAVE | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 39, LE_STATE_CONN_SLAVE | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 40, LE_STATE_CONN_SLAVE | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 41, LE_STATE_INITIATING | LE_STATE_CONN_SLAVE | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, + { 35, LE_STATE_CONN_CENTRAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 36, LE_STATE_CONN_CENTRAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 37, LE_STATE_CONN_CENTRAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 38, LE_STATE_CONN_PERIPHERAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 39, LE_STATE_CONN_PERIPHERAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 40, LE_STATE_CONN_PERIPHERAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 41, LE_STATE_INITIATING | LE_STATE_CONN_PERIPHERAL | + LE_STATE_CENTRAL_PERIPHERAL }, { } }; -- 2.33.0.rc1.237.g0d66db33f3-goog