Revision 44e798d3 net.c
b/net.c | ||
---|---|---|
1227 | 1227 |
return 0; |
1228 | 1228 |
} |
1229 | 1229 |
|
1230 |
static void print_net_client(Monitor *mon, VLANClientState *vc) |
|
1231 |
{ |
|
1232 |
monitor_printf(mon, "%s: type=%s,%s\n", vc->name, |
|
1233 |
net_client_types[vc->info->type].type, vc->info_str); |
|
1234 |
} |
|
1235 |
|
|
1230 | 1236 |
void do_info_network(Monitor *mon) |
1231 | 1237 |
{ |
1232 | 1238 |
VLANState *vlan; |
... | ... | |
1237 | 1243 |
monitor_printf(mon, "VLAN %d devices:\n", vlan->id); |
1238 | 1244 |
|
1239 | 1245 |
QTAILQ_FOREACH(vc, &vlan->clients, next) { |
1240 |
monitor_printf(mon, " %s: %s\n", vc->name, vc->info_str); |
|
1246 |
monitor_printf(mon, " "); |
|
1247 |
print_net_client(mon, vc); |
|
1241 | 1248 |
} |
1242 | 1249 |
} |
1243 | 1250 |
monitor_printf(mon, "Devices not on any VLAN:\n"); |
... | ... | |
1245 | 1252 |
peer = vc->peer; |
1246 | 1253 |
type = vc->info->type; |
1247 | 1254 |
if (!peer || type == NET_CLIENT_TYPE_NIC) { |
1248 |
monitor_printf(mon, " %s: %s\n", vc->name, vc->info_str); |
|
1255 |
monitor_printf(mon, " "); |
|
1256 |
print_net_client(mon, vc); |
|
1249 | 1257 |
} /* else it's a netdev connected to a NIC, printed with the NIC */ |
1250 | 1258 |
if (peer && type == NET_CLIENT_TYPE_NIC) { |
1251 |
monitor_printf(mon, " \\ %s: %s\n", peer->name, peer->info_str); |
|
1259 |
monitor_printf(mon, " \\ "); |
|
1260 |
print_net_client(mon, peer); |
|
1252 | 1261 |
} |
1253 | 1262 |
} |
1254 | 1263 |
} |
Also available in: Unified diff