b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: "B.A.T.M.A.N" <b.a.t.m.a.n@lists.open-mesh.org>
Subject: [B.A.T.M.A.N.] [PATCH] batctl: rename stuff from *hna* to *tt* (translation table)
Date: Thu,  5 May 2011 00:53:19 +0200	[thread overview]
Message-ID: <1304549599-25241-1-git-send-email-ordex@autistici.org> (raw)

To be coherent, all the functions/variables/constats have been renamed to the
TranslationTable style

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 README   |   18 +++++++++---------
 packet.h |    2 +-
 sys.c    |    2 +-
 vis.c    |   34 +++++++++++++++++-----------------
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/README b/README
index 8f22eb1..3311f05 100644
--- a/README
+++ b/README
@@ -312,7 +312,7 @@ Usage: batctl translocal|tl
 Example:
 
 $ batctl translocal
-Locally retrieved addresses (from bat0) announced via HNA:
+Locally retrieved addresses (from bat0) announced via TT:
  * d6:e0:fd:d9:00:00
 
 batctl transglobal
@@ -324,7 +324,7 @@ Usage: batctl transglobal|tg
 
 Example:
 
-Globally announced HNAs received via the mesh (translation table):
+Globally announced TT entries received via the mesh (translation table):
  * 16:aa:c4:a2:00:00 via fe:fe:00:00:09:01
  * 5a:32:f9:df:00:00 via fe:fe:00:00:03:01
  * 32:ae:5a:00:00:00 via fe:fe:00:00:04:01
@@ -356,9 +356,9 @@ display the VIS data in dot or JSON format
 
 Usage:
 
-batctl vis dot {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}
+batctl vis dot {-h}{--no-TT|-H} {--no-2nd|-2} {--numbers|-n}
 or
-batctl vis json {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}
+batctl vis json {-h}{--no-TT|-H} {--no-2nd|-2} {--numbers|-n}
 
 
 Example:
@@ -367,19 +367,19 @@ Example:
 $ batctl vis_data dot
 digraph {
 	"A" -> "B" [label="1.00"]
-	"A" -> "00:ff:f3:cc:68:ac" [label="HNA"]
+	"A" -> "00:ff:f3:cc:68:ac" [label="TT"]
 	subgraph "cluster_A" {
 		"A" [peripheries=2]
 	}
 	"B" -> "A" [label="1.00"]
 	"B-if2" -> "C" [label="2.00"]
-	"B" -> "22:ff:f3:cc:68:ac" [label="HNA"]
+	"B" -> "22:ff:f3:cc:68:ac" [label="TT"]
 	subgraph "cluster_B" {
 		"B" [peripheries=2]
 		"B-if2"
 	}
 	"C" -> "B-if2" [label="2.00"]
-	"C" -> "44:ff:f3:cc:68:ac" [label="HNA"]
+	"C" -> "44:ff:f3:cc:68:ac" [label="TT"]
 	subgraph "cluster_C" {
 		"C" [peripheries=2]
 	}
@@ -395,7 +395,7 @@ connection (100%), 2.0 means 50%, 3.0 means 33% and so on.
 
 A host's mac address which is currently connected to the interface of a mesh
 node (either the mesh node itself or hosts being bridged into the mesh) is
-being displayed with an "HNA"-label. (--no-hna omits this output)
+being displayed with an "TT"-label. (--no-TT omits this output)
 
 To still have the information about which interfaces belong to which mesh node
 a subgraph/cluster is being added. The subpgraph is being labeled with a mesh
@@ -422,7 +422,7 @@ Meaning of the shapes in this image file:
 * Boxes:    interfaces belonging to one BATMAN-node
 * double circled interfaces: the primary interface of a BATMAN-node
       (which is known to other BATMAN-nodes only, except direct neighbours)
-* Ellipses with an HNA-arrow: mesh clients (this can be a BATMAN-node itself
+* Ellipses with a TT-arrow: mesh clients (this can be a BATMAN-node itself
       with its bat0 interface or computers/devices being bridged into the mesh)
 * Arrows with numbers: the transmit quality (in the form 1/TQ) from one
       BATMAN interface to another BATMAN interface
diff --git a/packet.h b/packet.h
index e757187..c225c3a 100644
--- a/packet.h
+++ b/packet.h
@@ -61,7 +61,7 @@ struct batman_packet {
 	uint8_t  orig[6];
 	uint8_t  prev_sender[6];
 	uint8_t  ttl;
-	uint8_t  num_hna;
+	uint8_t  num_tt;
 	uint8_t  gw_flags;  /* flags related to gateway class */
 	uint8_t  align;
 } __packed;
diff --git a/sys.c b/sys.c
index 3511b40..f8fa1f2 100644
--- a/sys.c
+++ b/sys.c
@@ -213,7 +213,7 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
 	printf("[%c] %s (%d)\n", (line_ptr[0] == '1') ? 'x' : ' ',
 	       "messages related to routing / flooding / broadcasting", 1);
 	printf("[%c] %s (%d)\n", (line_ptr[0] == '2') ? 'x' : ' ',
-	       "messages related to route or hna added / changed / deleted", 2);
+	       "messages related to route or tt entry added / changed / deleted", 2);
 	printf("[%c] %s (%d)\n", (line_ptr[0] == '3') ? 'x' : ' ',
 	       "all debug messages", 3);
 
diff --git a/vis.c b/vis.c
index adb12d0..118c659 100644
--- a/vis.c
+++ b/vis.c
@@ -37,7 +37,7 @@
 #define TQ_MAX_VALUE 255
 
 typedef void (*print_tq_t) (char *orig, char *from, const long tq);
-typedef void (*print_HNA_t) (char *orig, char *from);
+typedef void (*print_TT_t) (char *orig, char *from);
 typedef void (*print_1st_t) (char *orig);
 typedef void (*print_2nd_t) (char *orig, char *from);
 typedef void (*print_header_t) (void);
@@ -45,22 +45,22 @@ typedef void (*print_footer_t) (void);
 
 struct funcs {
 	print_tq_t print_tq;
-	print_HNA_t print_HNA;
+	print_TT_t print_TT;
 	print_1st_t print_1st;
 	print_2nd_t print_2nd;
 	print_header_t print_header;
 	print_footer_t print_footer;
 };
 
-static bool with_HNA = true;
+static bool with_TT = true;
 static bool with_2nd = true;
 static bool with_names = true;
 
 static void usage(void)
 {
-	printf("batctl vis_data dot {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
+	printf("batctl vis_data dot {-h}{--no-TT|-H} {--no-2nd|-2} {--numbers|-n}\n");
 	printf("or\n");
-	printf("batctl vis_data json {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
+	printf("batctl vis_data json {-h}{--no-TT|-H} {--no-2nd|-2} {--numbers|-n}\n");
 }
 
 static void dot_print_tq(char *orig, char *from, const long tq)
@@ -75,11 +75,11 @@ static void dot_print_tq(char *orig, char *from, const long tq)
 	       int_part, frac_part);
 }
 
-static void dot_print_HNA(char *orig, char *from)
+static void dot_print_TT(char *orig, char *from)
 {
 	printf("\t\"%s\" -> ",
 	       get_name_by_macstr(orig, (with_names ? USE_BAT_HOSTS : 0)));
-	printf("\"%s\" [label=\"HNA\"]\n",
+	printf("\"%s\" [label=\"TT\"]\n",
 	       get_name_by_macstr(from, (with_names ? USE_BAT_HOSTS : 0)));
 }
 
@@ -114,7 +114,7 @@ static void dot_print_footer(void)
 }
 
 const struct funcs dot_funcs = { dot_print_tq,
-	dot_print_HNA,
+	dot_print_TT,
 	dot_print_1st,
 	dot_print_2nd,
 	dot_print_header,
@@ -133,11 +133,11 @@ static void json_print_tq(char *orig, char *from, const long tq)
 	       int_part, frac_part);
 }
 
-static void json_print_HNA(char *orig, char *from)
+static void json_print_TT(char *orig, char *from)
 {
 	printf("{ \"router\" : \"%s\", ",
 	       get_name_by_macstr(orig, (with_names ? USE_BAT_HOSTS : 0)));
-	printf("\"gateway\" : \"%s\", \"label\" : \"HNA\" }\n",
+	printf("\"gateway\" : \"%s\", \"label\" : \"TT\" }\n",
 	       get_name_by_macstr(from, (with_names ? USE_BAT_HOSTS : 0)));
 }
 
@@ -157,7 +157,7 @@ static void json_print_2nd(char *orig, char *from)
 }
 
 const struct funcs json_funcs = { json_print_tq,
-	json_print_HNA,
+	json_print_TT,
 	json_print_1st,
 	json_print_2nd,
 	NULL,
@@ -217,12 +217,12 @@ static int format(char *mesh_iface, const struct funcs *funcs)
 				funcs->print_tq(orig, from, tq);
 				continue;
 			}
-			if (!strcmp(flag, "HNA")) {
-				/* We have an HNA record */
-				if (!with_HNA)
+			if (!strcmp(flag, "TT")) {
+				/* We have a TT record */
+				if (!with_TT)
 					continue;
 				from = strtok_r(NULL, " ", &component_save_ptr);
-				funcs->print_HNA(orig, from);
+				funcs->print_TT(orig, from);
 				continue;
 			}
 			if (!strcmp(flag, "SEC") && with_2nd) {
@@ -274,7 +274,7 @@ int vis_data(char *mesh_iface, int argc, char *argv[])
 	while (1) {
 		int option_index = 0;
 		static struct option long_options[] = {
-			{"no-HNA", 0, 0, 'H'},
+			{"no-TT", 0, 0, 'H'},
 			{"no-2nd", 0, 0, '2'},
 			{"numbers", 0, 0, 'n'},
 			{0, 0, 0, 0}
@@ -286,7 +286,7 @@ int vis_data(char *mesh_iface, int argc, char *argv[])
 
 		switch (c) {
 		case 'H':
-			with_HNA = false;
+			with_TT = false;
 			break;
 		case '2':
 			with_2nd = false;
-- 
1.7.3.4


             reply	other threads:[~2011-05-04 22:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 22:53 Antonio Quartulli [this message]
2011-05-04 23:11 ` [B.A.T.M.A.N.] [PATCHv2] batctl: rename stuff from *hna* to *tt* (translation table) Antonio Quartulli
2011-05-05  6:43   ` [B.A.T.M.A.N.] [PATCHv3] " Antonio Quartulli
2011-05-05  7:05     ` Sven Eckelmann
2011-05-05  7:24       ` Antonio Quartulli
2011-05-07 17:42     ` Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304549599-25241-1-git-send-email-ordex@autistici.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).