X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/9f3ac700b68448f588f810ae9343942e9ad61b68..9bdbb51f4122817ca8bdba9fb9917969809ff451:/print-rsvp.c diff --git a/print-rsvp.c b/print-rsvp.c index 42136b9a..57eed8bc 100644 --- a/print-rsvp.c +++ b/print-rsvp.c @@ -17,7 +17,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.38 2005-08-01 09:10:23 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.42 2006-06-23 02:03:09 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -142,7 +142,8 @@ static const struct tok rsvp_header_flag_values[] = { #define RSVP_OBJ_LABEL_SET 36 /* rfc3473 */ #define RSVP_OBJ_PROTECTION 37 /* rfc3473 */ #define RSVP_OBJ_DETOUR 63 /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */ -#define RSVP_OBJ_CLASSTYPE 125 /* draft-ietf-tewg-diff-te-proto-07 */ +#define RSVP_OBJ_CLASSTYPE 66 /* rfc4124 */ +#define RSVP_OBJ_CLASSTYPE_OLD 125 /* draft-ietf-tewg-diff-te-proto-07 */ #define RSVP_OBJ_SUGGESTED_LABEL 129 /* rfc3473 */ #define RSVP_OBJ_ACCEPT_LABEL_SET 130 /* rfc3473 */ #define RSVP_OBJ_RESTART_CAPABILITY 131 /* rfc3473 */ @@ -183,6 +184,7 @@ static const struct tok rsvp_obj_values[] = { { RSVP_OBJ_ACCEPT_LABEL_SET, "Acceptable Label Set" }, { RSVP_OBJ_DETOUR, "Detour" }, { RSVP_OBJ_CLASSTYPE, "Class Type" }, + { RSVP_OBJ_CLASSTYPE_OLD, "Class Type (old)" }, { RSVP_OBJ_SUGGESTED_LABEL, "Suggested Label" }, { RSVP_OBJ_PROPERTIES, "Properties" }, { RSVP_OBJ_FASTREROUTE, "Fast Re-Route" }, @@ -270,6 +272,7 @@ static const struct tok rsvp_ctype_values[] = { { 256*RSVP_OBJ_DETOUR+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, { 256*RSVP_OBJ_PROPERTIES+RSVP_CTYPE_1, "1" }, { 256*RSVP_OBJ_CLASSTYPE+RSVP_CTYPE_1, "1" }, + { 256*RSVP_OBJ_CLASSTYPE_OLD+RSVP_CTYPE_1, "1" }, { 0, NULL} }; @@ -376,12 +379,14 @@ static struct tok rsvp_obj_prop_tlv_values[] = { #define RSVP_OBJ_ERROR_SPEC_CODE_ROUTING 24 #define RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY 25 -#define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 125 +#define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 28 +#define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD 125 static struct tok rsvp_obj_error_code_values[] = { { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING, "Routing Problem" }, { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY, "Notify Error" }, { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE, "Diffserv TE Error" }, + { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD, "Diffserv TE Error (Old)" }, { 0, NULL} }; @@ -400,20 +405,17 @@ static struct tok rsvp_obj_error_code_routing_values[] = { }; static struct tok rsvp_obj_error_code_diffserv_te_values[] = { - { 1, "Unexpected CLASSTYPE object" }, - { 2, "Unsupported Class-Type" }, - { 3, "Invalid Class-Type value" }, - { 4, "Class-Type and setup priority do not form a configured TE-Class" }, - { 5, "Class-Type and holding priority do not form a configured TE-Class" }, - { 6, "Inconsistency between signaled PSC and signaled Class-Type" }, - { 7, "Inconsistency between signaled PHBs and signaled Class-Type" }, - { 0, NULL} + { 1, "Unexpected CT object" }, + { 2, "Unsupported CT" }, + { 3, "Invalid CT value" }, + { 4, "CT/setup priority do not form a configured TE-Class" }, + { 5, "CT/holding priority do not form a configured TE-Class" }, + { 6, "CT/setup priority and CT/holding priority do not form a configured TE-Class" }, + { 7, "Inconsistency between signaled PSC and signaled CT" }, + { 8, "Inconsistency between signaled PHBs and signaled CT" }, + { 0, NULL} }; -#define FALSE 0 -#define TRUE 1 - - static int rsvp_intserv_print(const u_char *, u_short); /* @@ -1233,9 +1235,10 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) { break; case RSVP_OBJ_CLASSTYPE: + case RSVP_OBJ_CLASSTYPE_OLD: /* fall through */ switch(rsvp_obj_ctype) { case RSVP_CTYPE_1: - printf("%s Class Type: %u", + printf("%s CT: %u", ident, EXTRACT_32BITS(obj_tptr)&0x7); obj_tlen-=4; @@ -1267,7 +1270,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) { tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value), error_value); break; - case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE: + case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE: /* fall through */ + case RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD: printf(", Error Value: %s (%u)", tok2str(rsvp_obj_error_code_diffserv_te_values,"unknown",error_value), error_value);