• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: wal common msg api.
15  */
16 
17 #ifndef __MAC_ADDR_H__
18 #define __MAC_ADDR_H__
19 
20 #ifdef __cplusplus
21 #if __cplusplus
22 extern "C" {
23 #endif
24 #endif
25 
26 #define IFTYPE_BLE 0xF1
27 #define IFTYPE_SLE 0xF2
28 typedef uint32_t(*mac_derivation_ptr)(uint8_t* origin_mac, uint8_t num, uint8_t type,
29     uint8_t *output_mac, uint8_t out_put_num);
30 void set_mac_derivation_ptr(mac_derivation_ptr ptr);
31 void init_dev_addr(void);
32 uint32_t get_dev_addr(uint8_t *pc_addr, uint8_t addr_len, uint8_t type);
33 uint32_t set_dev_addr(const uint8_t *pc_addr, uint8_t mac_len, uint8_t type);
34 
35 #ifdef __cplusplus
36 #if __cplusplus
37 }
38 #endif
39 #endif
40 
41 #endif
42