little-dude / netlink

netlink libraries for rust
Other
332 stars 89 forks source link

Add bond support #265

Closed bengal closed 1 year ago

bengal commented 2 years ago

Add initial support for managing bond links. Example:

  $ ./target/debug/examples/create_bond
  $ ip -d link show my-bond
  88: my-bond: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
      link/ether 26:c5:a4:fe:ad:34 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535
      bond mode active-backup miimon 100 updelay 100 downdelay 100 peer_notify_delay 0 use_carrier 1 arp_interval 0 arp_validate none arp_all_targets any primary_reselect always fail_over_mac none xmit_hash_policy layer2 resend_igmp 1 num_grat_arp 1 all_slaves_active 0 min_links 2 lp_interval 1 packets_per_slave 1 lacp_rate slow ad_select stable tlb_dynamic_lb 1 addrgenmode eui64 numtxqueues 16 numrxqueues 16 gso_max_size 65536 gso_max_segs 65535