BA
/
BaBoRo1
Embed:
(wiki syntax)
Show/hide line numbers
pan_blacklist_api.h
00001 /* 00002 * Copyright (c) 2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #ifndef SERVICE_LIBS_PAN_BLACKLIST_PAN_BLACKLIST_API_H_ 00019 #define SERVICE_LIBS_PAN_BLACKLIST_PAN_BLACKLIST_API_H_ 00020 #include "ns_list.h" 00021 typedef struct pan_blaclist_entry { 00022 uint16_t pan_id; 00023 uint16_t timeout_in_seconds; 00024 ns_list_link_t link; 00025 } pan_blaclist_entry_t; 00026 00027 typedef struct pan_coordinator_blacklist_entry { 00028 uint8_t coordinator_pan_address[10]; 00029 uint16_t timeout_in_seconds; 00030 ns_list_link_t link; 00031 } pan_coordinator_blacklist_entry_t; 00032 00033 /*! 00034 * \struct pan_blaclist_cache_s 00035 * 00036 * \brief Top-level pan blacklist cache descriptor. 00037 * 00038 * This passed by reference to all APIs. Users should not manipulate contents. 00039 */ 00040 typedef struct pan_blaclist_cache_s { 00041 NS_LIST_HEAD(pan_blaclist_entry_t, link) head; 00042 } pan_blaclist_cache_s; 00043 00044 /*! 00045 * \struct pan_coordinator_blaclist_cache_s 00046 * 00047 * \brief Top-level pan coordinator blacklist cache descriptor. 00048 * 00049 * This passed by reference to all APIs. Users should not manipulate contents. 00050 */ 00051 typedef struct pan_coordinator_blacklist_cache_s { 00052 NS_LIST_HEAD (pan_coordinator_blacklist_entry_t, link) head; 00053 } pan_coordinator_blaclist_cache_s; 00054 00055 00056 void pan_blacklist_cache_init(pan_blaclist_cache_s *blacklist_cache); 00057 00058 void pan_coordinator_blacklist_cache_init(pan_coordinator_blaclist_cache_s *blacklist_cache); 00059 00060 void pan_coordinator_blacklist_free(pan_coordinator_blaclist_cache_s *list_ptr); 00061 00062 void pan_blacklist_pan_set(pan_blaclist_cache_s *list_ptr, uint16_t panid, uint16_t timeout); 00063 00064 void pan_cordinator_blacklist_pan_set(pan_coordinator_blaclist_cache_s *list_ptr, uint8_t *cordinator_data, uint16_t timeout); 00065 00066 void pan_blacklist_time_update(pan_blaclist_cache_s *list_ptr, uint16_t time_update_in_seconds); 00067 00068 void pan_coordinator_blacklist_time_update(pan_coordinator_blaclist_cache_s *list_ptr, uint16_t time_update_in_seconds); 00069 00070 bool pan_blacklist_filter(pan_blaclist_cache_s *list_ptr, uint16_t panid); 00071 00072 bool pan_cordinator_blacklist_filter(pan_coordinator_blaclist_cache_s *list_ptr, uint8_t *compare_data); 00073 00074 #endif /* SERVICE_LIBS_PAN_BLACKLIST_PAN_BLACKLIST_API_H_ */
Generated on Tue Jul 12 2022 12:22:16 by
