]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Marc Binderberger:
authorGuy (Core OS) Harris <[email protected]>
Wed, 10 Jun 2009 03:51:30 +0000 (20:51 -0700)
committerGuy (Core OS) Harris <[email protected]>
Wed, 10 Jun 2009 03:51:30 +0000 (20:51 -0700)
I think this is a mistake in the procedure used to display the
bitfield.  Instead of tok2str() it should be bittok2str() - at
least since I changed it it display the flag field of the RSVP
session attribute correctly.

Diff file attached.

Additionally I've taken the freedom to shorten the displayed
strings a bit, taking the "desired" away that was in every
string.  While correct RFC it fills the screen.  Not sure about
your procedures changing output but as it never displayed before
anyway ...  ;-)

print-rsvp.c

index 346ff384caf858d3cbdf941992d4f05f5064e089..37140f9f10ed390df833ae66da5e8fa6e980c50e 100644 (file)
@@ -383,11 +383,11 @@ static const struct tok rsvp_intserv_parameter_id_values[] = {
 };
 
 static struct tok rsvp_session_attribute_flag_values[] = {
-    { 0x01,                  "Local Protection desired" },
-    { 0x02,                   "Label Recording desired" },
-    { 0x04,                   "SE Style desired" },
-    { 0x08,                   "Bandwidth protection desired" }, /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */
-    { 0x10,                   "Node protection desired" },      /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */
+    { 0x01,                  "Local Protection" },
+    { 0x02,                   "Label Recording" },
+    { 0x04,                   "SE Style" },
+    { 0x08,                   "Bandwidth protection" }, /* RFC4090 */
+    { 0x10,                   "Node protection" },      /* RFC4090 */
     { 0, NULL}
 };
 
@@ -1121,14 +1121,14 @@ rsvp_obj_print (const u_char *pptr, u_int plen, const u_char *tptr,
                 printf("%s  Session Name: ", ident);
                 for (i = 0; i < namelen; i++)
                     safeputchar(*(obj_tptr+4+i));
-                printf("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s]",
+                printf("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
                        ident,
                        (int)*obj_tptr,
                        (int)*(obj_tptr+1),
-                       tok2str(rsvp_session_attribute_flag_values,
+                       bittok2str(rsvp_session_attribute_flag_values,
                                   "none",
-                                  *(obj_tptr+2)));
-
+                                  *(obj_tptr+2)),
+                       *(obj_tptr+2));
                 obj_tlen-=4+*(obj_tptr+3);
                 obj_tptr+=4+*(obj_tptr+3);
                 break;