]> git.proxmox.com Git - mirror_frr.git/blobdiff - eigrpd/eigrp_dump.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / eigrpd / eigrp_dump.c
index aca6e5981601ab50f7aa83253403c1b8def48d88..27e02630a655d91c7d05912af872031250f77f26 100644 (file)
@@ -117,11 +117,11 @@ void eigrp_ip_header_dump(struct ip *iph)
        zlog_debug("ip_hl %u", iph->ip_hl);
        zlog_debug("ip_tos %u", iph->ip_tos);
        zlog_debug("ip_len %u", iph->ip_len);
-       zlog_debug("ip_id %u", (u_int32_t)iph->ip_id);
-       zlog_debug("ip_off %u", (u_int32_t)iph->ip_off);
+       zlog_debug("ip_id %u", (uint32_t)iph->ip_id);
+       zlog_debug("ip_off %u", (uint32_t)iph->ip_off);
        zlog_debug("ip_ttl %u", iph->ip_ttl);
        zlog_debug("ip_p %u", iph->ip_p);
-       zlog_debug("ip_sum 0x%x", (u_int32_t)iph->ip_sum);
+       zlog_debug("ip_sum 0x%x", (uint32_t)iph->ip_sum);
        zlog_debug("ip_src %s", inet_ntoa(iph->ip_src));
        zlog_debug("ip_dst %s", inet_ntoa(iph->ip_dst));
 }
@@ -156,9 +156,9 @@ const char *eigrp_if_name_string(struct eigrp_interface *ei)
 const char *eigrp_topology_ip_string(struct eigrp_prefix_entry *tn)
 {
        static char buf[EIGRP_IF_STRING_MAXLEN] = "";
-       u_int32_t ifaddr;
+       uint32_t ifaddr;
 
-       ifaddr = ntohl(tn->destination_ipv4->prefix.s_addr);
+       ifaddr = ntohl(tn->destination->u.prefix4.s_addr);
        snprintf(buf, EIGRP_IF_STRING_MAXLEN, "%u.%u.%u.%u",
                 (ifaddr >> 24) & 0xff, (ifaddr >> 16) & 0xff,
                 (ifaddr >> 8) & 0xff, ifaddr & 0xff);
@@ -169,7 +169,7 @@ const char *eigrp_topology_ip_string(struct eigrp_prefix_entry *tn)
 const char *eigrp_if_ip_string(struct eigrp_interface *ei)
 {
        static char buf[EIGRP_IF_STRING_MAXLEN] = "";
-       u_int32_t ifaddr;
+       uint32_t ifaddr;
 
        if (!ei)
                return "inactive";
@@ -185,7 +185,7 @@ const char *eigrp_if_ip_string(struct eigrp_interface *ei)
 const char *eigrp_neigh_ip_string(struct eigrp_neighbor *nbr)
 {
        static char buf[EIGRP_IF_STRING_MAXLEN] = "";
-       u_int32_t ifaddr;
+       uint32_t ifaddr;
 
        ifaddr = ntohl(nbr->src.s_addr);
        snprintf(buf, EIGRP_IF_STRING_MAXLEN, "%u.%u.%u.%u",
@@ -210,14 +210,13 @@ void show_ip_eigrp_interface_sub(struct vty *vty, struct eigrp *eigrp,
                                 struct eigrp_interface *ei)
 {
        vty_out(vty, "%-11s ", eigrp_if_name_string(ei));
-       vty_out(vty, "%-11u", IF_DEF_PARAMS(ei->ifp)->bandwidth);
-       vty_out(vty, "%-11u", IF_DEF_PARAMS(ei->ifp)->delay);
+       vty_out(vty, "%-11u", ei->params.bandwidth);
+       vty_out(vty, "%-11u", ei->params.delay);
        vty_out(vty, "%-7u", ei->nbrs->count);
        vty_out(vty, "%u %c %-10u", 0, '/',
                eigrp_neighbor_packet_queue_sum(ei));
        vty_out(vty, "%-7u %-14u %-12u %-8u", 0, 0, 0, 0);
-       vty_out(vty, "%-8u %-8u \n", IF_DEF_PARAMS(ei->ifp)->v_hello,
-               IF_DEF_PARAMS(ei->ifp)->v_wait);
+       vty_out(vty, "%-8u %-8u \n", ei->params.v_hello, ei->params.v_wait);
 }
 
 void show_ip_eigrp_interface_detail(struct vty *vty, struct eigrp *eigrp,
@@ -229,7 +228,7 @@ void show_ip_eigrp_interface_detail(struct vty *vty, struct eigrp *eigrp,
                "Un/reliable mcasts: ", 0, "/", 0, "Un/reliable ucasts: ", 0,
                "/", 0);
        vty_out(vty, "%-2s %s %d %s %d %s %d \n", "", "Mcast exceptions: ", 0,
-               "  CR packets: ", 0, "  ACKs supressed: ", 0);
+               "  CR packets: ", 0, "  ACKs suppressed: ", 0);
        vty_out(vty, "%-2s %s %d %s %d \n", "", "Retransmissions sent: ", 0,
                "Out-of-sequence rcvd: ", 0);
        vty_out(vty, "%-2s %s %s %s \n", "", "Authentication mode is ", "not",
@@ -253,7 +252,8 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr,
        vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr),
                eigrp_if_name_string(nbr->ei));
        if (nbr->t_holddown)
-               vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown));
+               vty_out(vty, "%-7lu",
+                       thread_timer_remain_second(nbr->t_holddown));
        else
                vty_out(vty, "-      ");
        vty_out(vty, "%-8u %-6u %-5u", 0, 0, EIGRP_PACKET_RETRANS_TIME);
@@ -289,20 +289,22 @@ void show_ip_eigrp_topology_header(struct vty *vty, struct eigrp *eigrp)
 void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
 {
        struct list *successors = eigrp_topology_get_successor(tn);
+       char buffer[PREFIX_STRLEN];
 
        vty_out(vty, "%-3c", (tn->state > 0) ? 'A' : 'P');
 
-       vty_out(vty, "%s/%u, ", inet_ntoa(tn->destination_ipv4->prefix),
-               tn->destination_ipv4->prefixlen);
-       vty_out(vty, "%u successors, ", successors->count);
+       vty_out(vty, "%s, ",
+               prefix2str(tn->destination, buffer, PREFIX_STRLEN));
+       vty_out(vty, "%u successors, ", (successors) ? successors->count : 0);
        vty_out(vty, "FD is %u, serno: %" PRIu64 " \n", tn->fdistance,
                tn->serno);
 
-       list_delete(successors);
+       if (successors)
+               list_delete(&successors);
 }
 
-void show_ip_eigrp_neighbor_entry(struct vty *vty, struct eigrp *eigrp,
-                                 struct eigrp_neighbor_entry *te, int *first)
+void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
+                                struct eigrp_nexthop_entry *te, int *first)
 {
        if (te->reported_distance == EIGRP_MAX_METRIC)
                return;
@@ -323,12 +325,12 @@ void show_ip_eigrp_neighbor_entry(struct vty *vty, struct eigrp *eigrp,
 }
 
 
-DEFUN (show_debugging_eigrp,
-       show_debugging_eigrp_cmd,
-       "show debugging eigrp",
-       SHOW_STR
-       DEBUG_STR
-       EIGRP_STR)
+DEFUN_NOSH (show_debugging_eigrp,
+           show_debugging_eigrp_cmd,
+           "show debugging [eigrp]",
+           SHOW_STR
+           DEBUG_STR
+           EIGRP_STR)
 {
        int i;