]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6d.h
Merge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn
[mirror_frr.git] / ospf6d / ospf6d.h
index 41082e451b3e591a87a338fbaa5f43d5849684b6..36f3c2233f77a8dced09fd94d240da8a1c55c622 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef OSPF6D_H
 #define OSPF6D_H
 
-#define OSPF6_DAEMON_VERSION    "0.9.7r"
-
 #include "libospf.h"
 #include "thread.h"
 
@@ -57,31 +55,31 @@ extern struct thread_master *master;
 #define OSPF6_NEIGHBOR(x) ((struct ospf6_neighbor *) (x))
 
 /* operation on timeval structure */
-#define timerstring(tv, buf, size)                      \
-  do {                                                  \
-    if ((tv)->tv_sec / 60 / 60 / 24)                    \
-      snprintf (buf, size, "%lldd%02lld:%02lld:%02lld", \
-                (tv)->tv_sec / 60LL / 60 / 24,          \
-                (tv)->tv_sec / 60LL / 60 % 24,          \
-                (tv)->tv_sec / 60LL % 60,               \
-                (tv)->tv_sec % 60LL);                   \
-    else                                                \
-      snprintf (buf, size, "%02lld:%02lld:%02lld",      \
-                (tv)->tv_sec / 60LL / 60 % 24,          \
-                (tv)->tv_sec / 60LL % 60,               \
-                (tv)->tv_sec % 60LL);                   \
-  } while (0)
-
-#define threadtimer_string(now, t, buf, size)                         \
-  do {                                                                \
-    struct timeval result;                                            \
-    if (!t)                                                           \
-      snprintf(buf, size, "inactive");                               \
-    else {                                                            \
-      timersub(&t->u.sands, &now, &result);                           \
-      timerstring(&result, buf, size);                                \
-    }                                                                 \
-} while (0)
+#define timerstring(tv, buf, size)                                             \
+       do {                                                                   \
+               if ((tv)->tv_sec / 60 / 60 / 24)                               \
+                       snprintf(buf, size, "%lldd%02lld:%02lld:%02lld",       \
+                                (tv)->tv_sec / 60LL / 60 / 24,                \
+                                (tv)->tv_sec / 60LL / 60 % 24,                \
+                                (tv)->tv_sec / 60LL % 60,                     \
+                                (tv)->tv_sec % 60LL);                         \
+               else                                                           \
+                       snprintf(buf, size, "%02lld:%02lld:%02lld",            \
+                                (tv)->tv_sec / 60LL / 60 % 24,                \
+                                (tv)->tv_sec / 60LL % 60,                     \
+                                (tv)->tv_sec % 60LL);                         \
+       } while (0)
+
+#define threadtimer_string(now, t, buf, size)                                  \
+       do {                                                                   \
+               struct timeval _result;                                        \
+               if (!t)                                                        \
+                       snprintf(buf, size, "inactive");                       \
+               else {                                                         \
+                       timersub(&t->u.sands, &now, &_result);                 \
+                       timerstring(&_result, buf, size);                      \
+               }                                                              \
+       } while (0)
 
 /* for commands */
 #define OSPF6_AREA_STR      "Area information\n"
@@ -90,21 +88,18 @@ extern struct thread_master *master;
 #define OSPF6_ROUTER_ID_STR "Specify Router-ID\n"
 #define OSPF6_LS_ID_STR     "Specify Link State ID\n"
 
-#define VNL VTYNL
-#define OSPF6_CMD_CHECK_RUNNING() \
-  if (ospf6 == NULL) \
-    { \
-      vty_out (vty, "OSPFv3 is not running%s", VTYNL); \
-      return CMD_SUCCESS; \
-    }
+#define OSPF6_CMD_CHECK_RUNNING()                                              \
+       if (ospf6 == NULL) {                                                   \
+               vty_out(vty, "OSPFv3 is not running\n");                       \
+               return CMD_SUCCESS;                                            \
+       }
 
+extern struct zebra_privs_t ospf6d_privs;
 
 /* Function Prototypes */
-extern struct route_node *route_prev (struct route_node *node);
+extern struct route_node *route_prev(struct route_node *node);
 
-extern void ospf6_debug (void);
-extern void ospf6_init (void);
+extern void ospf6_debug(void);
+extern void ospf6_init(void);
 
 #endif /* OSPF6D_H */
-
-