diff --git a/print-rsvp.c b/print-rsvp.c index bda805fb..ad949afb 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.43 2007-02-23 10:40:10 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.44 2007-02-25 22:06:12 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -272,6 +272,7 @@ static const struct tok rsvp_ctype_values[] = { { 256*RSVP_OBJ_FASTREROUTE+RSVP_CTYPE_1, "1" }, /* new style */ { 256*RSVP_OBJ_DETOUR+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, { 256*RSVP_OBJ_PROPERTIES+RSVP_CTYPE_1, "1" }, + { 256*RSVP_OBJ_ADMIN_STATUS+RSVP_CTYPE_1, "1" }, { 256*RSVP_OBJ_CLASSTYPE+RSVP_CTYPE_1, "1" }, { 256*RSVP_OBJ_CLASSTYPE_OLD+RSVP_CTYPE_1, "1" }, { 0, NULL} @@ -417,6 +418,15 @@ static struct tok rsvp_obj_error_code_diffserv_te_values[] = { { 0, NULL} }; +/* rfc3473 / rfc 3471 */ +static const struct tok rsvp_obj_admin_status_flag_values[] = { + { 0x80000000, "Reflect" }, + { 0x00000004, "Testing" }, + { 0x00000002, "Admin-down" }, + { 0x00000001, "Delete-in-progress" }, + { 0, NULL} +}; + static int rsvp_intserv_print(const u_char *, u_short); /* @@ -1408,6 +1418,22 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) { } break; + case RSVP_OBJ_ADMIN_STATUS: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + if (obj_tlen < 4) + return-1; + printf("%s Flags [%s]", ident, + bittok2str(rsvp_obj_admin_status_flag_values, "none", + EXTRACT_32BITS(obj_tptr))); + obj_tlen-=4; + obj_tptr+=4; + break; + default: + hexdump=TRUE; + } + break; + /* * FIXME those are the defined objects that lack a decoder * you are welcome to contribute code ;-)