mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 15:31:17 +01:00
gnrc_netif: provide PID-based version for netif ID
This commit is contained in:
parent
b8294f1ba0
commit
652276f00f
@ -34,6 +34,17 @@ int netif_get_name(netif_t *iface, char *name)
|
||||
return res;
|
||||
}
|
||||
|
||||
int16_t netif_get_id(const netif_t *netif)
|
||||
{
|
||||
const gnrc_netif_t *iface = (const gnrc_netif_t*)netif;
|
||||
return iface->pid;
|
||||
}
|
||||
|
||||
netif_t *netif_get_by_id(int16_t id)
|
||||
{
|
||||
return &gnrc_netif_get_by_pid((kernel_pid_t)id)->netif;
|
||||
}
|
||||
|
||||
int netif_get_opt(netif_t *netif, netopt_t opt, uint16_t context,
|
||||
void *value, size_t max_len)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user