1 /*
2  * Copyright 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <string>
20 #include <unordered_map>
21 #include <vector>
22 
23 struct header {
24   uint8_t event;
25   uint8_t event_code;
26   uint8_t length;
27   uint8_t num_rsp;
28   uint8_t raw_address[6];
29   uint8_t scan_mode;
30   uint8_t reserved11;
31   uint8_t cod[3];
32   uint16_t clock_offset;
33   uint8_t rssi;
34   uint8_t eir_data[];
35 } __attribute__((packed));
36 
37 constexpr size_t kEirOffset = sizeof(header);
38 constexpr size_t kEirSize = 240U;
39 
40 extern std::unordered_map<std::string, const unsigned char*> selected_packets;
41 extern std::vector<const unsigned char*> data_packets;
42