summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-12-08 01:16:27 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-05-17 02:27:08 +0200
commit4ec944086b343d30a3467eabf234e2670fbd0c2c (patch)
treec4259f011da5310f3713f634cca1beac3a8121ec /vrrpd/vrrp.h
parentvrrpd: implement advertisement send (diff)
downloadfrr-4ec944086b343d30a3467eabf234e2670fbd0c2c.tar.xz
frr-4ec944086b343d30a3467eabf234e2670fbd0c2c.zip
vrrpd: improve logging
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp.h')
-rw-r--r--vrrpd/vrrp.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/vrrpd/vrrp.h b/vrrpd/vrrp.h
index 1564cced5..6ce0e03bf 100644
--- a/vrrpd/vrrp.h
+++ b/vrrpd/vrrp.h
@@ -37,6 +37,8 @@
#define VRRP_MCAST_GROUP_HEX 0xe0000012
#define IPPROTO_VRRP 112
+#define VRRP_LOGPFX_VRID "[VRID: %u] "
+
/* threadmaster */
extern struct thread_master *master;
@@ -195,11 +197,14 @@ void vrrp_add_ip(struct vrrp_vrouter *vr, struct in_addr v4);
/* State machine ----------------------------------------------------------- */
-#define VRRP_STATE_INITIALIZE 1
-#define VRRP_STATE_MASTER 2
-#define VRRP_STATE_BACKUP 3
-#define VRRP_EVENT_STARTUP 1
-#define VRRP_EVENT_SHUTDOWN 2
+#define VRRP_STATE_INITIALIZE 0
+#define VRRP_STATE_MASTER 1
+#define VRRP_STATE_BACKUP 2
+#define VRRP_EVENT_STARTUP 0
+#define VRRP_EVENT_SHUTDOWN 1
+
+extern const char *vrrp_state_names[3];
+extern const char *vrrp_event_names[2];
/*
* This hook called whenever the state of a Virtual Router changes, after the