27 #ifndef LWIP_HDR_NETIFAPI_H 28 #define LWIP_HDR_NETIFAPI_H 43 #if LWIP_MPU_COMPATIBLE 44 #define NETIFAPI_IPADDR_DEF(type, m) type m 46 #define NETIFAPI_IPADDR_DEF(type, m) const type * m 49 typedef void (*netifapi_void_fn)(
struct netif *
netif);
52 struct netifapi_msg_msg {
53 #if !LWIP_TCPIP_CORE_LOCKING 61 NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr);
62 NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask);
63 NETIFAPI_IPADDR_DEF(ip4_addr_t, gw);
70 netifapi_void_fn voidfunc;
71 netifapi_errt_fn errtfunc;
77 void (*
function)(
struct netifapi_msg_msg *msg);
78 struct netifapi_msg_msg msg;
85 const ip4_addr_t *ipaddr,
const ip4_addr_t *netmask,
const ip4_addr_t *gw,
90 err_t netifapi_netif_set_addr(
struct netif *
netif,
const ip4_addr_t *ipaddr,
91 const ip4_addr_t *netmask,
const ip4_addr_t *gw);
94 err_t netifapi_netif_common(
struct netif *
netif, netifapi_void_fn voidfunc,
95 netifapi_errt_fn errtfunc);
97 #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) 98 #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) 99 #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) 100 #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) 101 #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) 102 #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) 103 #define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) 104 #define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) 105 #define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) 106 #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) 107 #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)