On Wed, Jul 31, 2013 at 10:47:40PM +0200, Antonio Quartulli wrote:
From: Antonio Quartulli antonio@open-mesh.com
Each routing protocol has its own metric and private variables, therefore it is useful to introduce a new API for originator information printing.
This API needs to be implemented by each protocol in order to provide its specific originator table output.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com
bat_iv_ogm.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ originator.c | 66 +++++++++-------------------------------------------------- types.h | 3 +++ 3 files changed, 80 insertions(+), 56 deletions(-)
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index 595fcb0..605c954 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -1391,6 +1391,72 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb, return NET_RX_SUCCESS; }
+/**
- batadv_iv_ogm_orig_print - print the originator table
- @bat_priv: the bat priv with all the soft interface information
- @seq: debugfs table seq_file struct
- */
+static void batadv_iv_ogm_orig_print(struct batadv_priv *bat_priv,
struct seq_file *seq)
+{
- struct batadv_hashtable *hash = bat_priv->orig_hash;
- struct hlist_head *head;
- struct batadv_orig_node *orig_node;
- struct batadv_neigh_node *neigh_node, *neigh_node_tmp;
- int batman_count = 0;
- int last_seen_secs;
- int last_seen_msecs;
- unsigned long last_seen_jiffies;
- uint32_t i;
unneccesary double newline?
Rest looks good.