netif_get_ip6_addr_match/netif_add_ip6_address must take a const ip6addr to be usable

This commit is contained in:
Dirk Zigelmeier 2015-09-30 20:55:08 +02:00 committed by sg
parent 1bcd361456
commit 3f4d75c8d6
2 changed files with 4 additions and 4 deletions

View File

@ -897,7 +897,7 @@ netif_poll_all(void)
* -1: address not found on this netif
*/
s8_t
netif_get_ip6_addr_match(struct netif *netif, ip6_addr_t *ip6addr)
netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr)
{
s8_t i;
for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
@ -968,7 +968,7 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit)
* @param chosen_idx if != NULL, the chosen IPv6 address index will be stored here
*/
err_t
netif_add_ip6_address(struct netif *netif, ip6_addr_t *ip6addr, s8_t *chosen_idx)
netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx)
{
s8_t i;

View File

@ -400,9 +400,9 @@ void netif_poll_all(void);
#define netif_ip6_addr_set(netif, i, addr6) do { ip6_addr_set(ip_2_ip6(&((netif)->ip6_addr[i])), addr6); IP_SET_TYPE_VAL((netif)->ip6_addr[i], IPADDR_TYPE_V6); } while(0)
#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i])
#define netif_ip6_addr_set_state(netif, i, state) ((netif)->ip6_addr_state[i] = (state))
s8_t netif_get_ip6_addr_match(struct netif *netif, ip6_addr_t *ip6addr);
s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr);
void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit);
err_t netif_add_ip6_address(struct netif *netif, ip6_addr_t *ip6addr, s8_t *chosen_idx);
err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx);
#endif /* LWIP_IPV6 */
#if LWIP_NETIF_HWADDRHINT