Revision 19061e63
b/net.c | ||
---|---|---|
1224 | 1224 |
void do_info_network(Monitor *mon) |
1225 | 1225 |
{ |
1226 | 1226 |
VLANState *vlan; |
1227 |
VLANClientState *vc; |
|
1227 |
VLANClientState *vc, *peer; |
|
1228 |
net_client_type type; |
|
1228 | 1229 |
|
1229 | 1230 |
QTAILQ_FOREACH(vlan, &vlans, next) { |
1230 | 1231 |
monitor_printf(mon, "VLAN %d devices:\n", vlan->id); |
... | ... | |
1235 | 1236 |
} |
1236 | 1237 |
monitor_printf(mon, "Devices not on any VLAN:\n"); |
1237 | 1238 |
QTAILQ_FOREACH(vc, &non_vlan_clients, next) { |
1238 |
monitor_printf(mon, " %s: %s", vc->name, vc->info_str); |
|
1239 |
if (vc->peer) { |
|
1240 |
monitor_printf(mon, " peer=%s", vc->peer->name); |
|
1239 |
peer = vc->peer; |
|
1240 |
type = vc->info->type; |
|
1241 |
if (!peer || type == NET_CLIENT_TYPE_NIC) { |
|
1242 |
monitor_printf(mon, " %s: %s\n", vc->name, vc->info_str); |
|
1243 |
} /* else it's a netdev connected to a NIC, printed with the NIC */ |
|
1244 |
if (peer && type == NET_CLIENT_TYPE_NIC) { |
|
1245 |
monitor_printf(mon, " \\ %s: %s\n", peer->name, peer->info_str); |
|
1241 | 1246 |
} |
1242 |
monitor_printf(mon, "\n"); |
|
1243 | 1247 |
} |
1244 | 1248 |
} |
1245 | 1249 |
|
Also available in: Unified diff