]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add support for IS-IS Purge Originator Identifier as per RFC6232.
authorHannes Gredler <[email protected]>
Tue, 19 May 2015 13:49:40 +0000 (15:49 +0200)
committerHannes Gredler <[email protected]>
Tue, 19 May 2015 13:49:40 +0000 (15:49 +0200)
print-isoclns.c

index fb15911c51b2787bfdb875b1acd64dfb49abcb30..43caf1faf5f7998cfd304df9abcb41384b240196 100644 (file)
@@ -102,6 +102,7 @@ static const struct tok isis_pdu_values[] = {
 #define ISIS_TLV_AUTH                10  /* iso10589, rfc3567 */
 #define ISIS_TLV_CHECKSUM            12  /* rfc3358 */
 #define ISIS_TLV_CHECKSUM_MINLEN 2
+#define ISIS_TLV_POI                 13  /* rfc6232 */
 #define ISIS_TLV_LSP_BUFFERSIZE      14  /* iso10589 rev2 */
 #define ISIS_TLV_LSP_BUFFERSIZE_MINLEN 2
 #define ISIS_TLV_EXT_IS_REACH        22  /* draft-ietf-isis-traffic-05 */
@@ -151,6 +152,7 @@ static const struct tok isis_tlv_values[] = {
     { ISIS_TLV_LSP,                "LSP entries"},
     { ISIS_TLV_AUTH,               "Authentication"},
     { ISIS_TLV_CHECKSUM,           "Checksum"},
+    { ISIS_TLV_POI,                "Purge Originator Identifier"},
     { ISIS_TLV_LSP_BUFFERSIZE,     "LSP Buffersize"},
     { ISIS_TLV_EXT_IS_REACH,       "Extended IS Reachability"},
     { ISIS_TLV_IS_ALIAS_ID,        "IS Alias ID"},
@@ -2885,6 +2887,22 @@ isis_print(netdissect_options *ndo,
             osi_print_cksum(ndo, optr, EXTRACT_16BITS(tptr), tptr-optr, length);
            break;
 
+       case ISIS_TLV_POI:
+           if (tlv_len >= SYSTEM_ID_LEN + 1) {
+               if (!ND_TTEST2(*tptr, SYSTEM_ID_LEN + 1))
+                   goto trunctlv;
+               ND_PRINT((ndo, "\n\t      Purge Originator System-ID: %s",
+                      isis_print_id(tptr + 1, SYSTEM_ID_LEN)));
+           }
+
+           if (tlv_len == 2 * SYSTEM_ID_LEN + 1) {
+               if (!ND_TTEST2(*tptr, 2 * SYSTEM_ID_LEN + 1))
+                   goto trunctlv;
+               ND_PRINT((ndo, "\n\t      Received from System-ID: %s",
+                      isis_print_id(tptr + SYSTEM_ID_LEN + 1, SYSTEM_ID_LEN)));
+           }
+           break;
+
        case ISIS_TLV_MT_SUPPORTED:
             if (tmp < ISIS_TLV_MT_SUPPORTED_MINLEN)
                 break;