Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265518
b: refs/heads/master
c: df6edb9
h: refs/heads/master
v: v3
  • Loading branch information
Antonio Quartulli authored and Marek Lindner committed Aug 22, 2011
1 parent a9a9446 commit 7cca305
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d393e47321062dbf9078a66a7cc1c2a52bafecc
refs/heads/master: df6edb9e69cdb29b31b27305f60bb400dd5d91ed
37 changes: 27 additions & 10 deletions trunk/net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)

rcu_read_lock();
__hlist_for_each_rcu(node, head)
buf_size += 21;
buf_size += 29;
rcu_read_unlock();
}

Expand All @@ -351,8 +351,19 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)
rcu_read_lock();
hlist_for_each_entry_rcu(tt_local_entry, node,
head, hash_entry) {
pos += snprintf(buff + pos, 22, " * %pM\n",
tt_local_entry->addr);
pos += snprintf(buff + pos, 30, " * %pM "
"[%c%c%c%c%c]\n",
tt_local_entry->addr,
(tt_local_entry->flags &
TT_CLIENT_ROAM ? 'R' : '.'),
(tt_local_entry->flags &
TT_CLIENT_NOPURGE ? 'P' : '.'),
(tt_local_entry->flags &
TT_CLIENT_NEW ? 'N' : '.'),
(tt_local_entry->flags &
TT_CLIENT_PENDING ? 'X' : '.'),
(tt_local_entry->flags &
TT_CLIENT_WIFI ? 'W' : '.'));
}
rcu_read_unlock();
}
Expand Down Expand Up @@ -589,8 +600,8 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
seq_printf(seq,
"Globally announced TT entries received via the mesh %s\n",
net_dev->name);
seq_printf(seq, " %-13s %s %-15s %s\n",
"Client", "(TTVN)", "Originator", "(Curr TTVN)");
seq_printf(seq, " %-13s %s %-15s %s %s\n",
"Client", "(TTVN)", "Originator", "(Curr TTVN)", "Flags");

buf_size = 1;
/* Estimate length for: " * xx:xx:xx:xx:xx:xx (ttvn) via
Expand All @@ -600,7 +611,7 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)

rcu_read_lock();
__hlist_for_each_rcu(node, head)
buf_size += 59;
buf_size += 67;
rcu_read_unlock();
}

Expand All @@ -619,14 +630,20 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
rcu_read_lock();
hlist_for_each_entry_rcu(tt_global_entry, node,
head, hash_entry) {
pos += snprintf(buff + pos, 61,
" * %pM (%3u) via %pM (%3u)\n",
tt_global_entry->addr,
pos += snprintf(buff + pos, 69,
" * %pM (%3u) via %pM (%3u) "
"[%c%c%c]\n", tt_global_entry->addr,
tt_global_entry->ttvn,
tt_global_entry->orig_node->orig,
(uint8_t) atomic_read(
&tt_global_entry->orig_node->
last_ttvn));
last_ttvn),
(tt_global_entry->flags &
TT_CLIENT_ROAM ? 'R' : '.'),
(tt_global_entry->flags &
TT_CLIENT_PENDING ? 'X' : '.'),
(tt_global_entry->flags &
TT_CLIENT_WIFI ? 'W' : '.'));
}
rcu_read_unlock();
}
Expand Down

0 comments on commit 7cca305

Please sign in to comment.