diff options
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_debug.c | 2 | ||||
-rw-r--r-- | ripd/rip_interface.c | 30 | ||||
-rw-r--r-- | ripd/rip_offset.c | 6 | ||||
-rw-r--r-- | ripd/rip_peer.c | 6 | ||||
-rw-r--r-- | ripd/rip_zebra.c | 4 |
5 files changed, 24 insertions, 24 deletions
diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index d788ea7e..64dc27c0 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -203,7 +203,7 @@ DEFUN (no_debug_rip_zebra, } /* Debug node. */ -struct cmd_node debug_node = +static struct cmd_node debug_node = { DEBUG_NODE, "", /* Debug node has no interface. */ diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index b6d9240f..131898c2 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -50,11 +50,12 @@ static int rip_enable_if_lookup (const char *ifname); static int rip_enable_network_lookup2 (struct connected *connected); static void rip_enable_apply_all (void); -struct message ri_version_msg[] = +const struct message ri_version_msg[] = { {RI_RIP_VERSION_1, "1"}, {RI_RIP_VERSION_2, "2"}, {RI_RIP_VERSION_1_AND_2, "1 2"}, + {0, NULL} }; extern struct zebra_privs_t ripd_privs; @@ -118,8 +119,7 @@ rip_interface_new (void) { struct rip_interface *ri; - ri = XMALLOC (MTYPE_RIP_INTERFACE, sizeof (struct rip_interface)); - memset (ri, 0, sizeof (struct rip_interface)); + ri = XCALLOC (MTYPE_RIP_INTERFACE, sizeof (struct rip_interface)); /* Default authentication type is simple password for Cisco compatibility. */ @@ -240,6 +240,7 @@ rip_request_interface (struct interface *ifp) } } +#if 0 /* Send RIP request to the neighbor. */ static void rip_request_neighbor (struct in_addr addr) @@ -270,6 +271,7 @@ rip_request_neighbor_all (void) if (rp->info) rip_request_neighbor (rp->p.u.prefix4); } +#endif /* Multicast packet receive socket. */ static int @@ -403,8 +405,9 @@ rip_interface_down (int command, struct zclient *zclient, zebra_size_t length) rip_if_down(ifp); if (IS_RIP_DEBUG_ZEBRA) - zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is down", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu); + zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is down", + ifp->name, ifp->ifindex, + (unsigned long long) ifp->flags, ifp->metric, ifp->mtu); return 0; } @@ -423,8 +426,9 @@ rip_interface_up (int command, struct zclient *zclient, zebra_size_t length) return 0; if (IS_RIP_DEBUG_ZEBRA) - zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is up", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu); + zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is up", + ifp->name, ifp->ifindex, (unsigned long long) ifp->flags, + ifp->metric, ifp->mtu); /* Check if this interface is RIP enabled or not.*/ rip_enable_apply (ifp); @@ -447,8 +451,9 @@ rip_interface_add (int command, struct zclient *zclient, zebra_size_t length) ifp = zebra_interface_add_read (zclient->ibuf); if (IS_RIP_DEBUG_ZEBRA) - zlog_debug ("interface add %s index %d flags %ld metric %d mtu %d", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu); + zlog_debug ("interface add %s index %d flags %#llx metric %d mtu %d", + ifp->name, ifp->ifindex, (unsigned long long) ifp->flags, + ifp->metric, ifp->mtu); /* Check if this interface is RIP enabled or not.*/ rip_enable_apply (ifp); @@ -486,8 +491,9 @@ rip_interface_delete (int command, struct zclient *zclient, rip_if_down(ifp); } - zlog_info("interface delete %s index %d flags %ld metric %d mtu %d", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu); + zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d", + ifp->name, ifp->ifindex, (unsigned long long) ifp->flags, + ifp->metric, ifp->mtu); /* To support pseudo interface do not free interface structure. */ /* if_delete(ifp); */ @@ -2052,7 +2058,7 @@ config_write_rip_network (struct vty *vty, int config_mode) return 0; } -struct cmd_node interface_node = +static struct cmd_node interface_node = { INTERFACE_NODE, "%s(config-if)# ", diff --git a/ripd/rip_offset.c b/ripd/rip_offset.c index e7d71f6c..0155f90e 100644 --- a/ripd/rip_offset.c +++ b/ripd/rip_offset.c @@ -63,11 +63,7 @@ strcmp_safe (const char *s1, const char *s2) static struct rip_offset_list * rip_offset_list_new (void) { - struct rip_offset_list *new; - - new = XMALLOC (MTYPE_RIP_OFFSET_LIST, sizeof (struct rip_offset_list)); - memset (new, 0, sizeof (struct rip_offset_list)); - return new; + return XCALLOC (MTYPE_RIP_OFFSET_LIST, sizeof (struct rip_offset_list)); } static void diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index e0617890..fd912eba 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -36,11 +36,7 @@ struct list *peer_list; static struct rip_peer * rip_peer_new (void) { - struct rip_peer *new; - - new = XMALLOC (MTYPE_RIP_PEER, sizeof (struct rip_peer)); - memset (new, 0, sizeof (struct rip_peer)); - return new; + return XCALLOC (MTYPE_RIP_PEER, sizeof (struct rip_peer)); } static void diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index b924199f..c476d8f4 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -233,6 +233,7 @@ DEFUN (no_router_zebra, return CMD_SUCCESS; } +#if 0 static int rip_redistribute_set (int type) { @@ -246,6 +247,7 @@ rip_redistribute_set (int type) return CMD_SUCCESS; } +#endif static int rip_redistribute_unset (int type) @@ -651,7 +653,7 @@ config_write_rip_redistribute (struct vty *vty, int config_mode) } /* Zebra node structure. */ -struct cmd_node zebra_node = +static struct cmd_node zebra_node = { ZEBRA_NODE, "%s(config-router)# ", |