Skip to content

Commit

Permalink
fix: Expand list parameters gathered from netlink
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sanders <marksanders194@gmail.com>
  • Loading branch information
sandersms committed Apr 2, 2024
1 parent 0f01687 commit 73ec586
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Goexp/Network/exnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ func main() {
fmt.Println("Name", intf.Attrs().Name)
fmt.Println("Flags", intf.Attrs().Flags)
fmt.Println("MTU", intf.Attrs().MTU)
fmt.Println("OperState", intf.Attrs().OperState)
fmt.Println("Raw Attributes", intf.Attrs())
if intf.Attrs().RawFlags&unix.IFF_LOOPBACK != 0 {
fmt.Println("Loopback interface")
}
fmt.Println("Encap Type", intf.Attrs().EncapType)
fmt.Println("----------")
// check for an actual device and not loopback interface
if intf.Type() == "device" {
if intf.Type() == "device" && intf.Attrs().EncapType != "loopback" {
netif := new(Ifports)
// Add the information to the Interface structure for the fixed interfaces
netif.name = intf.Attrs().Name
Expand Down

0 comments on commit 73ec586

Please sign in to comment.