diff options
author | Chris Hall <chris.hall@highwayman.com> | 2012-03-22 16:40:53 +0000 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2012-03-22 16:40:53 +0000 |
commit | 97f375b3e02e0f4ec18f68fbe36fc5ae16693d26 (patch) | |
tree | d0f89e2217723160b33c6632502e4f8eff6c3305 /ospfd/ospf_dump.c | |
parent | 508e7f2b7d78b1352e2bc1b282937ef7ab138a18 (diff) | |
parent | 87f81eae2a74580e58cd9bed13a4c62306181d04 (diff) | |
download | quagga-ex22b.tar.bz2 quagga-ex22b.tar.xz |
Merge commit 'quagga_0_99_20_1_release' into euro_ix_bex22b
v0.99.20ex22b
Conflicts:
bgpd/bgp_open.c
bgpd/bgp_packet.c
The bpp_open.c code has been replaced by code in bgp_open_state.c, so
these changes have no effect on the euro_ix branch, which already
rejects invalid OPEN with a NOTIFY.
Otherwise:
modified: ospfd/ospf_dump.c
modified: ospfd/ospf_dump.h
modified: ospfd/ospf_lsa.h
modified: ospfd/ospf_packet.c
modified: ospfd/ospf_packet.h
Diffstat (limited to 'ospfd/ospf_dump.c')
-rw-r--r-- | ospfd/ospf_dump.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index e65b2e33..7e11e251 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -115,6 +115,16 @@ const struct message ospf_network_type_msg[] = }; const int ospf_network_type_msg_max = OSPF_IFTYPE_MAX; +/* AuType */ +const struct message ospf_auth_type_str[] = +{ + { OSPF_AUTH_NULL, "Null" }, + { OSPF_AUTH_SIMPLE, "Simple" }, + { OSPF_AUTH_CRYPTOGRAPHIC, "Cryptographic" }, +}; +const size_t ospf_auth_type_str_max = sizeof (ospf_auth_type_str) / + sizeof (ospf_auth_type_str[0]); + /* Configuration debug option variables. */ unsigned long conf_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; unsigned long conf_debug_ospf_event = 0; @@ -657,18 +667,19 @@ static void ospf_header_dump (struct ospf_header *ospfh) { char buf[9]; + u_int16_t auth_type = ntohs (ospfh->auth_type); zlog_debug ("Header"); zlog_debug (" Version %d", ospfh->version); zlog_debug (" Type %d (%s)", ospfh->type, - ospf_packet_type_str[ospfh->type]); + LOOKUP (ospf_packet_type_str, ospfh->type)); zlog_debug (" Packet Len %d", ntohs (ospfh->length)); zlog_debug (" Router ID %s", inet_ntoa (ospfh->router_id)); zlog_debug (" Area ID %s", inet_ntoa (ospfh->area_id)); zlog_debug (" Checksum 0x%x", ntohs (ospfh->checksum)); - zlog_debug (" AuType %d", ntohs (ospfh->auth_type)); + zlog_debug (" AuType %s", LOOKUP (ospf_auth_type_str, auth_type)); - switch (ntohs (ospfh->auth_type)) + switch (auth_type) { case OSPF_AUTH_NULL: break; @@ -1457,7 +1468,7 @@ DEFUN (show_debugging_ospf, if (IS_DEBUG_OSPF_PACKET (i, SEND) && IS_DEBUG_OSPF_PACKET (i, RECV)) { vty_out (vty, " OSPF packet %s%s debugging is on%s", - ospf_packet_type_str[i + 1], + LOOKUP (ospf_packet_type_str, i + 1), IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "", VTY_NEWLINE); } @@ -1465,12 +1476,12 @@ DEFUN (show_debugging_ospf, { if (IS_DEBUG_OSPF_PACKET (i, SEND)) vty_out (vty, " OSPF packet %s send%s debugging is on%s", - ospf_packet_type_str[i + 1], + LOOKUP (ospf_packet_type_str, i + 1), IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "", VTY_NEWLINE); if (IS_DEBUG_OSPF_PACKET (i, RECV)) vty_out (vty, " OSPF packet %s receive%s debugging is on%s", - ospf_packet_type_str[i + 1], + LOOKUP (ospf_packet_type_str, i + 1), IS_DEBUG_OSPF_PACKET (i, DETAIL) ? " detail" : "", VTY_NEWLINE); } |