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 ... ;-)
};
static struct tok rsvp_session_attribute_flag_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 */
printf("%s Session Name: ", ident);
for (i = 0; i < namelen; i++)
safeputchar(*(obj_tptr+4+i));
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),
ident,
(int)*obj_tptr,
(int)*(obj_tptr+1),
- tok2str(rsvp_session_attribute_flag_values,
+ bittok2str(rsvp_session_attribute_flag_values,
+ *(obj_tptr+2)),
+ *(obj_tptr+2));
obj_tlen-=4+*(obj_tptr+3);
obj_tptr+=4+*(obj_tptr+3);
break;
obj_tlen-=4+*(obj_tptr+3);
obj_tptr+=4+*(obj_tptr+3);
break;