• Home
  • Raw
  • Download

Lines Matching refs:netif

54 err_t netif_dhcp_off(struct netif *netif)  in netif_dhcp_off()  argument
60 if (netif == NULL) { in netif_dhcp_off()
63 old_ipaddr = netif->ip_addr; in netif_dhcp_off()
64 old_netmask = netif->netmask; in netif_dhcp_off()
65 old_gateway = netif->gw; in netif_dhcp_off()
67 if (netif_dhcp_data(netif)) { in netif_dhcp_off()
68 (void)dhcp_release(netif); in netif_dhcp_off()
69 (void)dhcp_stop(netif); in netif_dhcp_off()
70 (void)dhcp_cleanup(netif); in netif_dhcp_off()
74 ip_addr_set_val(&netif->ip_addr, &old_ipaddr); in netif_dhcp_off()
75 ip_addr_set_val(&netif->netmask, &old_netmask); in netif_dhcp_off()
76 ip_addr_set_val(&netif->gw, &old_gateway); in netif_dhcp_off()
77 (void)netif_set_up(netif); in netif_dhcp_off()
82 err_t dhcp_is_bound(struct netif *netif) in dhcp_is_bound() argument
86 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG); in dhcp_is_bound()
88 dhcp = netif_dhcp_data(netif); in dhcp_is_bound()
110 …ret = dhcps_start(msg->netif, msg->msg.dhcp_start_params.start_ip, msg->msg.dhcp_start_params.ip_n… in netifapi_do_dhcps_start()
114 err_t netifapi_dhcps_start(struct netif *netif, char *start_ip, u16_t ip_num) in netifapi_dhcps_start() argument
119 LWIP_ERROR("netifapi_dhcps_start : invalid arguments", (netif != NULL), return ERR_VAL); in netifapi_dhcps_start()
122 NETIFAPI_VAR_REF(msg).netif = netif; in netifapi_dhcps_start()
132 err_t netifapi_dhcps_stop(struct netif *netif) in netifapi_dhcps_stop() argument
134 LWIP_ERROR("netifapi_dhcps_stop : invalid arguments", (netif != NULL), return ERR_VAL); in netifapi_dhcps_stop()
136 return netifapi_netif_common(netif, dhcps_stop, NULL); in netifapi_dhcps_stop()
150 static void netif_ip6_addr_setinvalid(struct netif *netif, const ip6_addr_t *addr6) in netif_ip6_addr_setinvalid() argument
153 LWIP_ERROR("netif_ip6_addr_set : invalid arguments", (netif != NULL), return); in netif_ip6_addr_setinvalid()
156 idx = netif_get_ip6_addr_match(netif, addr6); in netif_ip6_addr_setinvalid()
161 netif_ip6_addr_set_state(netif, idx, IP6_ADDR_INVALID); in netif_ip6_addr_setinvalid()
165 err_t netif_do_rmv_ipv6_addr(struct netif *netif, void *arguments) in netif_do_rmv_ipv6_addr() argument
173 netif_ip6_addr_setinvalid(netif, ip_2_ip6(ipaddr)); in netif_do_rmv_ipv6_addr()
184 return netif_do_rmv_ipv6_addr(msg->netif, (void *)msg->msg.add.ipaddr); in netif_do_rmv_ip6_address()
187 void netifapi_netif_rmv_ip6_address(struct netif *netif, ip_addr_t *ipaddr) in netifapi_netif_rmv_ip6_address() argument
190 if (netif == NULL) { in netifapi_netif_rmv_ip6_address()
196 NETIFAPI_VAR_REF(msg).netif = netif; in netifapi_netif_rmv_ip6_address()
205 static struct netif *netif_find_by_name(const char *name) in netif_find_by_name()
207 struct netif *netif = NULL; in netif_find_by_name() local
215 NETIF_FOREACH(netif) { in netif_find_by_name()
216 if (strcmp("lo", name) == 0 && (netif->name[0] == 'l' && netif->name[1] == 'o')) { in netif_find_by_name()
218 return netif; in netif_find_by_name()
221 if (strcmp(netif->full_name, name) == 0) { in netif_find_by_name()
223 return netif; in netif_find_by_name()
237 msg->netif = netif_find_by_name(msg->msg.ifs.name); in netifapi_do_find_by_name()
241 struct netif *netifapi_netif_find_by_name(const char *name) in netifapi_netif_find_by_name()
243 struct netif *netif = NULL; in netifapi_netif_find_by_name() local
247 NETIFAPI_VAR_REF(msg).netif = NULL; in netifapi_netif_find_by_name()
251 return netif; in netifapi_netif_find_by_name()
260 netif = msg.netif; in netifapi_netif_find_by_name()
262 return netif; in netifapi_netif_find_by_name()
270 err_t netif_set_mtu(struct netif *netif, u16_t netif_mtu) in netif_set_mtu() argument
277 LWIP_ERROR("netif_set_mtu: invalid arguments", (netif != NULL), return ERR_VAL); in netif_set_mtu()
287 netif->mtu = netif_mtu; in netif_set_mtu()
289 netif->mtu6 = netif_mtu; in netif_set_mtu()
293 netif_get_name(netif), netif->mtu)); in netif_set_mtu()
297 err_t netif_set_hwaddr(struct netif *netif, const unsigned char *hw_addr, int hw_len) in netif_set_hwaddr() argument
299 LWIP_ERROR("netif_set_hwaddr : invalid arguments", (netif != NULL), return ERR_VAL); in netif_set_hwaddr()
306 if (netif->drv_set_hwaddr == NULL) { in netif_set_hwaddr()
310 if (netif->drv_set_hwaddr(netif, (u8_t *)hw_addr, hw_len) != ERR_OK) { in netif_set_hwaddr()
314 if (memcpy_s(netif->hwaddr, NETIF_MAX_HWADDR_LEN, hw_addr, hw_len) != EOK) { in netif_set_hwaddr()
321 netif_get_name(netif), in netif_set_hwaddr()
322 netif->hwaddr[0], netif->hwaddr[1], netif->hwaddr[2], in netif_set_hwaddr()
323 netif->hwaddr[3], netif->hwaddr[4], netif->hwaddr[5])); in netif_set_hwaddr()
328 err_t etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethad… in etharp_update_arp_entry() argument
330 (void)netif; in etharp_update_arp_entry()
337 err_t etharp_delete_arp_entry(struct netif *netif, ip4_addr_t *ipaddr) in etharp_delete_arp_entry() argument
339 (void)netif; in etharp_delete_arp_entry()