]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rsvp.c
Handle rpcaps:// URLs as well, for rpcap-over-TLS.
[tcpdump] / print-rsvp.c
index eb4c917ec189bb0033336d681994b681ed214792..2ebbc6319c281b7ee6f2680b62b8cd0c4ef41021 100644 (file)
@@ -33,7 +33,6 @@
 #include "af.h"
 #include "signature.h"
 
-static const char tstr[] = " [|rsvp]";
 
 /*
  * RFC 2205 common header
@@ -643,7 +642,7 @@ rsvp_intserv_print(netdissect_options *ndo,
     return (parameter_length+4); /* header length 4 bytes */
 
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
     return 0;
 }
 
@@ -1185,7 +1184,7 @@ rsvp_obj_print(netdissect_options *ndo,
                     return-1;
                 ND_PRINT("%s  Session Name: ", indent);
                 for (i = 0; i < namelen; i++)
-                    safeputchar(ndo, EXTRACT_U_1(obj_tptr + 4 + i));
+                    fn_print_char(ndo, EXTRACT_U_1(obj_tptr + 4 + i));
                 ND_PRINT("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
                        indent,
                        EXTRACT_U_1(obj_tptr),
@@ -1779,7 +1778,7 @@ rsvp_obj_print(netdissect_options *ndo,
 
                 ND_PRINT("%s  Action: %s (%u), Label type: %u", indent,
                        tok2str(rsvp_obj_label_set_action_values, "Unknown", action),
-                       action, ((EXTRACT_BE_U_4(obj_tptr) & 0x7F)));
+                       action, (EXTRACT_BE_U_4(obj_tptr) & 0x7F));
 
                 switch (action) {
                 case LABEL_SET_INCLUSIVE_RANGE:
@@ -1863,11 +1862,10 @@ rsvp_obj_print(netdissect_options *ndo,
     }
     return 0;
 invalid:
-    ND_PRINT("%s", istr);
+    nd_print_invalid(ndo);
     return -1;
 trunc:
-    ND_PRINT("\n\t\t");
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
     return -1;
 }
 
@@ -1880,6 +1878,7 @@ rsvp_print(netdissect_options *ndo,
     const u_char *tptr;
     u_short plen, tlen;
 
+    ndo->ndo_protocol = "rsvp";
     tptr=pptr;
 
     rsvp_com_header = (const struct rsvp_common_header *)pptr;
@@ -2019,6 +2018,5 @@ rsvp_print(netdissect_options *ndo,
 
     return;
 trunc:
-    ND_PRINT("\n\t\t");
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }