/* Get a new or existing NHDP address entry from the centralized address storage for the given address data  */
static nhdp_addr_t * get_nhdp_db_addr(uint8_t *addr, uint8_t prefix)
/* Get a new or existing NHDP address entry from the centralized address storage for the given address data  */
static nhdp_addr_t * get_nhdp_db_addr(uint8_t *addr, uint8_t prefix)
{
    switch (prefix) {
        case 8:
            return nhdp_addr_db_get_address(addr, 1, AF_CC110X);
        case 32:
            return nhdp_addr_db_get_address(addr, 4, AF_INET);
        default:
            if (prefix < 32) {
                return nhdp_addr_db_get_address(addr, 4, AF_INET);
            }
            else {
                return nhdp_addr_db_get_address(addr, 16, AF_INET6);
            }
    }
}