info: make defines for SIW_* constants a bit clearer
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 12 Apr 2016 19:39:45 +0000 (21:39 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 13 Apr 2016 08:03:41 +0000 (10:03 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/info_types.h

index a033a41..e6dd34f 100644 (file)
@@ -70,30 +70,30 @@ typedef struct {
   { .name = "cachetimeout", .set_plugin_parameter = &set_plugin_long, .data = &config.cache_timeout }
 
 /* these provide all of the runtime status info */
-#define SIW_NEIGHBORS                    0x0000000000000001ULL
-#define SIW_LINKS                        0x0000000000000002ULL
-#define SIW_ROUTES                       0x0000000000000004ULL
-#define SIW_HNA                          0x0000000000000008ULL
-#define SIW_MID                          0x0000000000000010ULL
-#define SIW_TOPOLOGY                     0x0000000000000020ULL
-#define SIW_GATEWAYS                     0x0000000000000040ULL
-#define SIW_INTERFACES                   0x0000000000000080ULL
-#define SIW_2HOP                         0x0000000000000100ULL
-#define SIW_SGW                          0x0000000000000200ULL
-#define SIW_RUNTIME_ALL (SIW_NEIGHBORS | SIW_LINKS | SIW_ROUTES | SIW_HNA | SIW_MID | SIW_TOPOLOGY | SIW_GATEWAYS | SIW_INTERFACES | SIW_2HOP | SIW_SGW)
-#define SIW_NEIGHBORS_FREIFUNK (SIW_NEIGHBORS | SIW_LINKS) /* special */
+#define SIW_NEIGHBORS                    (1ULL <<  0)
+#define SIW_LINKS                        (1ULL <<  1)
+#define SIW_ROUTES                       (1ULL <<  2)
+#define SIW_HNA                          (1ULL <<  3)
+#define SIW_MID                          (1ULL <<  4)
+#define SIW_TOPOLOGY                     (1ULL <<  5)
+#define SIW_GATEWAYS                     (1ULL <<  6)
+#define SIW_INTERFACES                   (1ULL <<  7)
+#define SIW_2HOP                         (1ULL <<  8)
+#define SIW_SGW                          (1ULL <<  9)
+#define SIW_RUNTIME_ALL                  (SIW_NEIGHBORS | SIW_LINKS | SIW_ROUTES | SIW_HNA | SIW_MID | SIW_TOPOLOGY | SIW_GATEWAYS | SIW_INTERFACES | SIW_2HOP | SIW_SGW)
+#define SIW_NEIGHBORS_FREIFUNK           (SIW_NEIGHBORS | SIW_LINKS) /* special */
 
 /* these only change at olsrd startup */
-#define SIW_VERSION                      0x0000000000000400ULL
-#define SIW_CONFIG                       0x0000000000000800ULL
-#define SIW_PLUGINS                      0x0000000000001000ULL
-#define SIW_STARTUP_ALL (SIW_VERSION | SIW_CONFIG | SIW_PLUGINS)
+#define SIW_VERSION                      (1ULL << 10)
+#define SIW_CONFIG                       (1ULL << 11)
+#define SIW_PLUGINS                      (1ULL << 12)
+#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)
+#define SIW_ALL                          (SIW_RUNTIME_ALL | SIW_STARTUP_ALL)
 
 /* this data is not normal format but olsrd.conf format */
-#define SIW_OLSRD_CONF                   0x0000000000002000ULL
+#define SIW_OLSRD_CONF                   (1ULL << 13)
 
 typedef void (*init_plugin)(const char *plugin_name);
 typedef bool (*command_matcher)(const char *str, unsigned long long siw);