mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #3492 from BytesGalore/fib_changed_prefix_size_name
fib: changed misleading parameter name and documentation
This commit is contained in:
commit
02f502ddab
@ -70,14 +70,15 @@ void fib_deinit(void);
|
||||
/**
|
||||
* @brief Registration of a routing protocol handler function
|
||||
*
|
||||
* @param[in] prefix the prefix handled by the according RP
|
||||
* @param[in] prefix_size the prefix size
|
||||
* @param[in] prefix the prefix handled by the according RP
|
||||
* @param[in] prefix_addr_type_size the size of the address type used for the prefix
|
||||
*
|
||||
* @return 0 on success
|
||||
* -ENOMEM if the entry cannot be registered (mximum registrations reached)
|
||||
* -EINVAL if the prefix is NULL or the provided size is 0
|
||||
*
|
||||
*/
|
||||
int fib_register_rp(uint8_t *prefix, size_t prefix_size);
|
||||
int fib_register_rp(uint8_t *prefix, size_t prefix_addr_type_size);
|
||||
|
||||
/**
|
||||
* @brief Adds a new entry in the corresponding FIB table for global destination and next hop
|
||||
|
@ -550,7 +550,7 @@ void fib_deinit(void)
|
||||
mutex_unlock(&mtx_access);
|
||||
}
|
||||
|
||||
int fib_register_rp(uint8_t *prefix, size_t prefix_size)
|
||||
int fib_register_rp(uint8_t *prefix, size_t prefix_addr_type_size)
|
||||
{
|
||||
mutex_lock(&mtx_access);
|
||||
|
||||
@ -559,14 +559,14 @@ int fib_register_rp(uint8_t *prefix, size_t prefix_size)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if ((prefix == NULL) || (prefix_size == 0)) {
|
||||
if ((prefix == NULL) || (prefix_addr_type_size == 0)) {
|
||||
mutex_unlock(&mtx_access);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (notify_rp_pos < FIB_MAX_REGISTERED_RP) {
|
||||
notify_rp[notify_rp_pos] = sched_active_pid;
|
||||
universal_address_container_t *container = universal_address_add(prefix, prefix_size);
|
||||
universal_address_container_t *container = universal_address_add(prefix, prefix_addr_type_size);
|
||||
prefix_rp[notify_rp_pos] = container;
|
||||
notify_rp_pos++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user