Cooked BTLE link-layer pseudoheader. https://www.tcpdump.org/linktypes/LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR.html
| 72 | |
| 73 | |
| 74 | class BTLE_RF(Packet): |
| 75 | """Cooked BTLE link-layer pseudoheader. |
| 76 | |
| 77 | https://www.tcpdump.org/linktypes/LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR.html |
| 78 | """ |
| 79 | name = "BTLE RF info header" |
| 80 | |
| 81 | _TYPES = { |
| 82 | 0: "ADV_OR_DATA_UNKNOWN_DIR", |
| 83 | 1: "AUX_ADV", |
| 84 | 2: "DATA_M_TO_S", |
| 85 | 3: "DATA_S_TO_M", |
| 86 | 4: "CONN_ISO_M_TO_S", |
| 87 | 5: "CONN_ISO_S_TO_M", |
| 88 | 6: "BROADCAST_ISO", |
| 89 | 7: "RFU", |
| 90 | } |
| 91 | |
| 92 | _PHY = { |
| 93 | 0: "1M", |
| 94 | 1: "2M", |
| 95 | 2: "Coded", |
| 96 | 3: "RFU", |
| 97 | } |
| 98 | |
| 99 | fields_desc = [ |
| 100 | ByteField("rf_channel", 0), |
| 101 | SignedByteField("signal", -128), |
| 102 | SignedByteField("noise", -128), |
| 103 | ByteField("access_address_offenses", 0), |
| 104 | XLEIntField("reference_access_address", 0), |
| 105 | LEBitField("dewhitened", 0, 1), |
| 106 | LEBitField("sig_power_valid", 0, 1), |
| 107 | LEBitField("noise_power_valid", 0, 1), |
| 108 | LEBitField("decrypted", 0, 1), |
| 109 | LEBitField("reference_access_address_valid", 0, 1), |
| 110 | LEBitField("access_address_offenses_valid", 0, 1), |
| 111 | LEBitField("channel_aliased", 0, 1), |
| 112 | LEBitEnumField("type", 0, 3, _TYPES), |
| 113 | LEBitField("crc_checked", 0, 1), |
| 114 | LEBitField("crc_valid", 0, 1), |
| 115 | LEBitField("mic_checked", 0, 1), |
| 116 | LEBitField("mic_valid", 0, 1), |
| 117 | LEBitEnumField("phy", 0, 2, _PHY), |
| 118 | ] |
| 119 | |
| 120 | |
| 121 | ########## |
nothing calls this directly
no test coverage detected