summaryrefslogtreecommitdiff
path: root/pimd/pim_pim.h
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_pim.h')
-rw-r--r--pimd/pim_pim.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/pimd/pim_pim.h b/pimd/pim_pim.h
index 5692a37938..00c5f9012e 100644
--- a/pimd/pim_pim.h
+++ b/pimd/pim_pim.h
@@ -28,8 +28,6 @@
#define PIM_PIM_BUFSIZE_READ (20000)
#define PIM_PIM_BUFSIZE_WRITE (20000)
-#define PIM_NEXTHOP_IFINDEX_TAB_SIZE (20)
-
#define PIM_DEFAULT_HELLO_PERIOD (30) /* seconds, RFC 4601: 4.11 */
#define PIM_DEFAULT_TRIGGERED_HELLO_DELAY (5) /* seconds, RFC 4601: 4.11 */
#define PIM_DEFAULT_DR_PRIORITY (1) /* RFC 4601: 4.3.1 */
@@ -38,15 +36,17 @@
#define PIM_DEFAULT_CAN_DISABLE_JOIN_SUPPRESSION (0) /* boolean */
#define PIM_DEFAULT_T_PERIODIC (60) /* RFC 4601: 4.11. Timer Values */
-#define PIM_MSG_TYPE_HELLO (0)
-#define PIM_MSG_TYPE_REGISTER (1)
-#define PIM_MSG_TYPE_REG_STOP (2)
-#define PIM_MSG_TYPE_JOIN_PRUNE (3)
-#define PIM_MSG_TYPE_BOOTSTRAP (4)
-#define PIM_MSG_TYPE_ASSERT (5)
-#define PIM_MSG_TYPE_GRAFT (6)
-#define PIM_MSG_TYPE_GRAFT_ACK (7)
-#define PIM_MSG_TYPE_CANDIDATE (8)
+enum pim_msg_type {
+ PIM_MSG_TYPE_HELLO = 0,
+ PIM_MSG_TYPE_REGISTER,
+ PIM_MSG_TYPE_REG_STOP,
+ PIM_MSG_TYPE_JOIN_PRUNE,
+ PIM_MSG_TYPE_BOOTSTRAP,
+ PIM_MSG_TYPE_ASSERT,
+ PIM_MSG_TYPE_GRAFT,
+ PIM_MSG_TYPE_GRAFT_ACK,
+ PIM_MSG_TYPE_CANDIDATE
+};
#define PIM_MSG_HDR_OFFSET_VERSION(pim_msg) (pim_msg)
#define PIM_MSG_HDR_OFFSET_TYPE(pim_msg) (pim_msg)
@@ -67,6 +67,7 @@ void pim_hello_restart_triggered(struct interface *ifp);
int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len);
int pim_msg_send(int fd,
+ struct in_addr src,
struct in_addr dst,
uint8_t *pim_msg,
int pim_msg_size,