mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 15:43:02 +02:00
Make show interfaces container aware. This is done by looking though all podman containers for interfaces and looking up there info from network namespaces on the main system / hypervisor. Interfaces controlled by containers are clearly marked in the "show interfaces" output, with a single gray row. Telling the user that they belong to one or more named containers. The user can then run "show interface name NAME" on interfaces owned by containers, which provided some additional info, such as mac address and stat counters. The patch also add support for printing veth peers which are owned by containers. Lastly, the patch also adds test cases for this functionality. Signed-off-by: Richard Alpe <richard@bit42.se>
17 lines
1.3 KiB
Plaintext
17 lines
1.3 KiB
Plaintext
[7mINTERFACE PROTOCOL STATE DATA [0m
|
|
br0 bridge [33m [39mvlan:40u,50t
|
|
│ ethernet [32mUP [39m02:00:00:00:00:00
|
|
├ e0 bridge [33mDISABLED [39mvlan:10u,20t pvid:10
|
|
└ e1 bridge [33mBLOCKING [39mvlan:10t,20u pvid:20
|
|
br1 bridge [33m [39m
|
|
│ ethernet [32mUP [39m02:00:00:00:00:02
|
|
└ e2 bridge [32mFORWARDING [39mvlan:30u pvid:30
|
|
[100me2 container system [0m
|
|
e3 ethernet [32mUP [39m02:00:00:00:00:03
|
|
e4 ethernet [31mDOWN [39m02:00:00:00:00:04
|
|
[100mveth0b container system [0m
|
|
veth0j ethernet [32mUP [39mb2:82:e3:ce:d5:9e
|
|
veth peer:veth0k
|
|
ipv4 192.168.1.1/24 (static)
|
|
[100mveth0k container system2 [0m
|