]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ldp.c
Add more nd_print_trunc() calls
[tcpdump] / print-ldp.c
index 2803aa33afb7732ea41df80d478201062e7b0c77..351c1f81e55b2793b431d466d992ee7f666a5b01 100644 (file)
@@ -29,6 +29,7 @@
 #include "l2vpn.h"
 #include "af.h"
 
+
 /*
  * ldp common header
  *
@@ -441,7 +442,7 @@ ldp_tlv_print(netdissect_options *ndo,
                 case LDP_FEC_MARTINI_IFPARM_DESC:
                     ND_PRINT(": ");
                     for (idx = 2; idx < vc_info_tlv_len; idx++)
-                        safeputchar(ndo, EXTRACT_U_1(tptr + idx));
+                        fn_print_char(ndo, EXTRACT_U_1(tptr + idx));
                     break;
 
                 case LDP_FEC_MARTINI_IFPARM_VCCV:
@@ -534,7 +535,7 @@ ldp_tlv_print(netdissect_options *ndo,
     return(tlv_len+4); /* Type & Length fields not included */
 
 trunc:
-    ND_PRINT("\n\t\t packet exceeded snapshot");
+    nd_print_trunc(ndo);
     return 0;
 
 badtlv:
@@ -547,6 +548,8 @@ ldp_print(netdissect_options *ndo,
           const u_char *pptr, u_int len)
 {
     int processed;
+
+    ndo->ndo_protocol = "ldp";
     while (len > (sizeof(struct ldp_common_header) + sizeof(struct ldp_msg_header))) {
         processed = ldp_pdu_print(ndo, pptr);
         if (processed == 0)
@@ -686,13 +689,6 @@ ldp_pdu_print(netdissect_options *ndo,
     }
     return pdu_len+4;
 trunc:
-    ND_PRINT("\n\t\t packet exceeded snapshot");
+    nd_print_trunc(ndo);
     return 0;
 }
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */