diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2005-11-09 18:36:25 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2005-11-13 19:48:20 (GMT) |
commit | 4756b02f558cbbbef5ae278fd3bbed778458c124 (patch) | |
tree | 8eca3a9d61659ab236080014ddb1967c0b39fb38 /drivers/net/bonding | |
parent | 6b780567223524cac86c745aeac425521cf37490 (diff) | |
download | linux-4756b02f558cbbbef5ae278fd3bbed778458c124.tar.xz |
[PATCH] bonding: add ARP entries to /proc
Make the /proc files show which ARP targets are in use by each bond.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b656e53..d5415ba 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3259,6 +3259,8 @@ static void bond_info_show_master(struct seq_file *seq) { struct bonding *bond = seq->private; struct slave *curr; + int i; + u32 target; read_lock(&bond->curr_slave_lock); curr = bond->curr_active_slave; @@ -3290,6 +3292,27 @@ static void bond_info_show_master(struct seq_file *seq) seq_printf(seq, "Down Delay (ms): %d\n", bond->params.downdelay * bond->params.miimon); + + /* ARP information */ + if(bond->params.arp_interval > 0) { + int printed=0; + seq_printf(seq, "ARP Polling Interval (ms): %d\n", + bond->params.arp_interval); + + seq_printf(seq, "ARP IP target/s (n.n.n.n form):"); + + for(i = 0; (i < BOND_MAX_ARP_TARGETS) ;i++) { + if (!bond->params.arp_targets[i]) + continue; + if (printed) + seq_printf(seq, ","); + target = ntohl(bond->params.arp_targets[i]); + seq_printf(seq, " %d.%d.%d.%d", HIPQUAD(target)); + printed = 1; + } + seq_printf(seq, "\n"); + } + if (bond->params.mode == BOND_MODE_8023AD) { struct ad_info ad_info; |