static void append_ipv4(DBusMessageIter *iter, void *user_data) { struct connman_peer *peer = user_data; if (!is_connected(peer)) return; if (peer->connection_master) append_dhcp_server_ipv4(iter, peer); else if (peer->ipconfig) __connman_ipconfig_append_ipv4(peer->ipconfig, iter); }
static void append_ipconfig_ipv4(DBusMessageIter *iter, void *user_data) { struct connman_service *service = user_data; struct connman_ipconfig *ipconfig_ipv4; if (!service) return; if (!__connman_service_is_connected_state(service, CONNMAN_IPCONFIG_TYPE_IPV4)) return; ipconfig_ipv4 = __connman_service_get_ip4config(service); if (!ipconfig_ipv4) return; __connman_ipconfig_append_ipv4(ipconfig_ipv4, iter); }