Added enhancement to address cache: Top Protected Entry: entries from 0 to Top_Protected_Entry are not removed by address_remove_oldest()function. When I-am attack occurs only entries between Top_Protected_Entry and MAX_ADDRESS_CACHE can be removed.

This commit is contained in:
skarg
2016-08-12 21:57:57 +00:00
parent bec5836bbd
commit 278af89fa2
2 changed files with 88 additions and 8 deletions
+16
View File
@@ -59,6 +59,13 @@ extern "C" {
unsigned *max_apdu,
BACNET_ADDRESS * src);
bool address_device_get_by_index(
unsigned index,
uint32_t * device_id,
uint32_t * device_ttl,
unsigned *max_apdu,
BACNET_ADDRESS * src);
bool address_get_device_id(
BACNET_ADDRESS * src,
uint32_t * device_id);
@@ -75,6 +82,12 @@ extern "C" {
unsigned *max_apdu,
BACNET_ADDRESS * src);
bool address_device_bind_request(
uint32_t device_id,
uint32_t * device_ttl,
unsigned *max_apdu,
BACNET_ADDRESS * src);
void address_add_binding(
uint32_t device_id,
unsigned max_apdu,
@@ -105,6 +118,9 @@ extern "C" {
BACNET_MAC_ADDRESS *mac,
char *arg);
void address_protected_entry_index_set(uint32_t top_protected_entry_index);
void address_own_device_id_set(uint32_t own_id);
#ifdef __cplusplus
}
#endif /* __cplusplus */