Lines Matching refs:conn

30 static int eth_link_up(netmgr_conn_t *conn)  in eth_link_up()  argument
34 if (conn == NULL) { in eth_link_up()
39 net_if = conn->netif; in eth_link_up()
54 return netmgr_conn_state_change(conn, CONN_STATE_OBTAINING_IP); in eth_link_up()
64 netmgr_conn_t *conn = g_eth_conn_info; in tcpip_dhcpc_cb() local
109 netmgr_conn_t *conn; in eth_dhcp_start() local
112 conn = g_eth_conn_info; in eth_dhcp_start()
113 net_if = conn->netif; in eth_dhcp_start()
136 static int eth_obtaining_ip(netmgr_conn_t *conn) in eth_obtaining_ip() argument
138 if (conn == NULL) { in eth_obtaining_ip()
143 if (conn->use_ip_mode == NETMGR_ETH_IP_MODE_STATIC) { in eth_obtaining_ip()
144 struct netif *net_if = conn->netif; in eth_obtaining_ip()
153 netifapi_netif_set_addr(net_if, &conn->static_ip, &conn->static_mask, &conn->static_gw); in eth_obtaining_ip()
155 dns_setserver(0, &conn->static_dns); in eth_obtaining_ip()
188 static int eth_network_connected(netmgr_conn_t *conn) in eth_network_connected() argument
190 if (conn == NULL) { in eth_network_connected()
202 static int eth_failed(netmgr_conn_t *conn) in eth_failed() argument
204 if (conn == NULL) { in eth_failed()
210 return netmgr_conn_state_change(conn, CONN_STATE_DISCONNECTED); in eth_failed()
214 static int eth_disconnected(netmgr_conn_t *conn) in eth_disconnected() argument
217 if (conn == NULL) { in eth_disconnected()
223 net_if = conn->netif; in eth_disconnected()
232 conn->netif = NULL; in eth_disconnected()
276 netmgr_conn_t *conn = g_eth_conn_info; in netmgr_eth_set_ip_mode() local
279 if (conn->use_ip_mode != mode) { in netmgr_eth_set_ip_mode()
281 conn->use_ip_mode = mode; in netmgr_eth_set_ip_mode()
282 net_if = conn->netif; in netmgr_eth_set_ip_mode()
298 netifapi_netif_set_addr(net_if, &conn->static_ip, &conn->static_mask, &conn->static_gw); in netmgr_eth_set_ip_mode()
300 dns_setserver(0, &conn->static_dns); in netmgr_eth_set_ip_mode()
311 netmgr_conn_t *conn = g_eth_conn_info; in netmgr_eth_set_static_ip_stat() local
322 &((u8_t *)&conn->static_ip.addr)[0], in netmgr_eth_set_static_ip_stat()
323 &((u8_t *)&conn->static_ip.addr)[1], in netmgr_eth_set_static_ip_stat()
324 &((u8_t *)&conn->static_ip.addr)[2], in netmgr_eth_set_static_ip_stat()
325 &((u8_t *)&conn->static_ip.addr)[3]); in netmgr_eth_set_static_ip_stat()
327 ((u8_t *)&conn->static_ip.addr)[0], in netmgr_eth_set_static_ip_stat()
328 ((u8_t *)&conn->static_ip.addr)[1], in netmgr_eth_set_static_ip_stat()
329 ((u8_t *)&conn->static_ip.addr)[2], in netmgr_eth_set_static_ip_stat()
330 ((u8_t *)&conn->static_ip.addr)[3]); in netmgr_eth_set_static_ip_stat()
333 &((u8_t *)&conn->static_mask.addr)[0], in netmgr_eth_set_static_ip_stat()
334 &((u8_t *)&conn->static_mask.addr)[1], in netmgr_eth_set_static_ip_stat()
335 &((u8_t *)&conn->static_mask.addr)[2], in netmgr_eth_set_static_ip_stat()
336 &((u8_t *)&conn->static_mask.addr)[3]); in netmgr_eth_set_static_ip_stat()
338 ((u8_t *)&conn->static_mask.addr)[0], in netmgr_eth_set_static_ip_stat()
339 ((u8_t *)&conn->static_mask.addr)[1], in netmgr_eth_set_static_ip_stat()
340 ((u8_t *)&conn->static_mask.addr)[2], in netmgr_eth_set_static_ip_stat()
341 ((u8_t *)&conn->static_mask.addr)[3]); in netmgr_eth_set_static_ip_stat()
344 &((u8_t *)&conn->static_gw.addr)[0], in netmgr_eth_set_static_ip_stat()
345 &((u8_t *)&conn->static_gw.addr)[1], in netmgr_eth_set_static_ip_stat()
346 &((u8_t *)&conn->static_gw.addr)[2], in netmgr_eth_set_static_ip_stat()
347 &((u8_t *)&conn->static_gw.addr)[3]); in netmgr_eth_set_static_ip_stat()
349 ((u8_t *)&conn->static_gw.addr)[0], in netmgr_eth_set_static_ip_stat()
350 ((u8_t *)&conn->static_gw.addr)[1], in netmgr_eth_set_static_ip_stat()
351 ((u8_t *)&conn->static_gw.addr)[2], in netmgr_eth_set_static_ip_stat()
352 ((u8_t *)&conn->static_gw.addr)[3]); in netmgr_eth_set_static_ip_stat()
355 &((u8_t *)&conn->static_dns.addr)[0], in netmgr_eth_set_static_ip_stat()
356 &((u8_t *)&conn->static_dns.addr)[1], in netmgr_eth_set_static_ip_stat()
357 &((u8_t *)&conn->static_dns.addr)[2], in netmgr_eth_set_static_ip_stat()
358 &((u8_t *)&conn->static_dns.addr)[3]); in netmgr_eth_set_static_ip_stat()
360 ((u8_t *)&conn->static_dns.addr)[0], in netmgr_eth_set_static_ip_stat()
361 ((u8_t *)&conn->static_dns.addr)[1], in netmgr_eth_set_static_ip_stat()
362 ((u8_t *)&conn->static_dns.addr)[2], in netmgr_eth_set_static_ip_stat()
363 ((u8_t *)&conn->static_dns.addr)[3]); in netmgr_eth_set_static_ip_stat()
364 net_if = conn->netif; in netmgr_eth_set_static_ip_stat()
369 netifapi_netif_set_addr(net_if, &conn->static_ip, &conn->static_mask, &conn->static_gw); in netmgr_eth_set_static_ip_stat()
371 dns_setserver(0, &conn->static_dns); in netmgr_eth_set_static_ip_stat()
436 static netmgr_conn_t *conn; in netmgr_eth_get_ip_stat() local
438 conn = g_eth_conn_info; in netmgr_eth_get_ip_stat()
439 if (!conn) { in netmgr_eth_get_ip_stat()
444 net_if = conn->netif; in netmgr_eth_get_ip_stat()
475 dhcp_en = (conn->use_ip_mode == NETMGR_ETH_IP_MODE_AUTO) ? true : false; in netmgr_eth_get_ip_stat()