Lines Matching refs:ifindex
268 int ifindex; member
361 return CMP(a->ifindex, b->ifindex); in link_info_compare()
493 int ifindex, r; in decode_link() local
506 r = sd_rtnl_message_link_get_ifindex(m, &ifindex); in decode_link()
524 xsprintf(str, "%i", ifindex); in decode_link()
546 info->ifindex = ifindex; in decode_link()
620 xsprintf(ifindex_str, "%i", link->ifindex); in link_get_property()
697 r = wifi_get_interface(genl, link->ifindex, &link->wlan_iftype, &link->ssid); in acquire_wlan_link_info()
702 k = wifi_get_station(genl, link->ifindex, &link->bssid); in acquire_wlan_link_info()
751 (void) sd_device_new_from_ifindex(&links[c].sd_device, links[c].ifindex); in acquire_link_info()
837 (void) sd_network_link_get_operational_state(links[i].ifindex, &operational_state); in list_links()
840 r = sd_network_link_get_setup_state(links[i].ifindex, &setup_state); in list_links()
850 TABLE_INT, links[i].ifindex, in list_links()
908 int ifindex, in get_gateway_description() argument
916 assert(ifindex >= 0); in get_gateway_description()
921 r = sd_rtnl_message_new_neigh(rtnl, &req, RTM_GETNEIGH, ifindex, family); in get_gateway_description()
973 if (ifindex > 0 && ifi != ifindex) in get_gateway_description()
1030 int ifindex) { in dump_gateways() argument
1038 n = local_gateways(rtnl, ifindex, AF_UNSPEC, &local); in dump_gateways()
1049 …r = get_gateway_description(rtnl, hwdb, local[i].ifindex, local[i].family, &local[i].address, &des… in dump_gateways()
1061 ifindex <= 0 ? " on " : "", in dump_gateways()
1062 … ifindex <= 0 ? FORMAT_IFNAME_FULL(local[i].ifindex, FORMAT_IFNAME_IFINDEX_WITH_PERCENT) : ""); in dump_gateways()
1074 int ifindex) { in dump_addresses() argument
1084 n = local_addresses(rtnl, ifindex, AF_UNSPEC, &local); in dump_addresses()
1115 ifindex <= 0 ? " on " : "", in dump_addresses()
1116 … ifindex <= 0 ? FORMAT_IFNAME_FULL(local[i].ifindex, FORMAT_IFNAME_IFINDEX_WITH_PERCENT) : ""); in dump_addresses()
1221 static int open_lldp_neighbors(int ifindex, FILE **ret) { in open_lldp_neighbors() argument
1225 xsprintf(p, "/run/systemd/netif/lldp/%i", ifindex); in open_lldp_neighbors()
1267 static int dump_lldp_neighbors(Table *table, const char *prefix, int ifindex) { in dump_lldp_neighbors() argument
1274 assert(ifindex > 0); in dump_lldp_neighbors()
1276 r = open_lldp_neighbors(ifindex, &f); in dump_lldp_neighbors()
1509 xsprintf(m1, "_KERNEL_DEVICE=n%i", info->ifindex); in show_logs()
1565 (void) sd_network_link_get_operational_state(info->ifindex, &operational_state); in link_status_one()
1568 (void) sd_network_link_get_online_state(info->ifindex, &online_state); in link_status_one()
1571 r = sd_network_link_get_setup_state(info->ifindex, &setup_state); in link_status_one()
1576 (void) sd_network_link_get_dns(info->ifindex, &dns); in link_status_one()
1577 (void) sd_network_link_get_search_domains(info->ifindex, &search_domains); in link_status_one()
1578 (void) sd_network_link_get_route_domains(info->ifindex, &route_domains); in link_status_one()
1579 (void) sd_network_link_get_ntp(info->ifindex, &ntp); in link_status_one()
1580 (void) sd_network_link_get_sip(info->ifindex, &sip); in link_status_one()
1598 (void) sd_network_link_get_network_file(info->ifindex, &network); in link_status_one()
1600 (void) sd_network_link_get_carrier_bound_to(info->ifindex, &carrier_bound_to); in link_status_one()
1601 (void) sd_network_link_get_carrier_bound_by(info->ifindex, &carrier_bound_by); in link_status_one()
1604 xsprintf(lease_file, "/run/systemd/netif/leases/%i", info->ifindex); in link_status_one()
1628 r = table_add_cell_stringf(table, &cell, "%i: %s", info->ifindex, info->name); in link_status_one()
2185 r = dump_addresses(rtnl, lease, table, info->ifindex); in link_status_one()
2188 r = dump_gateways(rtnl, hwdb, table, info->ifindex); in link_status_one()
2213 r = sd_network_link_get_activation_policy(info->ifindex, &activation_policy); in link_status_one()
2223 r = sd_network_link_get_required_for_online(info->ifindex); in link_status_one()
2264 r = sd_network_link_get_dhcp6_client_iaid_string(info->ifindex, &iaid); in link_status_one()
2274 r = sd_network_link_get_dhcp6_client_duid_string(info->ifindex, &duid); in link_status_one()
2284 r = dump_lldp_neighbors(table, "Connected To:", info->ifindex); in link_status_one()
2513 r = open_lldp_neighbors(links[i].ifindex, &f); in link_lldp_status()
2517 … log_warning_errno(r, "Failed to open LLDP data for %i, ignoring: %m", links[i].ifindex); in link_lldp_status()