Skip to content

Commit

Permalink
Add structures for interface bonding information
Browse files Browse the repository at this point in the history
Update net_class.go with new structures to handle bonding driver
information

Add new true/false values to internal.util.parse.ParseBool

References:
torvalds/linux/drivers/net/bonding/bond_sysfs.c
torvalds/linux/drivers/net/bonding/bond_sysfs_slave.c
torvalds/linux/include/net/bonding.h
torvalds/linux/include/net/bond_options.h
torvalds/linux/include/net/bond_3ad.h

Signed-off-by: Brandon Ewing <[email protected]>
  • Loading branch information
bewing committed Mar 24, 2022
1 parent 5f46783 commit 0a19628
Show file tree
Hide file tree
Showing 2 changed files with 320 additions and 35 deletions.
4 changes: 2 additions & 2 deletions internal/util/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func ReadIntFromFile(path string) (int64, error) {
func ParseBool(b string) *bool {
var truth bool
switch b {
case "enabled":
case "enabled", "up", "1":
truth = true
case "disabled":
case "disabled", "down", "0":
truth = false
default:
return nil
Expand Down
Loading

0 comments on commit 0a19628

Please sign in to comment.