Loading...
Searching...
No Matches
NETIF related
APIs » Sequential-style APIs » NETIF API

## Macros

#define | netifapi_netif_remove(n)
#define | netifapi_netif_set_up(n)
#define | netifapi_netif_set_down(n)
#define | netifapi_netif_set_default(n)
#define | netifapi_netif_set_link_up(n)
#define | netifapi_netif_set_link_down(n)

## Functions

err_t | netifapi_netif_add (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
err_t | netifapi_netif_set_addr (struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw)
err_t | netifapi_netif_name_to_index (const char *name, u8_t *idx)
err_t | netifapi_netif_index_to_name (u8_t idx, char *name)

## Detailed Description

To be called from non-TCPIP threads

## Macro Definition Documentation

## netifapi_netif_remove

#define netifapi_netif_remove | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_remove, NULL)
netif_remove
void netif_remove(struct netif *netif)
Definition netif.c:764
netifapi_netif_common
err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc)
Definition netifapi.c:307

See also
  netif_remove()

## netifapi_netif_set_default

#define netifapi_netif_set_default | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_set_default, NULL)
netif_set_default
void netif_set_default(struct netif *netif)
Definition netif.c:849

See also
  netif_set_default()

## netifapi_netif_set_down

#define netifapi_netif_set_down | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_set_down, NULL)
netif_set_down
void netif_set_down(struct netif *netif)
Definition netif.c:949

See also
  netif_set_down()

## netifapi_netif_set_link_down

#define netifapi_netif_set_link_down | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_set_link_down, NULL)
netif_set_link_down
void netif_set_link_down(struct netif *netif)
Definition netif.c:1056

See also
  netif_set_link_down()

## netifapi_netif_set_link_up

#define netifapi_netif_set_link_up | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_set_link_up, NULL)
netif_set_link_up
void netif_set_link_up(struct netif *netif)
Definition netif.c:1018

See also
  netif_set_link_up()

## netifapi_netif_set_up

#define netifapi_netif_set_up | ( |  | n | ) |

Value:
netifapi_netif_common(n, netif_set_up, NULL)
netif_set_up
void netif_set_up(struct netif *netif)
Definition netif.c:871

See also
  netif_set_up()

## Function Documentation

## netifapi_netif_add()

err_t netifapi_netif_add | ( | struct netif * | netif,
|  | const ip4_addr_t * | ipaddr,
|  | const ip4_addr_t * | netmask,
|  | const ip4_addr_t * | gw,
|  | void * | state,
|  | netif_init_fn | init,
|  | netif_input_fn | input )

Call netif_add() in a thread-safe way by running that function inside the tcpip_thread context.

Note
  for params

See also
  netif_add()

## netifapi_netif_index_to_name()

err_t netifapi_netif_index_to_name | ( | u8_t | idx,
|  | char * | name )

Call netif_index_to_name() in a thread-safe way by running that function inside the tcpip_thread context.

Parameters

  idx | the interface index of the netif
  name | output name of the found netif, empty '\0' string if netif not found. name should be of at least NETIF_NAMESIZE bytes

## netifapi_netif_name_to_index()

err_t netifapi_netif_name_to_index | ( | const char * | name,
|  | u8_t * | idx )

Call netif_name_to_index() in a thread-safe way by running that function inside the tcpip_thread context.

Parameters

  name | the interface name of the netif
  idx | output index of the found netif

## netifapi_netif_set_addr()

err_t netifapi_netif_set_addr | ( | struct netif * | netif,
|  | const ip4_addr_t * | ipaddr,
|  | const ip4_addr_t * | netmask,
|  | const ip4_addr_t * | gw )

Call netif_set_addr() in a thread-safe way by running that function inside the tcpip_thread context.

Note
  for params

See also
  netif_set_addr()