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));
}
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);
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";
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",
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,
"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",
vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr),
eigrp_if_name_string(nbr->ei));
- vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown));
+ if (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);
vty_out(vty, "%-7lu", nbr->retrans_queue->count);
vty_out(vty, "%u\n", nbr->recv_sequence_number);
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;
}
-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;
install_element(CONFIG_NODE, &show_debugging_eigrp_cmd);
install_element(CONFIG_NODE, &debug_eigrp_packets_all_cmd);
install_element(CONFIG_NODE, &no_debug_eigrp_packets_all_cmd);
+ install_element(CONFIG_NODE, &debug_eigrp_transmit_cmd);
install_element(CONFIG_NODE, &no_debug_eigrp_transmit_cmd);
}