51 #ifndef LWIP_HDR_NETIFAPI_H 52 #define LWIP_HDR_NETIFAPI_H 68 #if LWIP_MPU_COMPATIBLE 69 #define NETIFAPI_IPADDR_DEF(type, m) type m 71 #define NETIFAPI_IPADDR_DEF(type, m) const type * m 74 typedef void (*netifapi_void_fn)(
struct netif *
netif);
83 NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr);
84 NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask);
85 NETIFAPI_IPADDR_DEF(ip4_addr_t, gw);
92 netifapi_void_fn voidfunc;
93 netifapi_errt_fn errtfunc;
102 const ip4_addr_t *ipaddr,
const ip4_addr_t *netmask,
const ip4_addr_t *gw,
107 err_t netifapi_netif_set_addr(
struct netif *
netif,
const ip4_addr_t *ipaddr,
108 const ip4_addr_t *netmask,
const ip4_addr_t *gw);
111 err_t netifapi_netif_common(
struct netif *
netif, netifapi_void_fn voidfunc,
112 netifapi_errt_fn errtfunc);
115 #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) 117 #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) 119 #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) 121 #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) 123 #define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL) 125 #define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL) 133 #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) 135 #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) 137 #define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) 139 #define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) 141 #define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) 149 #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) 151 #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) err_t(* netif_input_fn)(struct pbuf *p, struct netif *inp)
err_t(* netif_init_fn)(struct netif *netif)