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 <brandon.ewing@warningg.com>
  • Loading branch information
bewing committed Mar 25, 2022
1 parent 5f46783 commit da42abf
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 78 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

0 comments on commit da42abf

Please sign in to comment.