- printf("\n\t %s LSA (%d), LSA-ID: %s, Advertising Router: %s, seq 0x%08x, age %us",
- tok2str(lsa_values,"unknown",lsap->ls_hdr.ls_type),
- lsap->ls_hdr.ls_type,
- ipaddr_string(&lsap->ls_hdr.ls_stateid),
- ipaddr_string(&lsap->ls_hdr.ls_router),
- EXTRACT_32BITS(&lsap->ls_hdr.ls_seq),
- EXTRACT_16BITS(&lsap->ls_hdr.ls_age));
+ switch (lsap->ls_hdr.ls_type) {
+
+ /* the LSA header for opaque LSAs was slightly changed */
+ case LS_TYPE_OPAQUE_LL:
+ case LS_TYPE_OPAQUE_AL:
+ case LS_TYPE_OPAQUE_DW:
+
+ printf("\n\t %s LSA (%d), Opaque-Type: %u, Opaque-ID: %u, Adv. Router: %s, seq 0x%08x, age %us",
+ tok2str(lsa_values,"unknown",lsap->ls_hdr.ls_type),
+ (lsap->ls_hdr.ls_type),
+ *(&lsap->ls_hdr.opaque_type),
+ EXTRACT_24BITS(&lsap->ls_hdr.opaque_id),
+ ipaddr_string(&lsap->ls_hdr.ls_router),
+ EXTRACT_32BITS(&lsap->ls_hdr.ls_seq),
+ EXTRACT_16BITS(&lsap->ls_hdr.ls_age));
+
+ break;
+
+ /* all other LSA types use regular style LSA headers */
+ default:
+ printf("\n\t %s LSA (%d), LSA-ID: %s, Adv. Router: %s, seq 0x%08x, age %us",
+ tok2str(lsa_values,"unknown",lsap->ls_hdr.ls_type),
+ lsap->ls_hdr.ls_type,
+ ipaddr_string(&lsap->ls_hdr.ls_stateid),
+ ipaddr_string(&lsap->ls_hdr.ls_router),
+ EXTRACT_32BITS(&lsap->ls_hdr.ls_seq),
+ EXTRACT_16BITS(&lsap->ls_hdr.ls_age));
+ break;
+ }
+