[Olsr-dev] [PATCH v1 025/115] txtinfo: move SIW_x defines into common code

Ferry Huberts (spam-protected)
Wed Dec 2 21:27:58 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/info/info_types.h           | 25 +++++++++++++++++++++++++
 lib/txtinfo/src/olsrd_txtinfo.c | 25 -------------------------
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/lib/info/info_types.h b/lib/info/info_types.h
index 4444721..652d174 100644
--- a/lib/info/info_types.h
+++ b/lib/info/info_types.h
@@ -46,6 +46,31 @@
 
 #include "common/autobuf.h"
 
+/* these provide all of the runtime status info */
+#define SIW_NEIGHBORS 0x0001
+#define SIW_LINKS 0x0002
+#define SIW_ROUTES 0x0004
+#define SIW_HNA 0x0008
+#define SIW_MID 0x0010
+#define SIW_TOPOLOGY 0x0020
+#define SIW_GATEWAYS 0x0040
+#define SIW_INTERFACES 0x0080
+#define SIW_2HOP 0x0100
+#define SIW_SGW 0x0200
+#define SIW_RUNTIME_ALL (SIW_NEIGHBORS | SIW_LINKS | SIW_ROUTES | SIW_HNA | SIW_MID | SIW_TOPOLOGY | SIW_GATEWAYS | SIW_INTERFACES | SIW_2HOP | SIW_SGW)
+
+/* these only change at olsrd startup */
+#define SIW_VERSION 0x0400
+#define SIW_CONFIG 0x0800
+#define SIW_PLUGINS 0x1000
+#define SIW_STARTUP_ALL (SIW_VERSION | SIW_CONFIG | SIW_PLUGINS)
+
+/* this is everything in normal format */
+#define SIW_ALL (SIW_RUNTIME_ALL | SIW_STARTUP_ALL)
+
+/* this data is not normal format but olsrd.conf format */
+#define SIW_OLSRD_CONF 0x2000
+
 typedef void (*printer_neighbors)(struct autobuf *abuf, bool list_2hop);
 typedef void (*printer_generic)(struct autobuf *abuf);
 
diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c
index e79b5cc..166da9d 100644
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -80,31 +80,6 @@ static void ipc_action(int, void *, unsigned int);
 
 #define TXT_IPC_BUFSIZE 256
 
-/* these provide all of the runtime status info */
-#define SIW_NEIGHBORS 0x0001
-#define SIW_LINKS 0x0002
-#define SIW_ROUTES 0x0004
-#define SIW_HNA 0x0008
-#define SIW_MID 0x0010
-#define SIW_TOPOLOGY 0x0020
-#define SIW_GATEWAYS 0x0040
-#define SIW_INTERFACES 0x0080
-#define SIW_2HOP 0x0100
-#define SIW_SGW 0x0200
-#define SIW_RUNTIME_ALL (SIW_NEIGHBORS | SIW_LINKS | SIW_ROUTES | SIW_HNA | SIW_MID | SIW_TOPOLOGY | SIW_GATEWAYS | SIW_INTERFACES | SIW_2HOP | SIW_SGW)
-
-/* these only change at olsrd startup */
-#define SIW_VERSION 0x0400
-#define SIW_CONFIG 0x0800
-#define SIW_PLUGINS 0x1000
-#define SIW_STARTUP_ALL (SIW_VERSION | SIW_CONFIG | SIW_PLUGINS)
-
-/* this is everything in normal format */
-#define SIW_ALL (SIW_RUNTIME_ALL | SIW_STARTUP_ALL)
-
-/* this data is not normal format but olsrd.conf format */
-#define SIW_OLSRD_CONF 0x2000
-
 #define MAX_CLIENTS 3
 
 static char *outbuffer[MAX_CLIENTS];
-- 
2.5.0




More information about the Olsr-dev mailing list