X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5379087cc4446c23f29a2c6740811152463ed78a..8f94d68a09e1103353cc7d1133d6dfdf7d5a920d:/print-rsvp.c diff --git a/print-rsvp.c b/print-rsvp.c index 2e0c27cf..8c915777 100644 --- a/print-rsvp.c +++ b/print-rsvp.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.16 2003-03-05 11:28:21 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.19 2003-05-08 14:52:20 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -242,6 +242,15 @@ static const struct tok rsvp_obj_xro_values[] = { { 0, NULL} }; +/* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */ +static const struct tok rsvp_obj_rro_flag_values[] = { + { 0x01, "Local protection available" }, + { 0x02, "Local protection in use" }, + { 0x04, "Bandwidth protection" }, + { 0x08, "Node protection" }, + { 0, NULL} +}; + static const struct tok rsvp_resstyle_values[] = { { 17, "Wildcard Filter" }, { 10, "Fixed Filter" }, @@ -274,9 +283,11 @@ static const struct tok rsvp_intserv_parameter_id_values[] = { }; static struct tok rsvp_session_attribute_flag_values[] = { - { 1, "Local Protection desired" }, - { 2, "Label Recording desired" }, - { 4, "SE Style desired" }, + { 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 */ { 0, NULL} }; @@ -720,10 +731,13 @@ rsvp_print(register const u_char *pptr, register u_int len) { RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr))); switch(RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr)) { case RSVP_OBJ_XRO_IPV4: - printf(", %s, %s/%u", + printf(", %s, %s/%u, Flags: [%s]", RSVP_OBJ_XRO_MASK_LOOSE(*obj_tptr) ? "Loose" : "Strict", ipaddr_string(obj_tptr+2), - *(obj_tptr+6)); + *(obj_tptr+6), + bittok2str(rsvp_obj_rro_flag_values, + "none", + *(obj_tptr+7))); /* rfc3209 says that this field is rsvd. */ } obj_tlen-=*(obj_tptr+1); obj_tptr+=*(obj_tptr+1); @@ -943,15 +957,16 @@ rsvp_print(register const u_char *pptr, register u_int len) { ipaddr_string(obj_tptr), *(obj_tptr+4), tok2str(rsvp_obj_error_code_values,"unknown",error_code), - error_code, - error_value); + error_code); switch (error_code) { case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING: printf(", Error Value: %s (%u)", - tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value)); + tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value), + error_value); break; default: - printf(", Unknown Error Value (%u)"); + printf(", Unknown Error Value (%u)", error_value); + break; } break; #ifdef INET6 @@ -962,16 +977,16 @@ rsvp_print(register const u_char *pptr, register u_int len) { ip6addr_string(obj_tptr), *(obj_tptr+16), tok2str(rsvp_obj_error_code_values,"unknown",error_code), - error_code, - error_value); + error_code); switch (error_code) { case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING: printf(", Error Value: %s (%u)", - tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value)); + tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value), + error_value); break; default: - printf(", Unknown Error Value (%u)"); + break; } break;