Lines Matching +full:4 +full:- +full:switch
2 * Copyright (c) 1998-2007 The TCPDUMP project
24 #include "netdissect-stdinc.h"
39 * +-------------+-------------+-------------+-------------+
41 * +-------------+-------------+-------------+-------------+
43 * +-------------+-------------+-------------+-------------+
61 * +-------------+-------------+-------------+-------------+
62 * | Length (bytes) | Class-Num | C-Type |
63 * +-------------+-------------+-------------+-------------+
67 * +-------------+-------------+-------------+-------------+
77 #define RSVP_EXTRACT_VERSION(x) (((x)&0xf0)>>4)
83 #define RSVP_MSGTYPE_RESVERR 4
123 #define RSVP_OBJ_INTEGRITY 4 /* rfc2747 */
150 #define RSVP_OBJ_CLASSTYPE_OLD 125 /* draft-ietf-tewg-diff-te-proto-07 */
196 { RSVP_OBJ_FASTREROUTE, "Fast Re-Route" },
199 { RSVP_OBJ_CALL_ID, "Call-ID" },
206 { RSVP_OBJ_S2L, "Sub-LSP to LSP" },
218 #define RSVP_CTYPE_4 4
245 { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_3, "IPv6 Flow-label" },
301 { 256*RSVP_OBJ_S2L+RSVP_CTYPE_IPV4, "IPv4 sub-LSP" },
302 { 256*RSVP_OBJ_S2L+RSVP_CTYPE_IPV6, "IPv6 sub-LSP" },
307 * XXX - this assumes a 16-byte digest, which is true for HMAC-MD5, but
312 * out-of-band, or negotiated by other RSVP objects.
332 uint8_t bandwidth[4];
333 uint8_t include_any[4];
334 uint8_t exclude_any[4];
335 uint8_t include_all[4];
394 { 4, "IS hop cnt" },
400 { 133, "End-to-end composed value for C" },
401 { 134, "End-to-end composed value for D" },
402 { 135, "Since-last-reshaping point composed C" },
403 { 136, "Since-last-reshaping point composed D" },
442 { 4, "Bad initial subobject" },
446 { 8, "non-RSVP-capable router in the path" },
456 { 4, "CT/setup priority do not form a configured TE-Class" },
457 { 5, "CT/holding priority do not form a configured TE-Class" },
458 … "CT/setup priority and CT/holding priority do not form a configured TE-Class" },
468 { 0x00000002, "Admin-down" },
469 { 0x00000001, "Delete-in-progress" },
473 /* label set actions - rfc3471 */
491 #define RSVP_GEN_UNI_SUBOBJ_EGRESS_LABEL 4
519 if (obj_tlen < 4) in rsvp_intserv_print()
530 if (obj_tlen < parameter_length+4) in rsvp_intserv_print()
532 switch(parameter_id) { /* parameter_id */ in rsvp_intserv_print()
534 case 4: in rsvp_intserv_print()
536 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
537 * | 4 (e) | (f) | 1 (g) | in rsvp_intserv_print()
538 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
539 * | IS hop cnt (32-bit unsigned integer) | in rsvp_intserv_print()
540 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
542 if (parameter_length == 4) { in rsvp_intserv_print()
543 ND_PRINT("\n\t\tIS hop count: %u", GET_BE_U_4(tptr + 4)); in rsvp_intserv_print()
549 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
551 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
552 * | Path b/w estimate (32-bit IEEE floating point number) | in rsvp_intserv_print()
553 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
555 if (parameter_length == 4) { in rsvp_intserv_print()
556 bw.i = GET_BE_U_4(tptr + 4); in rsvp_intserv_print()
563 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
565 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
566 * | Minimum path latency (32-bit integer) | in rsvp_intserv_print()
567 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
569 if (parameter_length == 4) { in rsvp_intserv_print()
571 if (GET_BE_U_4(tptr + 4) == 0xffffffff) in rsvp_intserv_print()
574 ND_PRINT("%u", GET_BE_U_4(tptr + 4)); in rsvp_intserv_print()
581 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
583 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
584 * | Composed MTU (32-bit unsigned integer) | in rsvp_intserv_print()
585 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
587 if (parameter_length == 4) { in rsvp_intserv_print()
588 ND_PRINT("\n\t\tComposed MTU: %u bytes", GET_BE_U_4(tptr + 4)); in rsvp_intserv_print()
593 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
595 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
596 * | Token Bucket Rate [r] (32-bit IEEE floating point number) | in rsvp_intserv_print()
597 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
598 * | Token Bucket Size [b] (32-bit IEEE floating point number) | in rsvp_intserv_print()
599 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
600 * | Peak Data Rate [p] (32-bit IEEE floating point number) | in rsvp_intserv_print()
601 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
602 * | Minimum Policed Unit [m] (32-bit integer) | in rsvp_intserv_print()
603 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
604 * | Maximum Packet Size [M] (32-bit integer) | in rsvp_intserv_print()
605 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
609 ND_TCHECK_LEN(tptr + 4, 20); in rsvp_intserv_print()
610 bw.i = GET_BE_U_4(tptr + 4); in rsvp_intserv_print()
625 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
627 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
628 * | Rate [R] (32-bit IEEE floating point number) | in rsvp_intserv_print()
629 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
630 * | Slack Term [S] (32-bit integer) | in rsvp_intserv_print()
631 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ in rsvp_intserv_print()
635 ND_TCHECK_8(tptr + 4); in rsvp_intserv_print()
636 bw.i = GET_BE_U_4(tptr + 4); in rsvp_intserv_print()
646 if (parameter_length == 4) { in rsvp_intserv_print()
647 ND_PRINT("\n\t\tValue: %u", GET_BE_U_4(tptr + 4)); in rsvp_intserv_print()
652 if (ndo->ndo_vflag <= 1) in rsvp_intserv_print()
653 print_unknown_data(ndo, tptr + 4, "\n\t\t", parameter_length); in rsvp_intserv_print()
655 return (parameter_length+4); /* header length 4 bytes */ in rsvp_intserv_print()
670 rsvp_com_header->checksum[0] = 0; in rsvp_clear_checksum()
671 rsvp_com_header->checksum[1] = 0; in rsvp_clear_checksum()
704 rsvp_obj_len=GET_BE_U_2(rsvp_obj_header->length); in rsvp_obj_print()
705 rsvp_obj_ctype=GET_U_1(rsvp_obj_header->ctype); in rsvp_obj_print()
707 if(rsvp_obj_len % 4) { in rsvp_obj_print()
708 ND_PRINT("%sERROR: object header size %u not a multiple of 4", indent, rsvp_obj_len); in rsvp_obj_print()
709 return -1; in rsvp_obj_print()
714 return -1; in rsvp_obj_print()
717 rsvp_obj_class_num = GET_U_1(rsvp_obj_header->class_num); in rsvp_obj_print()
729 ND_PRINT(" if unknown], Class-Type: %s (%u), length: %u", in rsvp_obj_print()
738 return -1; in rsvp_obj_print()
742 obj_tlen=rsvp_obj_len-sizeof(struct rsvp_object_header); in rsvp_obj_print()
748 switch(rsvp_obj_class_num) { in rsvp_obj_print()
750 switch(rsvp_obj_ctype) { in rsvp_obj_print()
762 obj_tlen-=8; in rsvp_obj_print()
776 obj_tlen-=20; in rsvp_obj_print()
788 obj_tlen-=36; in rsvp_obj_print()
800 obj_tlen-=26; in rsvp_obj_print()
811 obj_tlen-=12; in rsvp_obj_print()
823 obj_tlen-=12; in rsvp_obj_print()
832 switch(rsvp_obj_ctype) { in rsvp_obj_print()
839 obj_tlen-=sizeof(nd_ipv4); in rsvp_obj_print()
848 obj_tlen-=sizeof(nd_ipv6); in rsvp_obj_print()
857 switch(rsvp_obj_ctype) { in rsvp_obj_print()
864 obj_tlen-=sizeof(nd_ipv4); in rsvp_obj_print()
873 obj_tlen-=sizeof(nd_ipv6); in rsvp_obj_print()
885 switch(rsvp_obj_ctype) { in rsvp_obj_print()
887 while(obj_tlen >= 4 ) { in rsvp_obj_print()
889 obj_tlen-=4; in rsvp_obj_print()
890 obj_tptr+=4; in rsvp_obj_print()
894 if (obj_tlen < 4) in rsvp_obj_print()
899 obj_tlen-=4; in rsvp_obj_print()
900 obj_tptr+=4; in rsvp_obj_print()
909 GET_BE_U_4(obj_tptr + 4), in rsvp_obj_print()
911 obj_tlen-=12; in rsvp_obj_print()
920 switch(rsvp_obj_ctype) { in rsvp_obj_print()
922 if (obj_tlen < 4) in rsvp_obj_print()
930 obj_tlen-=4; in rsvp_obj_print()
931 obj_tptr+=4; in rsvp_obj_print()
939 switch(rsvp_obj_ctype) { in rsvp_obj_print()
947 obj_tlen-=8; in rsvp_obj_print()
957 obj_tlen-=20; in rsvp_obj_print()
964 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x", in rsvp_obj_print()
971 obj_tlen-=40; in rsvp_obj_print()
977 ND_PRINT("%s IPv4 Tunnel Sender Address: %s, LSP-ID: 0x%04x", in rsvp_obj_print()
981 obj_tlen-=8; in rsvp_obj_print()
988 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x", in rsvp_obj_print()
995 obj_tlen-=16; in rsvp_obj_print()
1004 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1006 while(obj_tlen >= 4 ) { in rsvp_obj_print()
1012 obj_tlen-=4; in rsvp_obj_print()
1013 obj_tptr+=4; in rsvp_obj_print()
1025 ((GET_U_1(obj_tptr + 4)) & 0x80) ? "no" : "" ); in rsvp_obj_print()
1028 (GET_BE_U_2(obj_tptr + 4))&0xfff, in rsvp_obj_print()
1034 obj_tlen-=12; in rsvp_obj_print()
1047 (GET_BE_U_4(obj_tptr + 4))&0x7fffff, in rsvp_obj_print()
1049 (((GET_BE_U_2(obj_tptr + 4)>>7)&3) == 0 ) ? "10" : "", in rsvp_obj_print()
1050 (((GET_BE_U_2(obj_tptr + 4) >> 7) & 3) == 2 ) ? "23" : ""); in rsvp_obj_print()
1051 obj_tlen-=12; in rsvp_obj_print()
1055 if (obj_tlen < 4) in rsvp_obj_print()
1073 obj_tlen-=4; in rsvp_obj_print()
1074 obj_tptr+=4; in rsvp_obj_print()
1083 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1085 while(obj_tlen >= 4 ) { in rsvp_obj_print()
1106 switch(RSVP_OBJ_XRO_MASK_SUBOBJ(GET_U_1(obj_tptr))) { in rsvp_obj_print()
1135 ND_PRINT(", Flags: [%s] (%#x), Class-Type: %s (%u), %u", in rsvp_obj_print()
1144 GET_BE_U_4(obj_tptr + 4)); in rsvp_obj_print()
1146 obj_tlen-=length; in rsvp_obj_print()
1156 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1164 GET_BE_U_4(obj_tptr + 4)); in rsvp_obj_print()
1165 obj_tlen-=8; in rsvp_obj_print()
1174 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1181 GET_BE_U_4(obj_tptr + 4)); in rsvp_obj_print()
1182 obj_tlen-=8; in rsvp_obj_print()
1191 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1193 if (obj_tlen < 4) in rsvp_obj_print()
1204 obj_tlen-=4; in rsvp_obj_print()
1205 obj_tptr+=4; in rsvp_obj_print()
1213 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1215 if (obj_tlen < 4) in rsvp_obj_print()
1218 if (obj_tlen < 4+namelen) in rsvp_obj_print()
1222 fn_print_char(ndo, GET_U_1(obj_tptr + 4 + i)); in rsvp_obj_print()
1231 obj_tlen-=4+namelen; in rsvp_obj_print()
1232 obj_tptr+=4+namelen; in rsvp_obj_print()
1240 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1245 if (obj_tlen < 4) in rsvp_obj_print()
1251 /* If RFC 3476 Section 3.1 defined that a sub-object of the in rsvp_obj_print()
1253 * a multiple of 4, instead of the check below it would be in rsvp_obj_print()
1260 if (total_subobj_len < 4) in rsvp_obj_print()
1274 * explicitly say that the same Length field includes the 4-octet in rsvp_obj_print()
1275 * sub-object header, but as long as this while loop implements it in rsvp_obj_print()
1279 * XXX - RFC 3476 Section 3.1 says "The contents of these in rsvp_obj_print()
1280 * sub-objects are described in [8]", where [8] is in rsvp_obj_print()
1289 …https://web.archive.org/web/20160401194747/http://www.oiforum.com/public/documents/OIF-UNI-01.0.pdf in rsvp_obj_print()
1292 * "GENERALIZED_UNI Object (Class-Num=11bbbbbb (TBA))", in rsvp_obj_print()
1296 * of the sub-object header as well as the length of the in rsvp_obj_print()
1299 if(subobj_len < 4 || subobj_len > total_subobj_len || in rsvp_obj_print()
1303 switch(subobj_type) { in rsvp_obj_print()
1307 switch(af) { in rsvp_obj_print()
1312 indent, GET_IPADDR_STRING(obj_tptr + 4)); in rsvp_obj_print()
1318 indent, GET_IP6ADDR_STRING(obj_tptr + 4)); in rsvp_obj_print()
1330 if (subobj_len > 4) { in rsvp_obj_print()
1341 ND_PRINT("%s U-bit: %x, Label type: %u, Logical port id: %u, Label: %u", in rsvp_obj_print()
1343 ((GET_BE_U_4(obj_tptr + 4))>>31), in rsvp_obj_print()
1344 ((GET_BE_U_4(obj_tptr + 4))&0xFF), in rsvp_obj_print()
1355 indent, (GET_BE_U_4(obj_tptr + 4)) >> 24); in rsvp_obj_print()
1362 total_subobj_len-=subobj_len; in rsvp_obj_print()
1374 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1375 case RSVP_CTYPE_3: /* fall through - FIXME add TLV parser */ in rsvp_obj_print()
1382 GET_BE_U_4(obj_tptr + 4)); in rsvp_obj_print()
1383 obj_tlen-=8; in rsvp_obj_print()
1388 case RSVP_CTYPE_4: /* fall through - FIXME add TLV parser */ in rsvp_obj_print()
1396 obj_tlen-=20; in rsvp_obj_print()
1406 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1408 if (obj_tlen < 4) in rsvp_obj_print()
1413 obj_tlen-=4; in rsvp_obj_print()
1414 obj_tptr+=4; in rsvp_obj_print()
1425 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1427 if (obj_tlen < 4) in rsvp_obj_print()
1429 ND_PRINT("%s Msg-Version: %u, length: %u", in rsvp_obj_print()
1431 (GET_U_1(obj_tptr) & 0xf0) >> 4, in rsvp_obj_print()
1433 obj_tptr+=4; /* get to the start of the service header */ in rsvp_obj_print()
1434 obj_tlen-=4; in rsvp_obj_print()
1436 while (obj_tlen >= 4) { in rsvp_obj_print()
1445 obj_tptr+=4; /* get to the start of the parameter list */ in rsvp_obj_print()
1446 obj_tlen-=4; in rsvp_obj_print()
1448 while (intserv_serv_tlen>=4) { in rsvp_obj_print()
1452 obj_tlen-=processed; in rsvp_obj_print()
1453 intserv_serv_tlen-=processed; in rsvp_obj_print()
1464 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1472 obj_tlen-=8; in rsvp_obj_print()
1482 obj_tlen-=20; in rsvp_obj_print()
1492 obj_tlen-=20; in rsvp_obj_print()
1498 ND_PRINT("%s Source Address: %s, LSP-ID: 0x%04x", in rsvp_obj_print()
1502 obj_tlen-=20; in rsvp_obj_print()
1509 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x", in rsvp_obj_print()
1516 obj_tlen-=40; in rsvp_obj_print()
1522 ND_PRINT("%s Source Address: %s, LSP-ID: 0x%04x", in rsvp_obj_print()
1526 obj_tlen-=8; in rsvp_obj_print()
1533 "%s Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x", in rsvp_obj_print()
1540 obj_tlen-=16; in rsvp_obj_print()
1549 /* the differences between c-type 1 and 7 are minor */ in rsvp_obj_print()
1552 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1556 bw.i = GET_BE_U_4(obj_ptr.rsvp_obj_frr->bandwidth); in rsvp_obj_print()
1557 … ND_PRINT("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps", in rsvp_obj_print()
1559 obj_ptr.rsvp_obj_frr->setup_prio, in rsvp_obj_print()
1560 obj_ptr.rsvp_obj_frr->hold_prio, in rsvp_obj_print()
1561 obj_ptr.rsvp_obj_frr->hop_limit, in rsvp_obj_print()
1563 ND_PRINT("%s Include-any: 0x%08x, Exclude-any: 0x%08x, Include-all: 0x%08x", in rsvp_obj_print()
1565 GET_BE_U_4(obj_ptr.rsvp_obj_frr->include_any), in rsvp_obj_print()
1566 GET_BE_U_4(obj_ptr.rsvp_obj_frr->exclude_any), in rsvp_obj_print()
1567 GET_BE_U_4(obj_ptr.rsvp_obj_frr->include_all)); in rsvp_obj_print()
1568 obj_tlen-=sizeof(struct rsvp_obj_frr_t); in rsvp_obj_print()
1575 bw.i = GET_BE_U_4(obj_ptr.rsvp_obj_frr->bandwidth); in rsvp_obj_print()
1576 … ND_PRINT("%s Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps", in rsvp_obj_print()
1578 obj_ptr.rsvp_obj_frr->setup_prio, in rsvp_obj_print()
1579 obj_ptr.rsvp_obj_frr->hold_prio, in rsvp_obj_print()
1580 obj_ptr.rsvp_obj_frr->hop_limit, in rsvp_obj_print()
1584 GET_BE_U_4(obj_ptr.rsvp_obj_frr->include_any), in rsvp_obj_print()
1585 GET_BE_U_4(obj_ptr.rsvp_obj_frr->exclude_any)); in rsvp_obj_print()
1586 obj_tlen-=16; in rsvp_obj_print()
1596 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1599 ND_PRINT("%s PLR-ID: %s, Avoid-Node-ID: %s", in rsvp_obj_print()
1602 GET_IPADDR_STRING(obj_tptr + 4)); in rsvp_obj_print()
1603 obj_tlen-=8; in rsvp_obj_print()
1614 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1616 if (obj_tlen < 4) in rsvp_obj_print()
1621 obj_tlen-=4; in rsvp_obj_print()
1622 obj_tptr+=4; in rsvp_obj_print()
1630 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1631 case RSVP_CTYPE_3: /* fall through - FIXME add TLV parser */ in rsvp_obj_print()
1640 GET_U_1(obj_tptr + 4), in rsvp_obj_print()
1644 switch (error_code) { in rsvp_obj_print()
1660 obj_tlen-=8; in rsvp_obj_print()
1663 case RSVP_CTYPE_4: /* fall through - FIXME add TLV parser */ in rsvp_obj_print()
1677 switch (error_code) { in rsvp_obj_print()
1686 obj_tlen-=20; in rsvp_obj_print()
1695 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1697 if (obj_tlen < 4) in rsvp_obj_print()
1704 obj_tlen-=4; in rsvp_obj_print()
1705 obj_tptr+=4; in rsvp_obj_print()
1717 return -1; in rsvp_obj_print()
1720 GET_U_1(obj_tptr + 1) - 2); in rsvp_obj_print()
1721 obj_tlen-=GET_U_1(obj_tptr + 1); in rsvp_obj_print()
1733 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1736 if (obj_tlen < 4) in rsvp_obj_print()
1742 obj_tlen-=4; in rsvp_obj_print()
1743 obj_tptr+=4; in rsvp_obj_print()
1745 while(obj_tlen >= 4) { in rsvp_obj_print()
1746 ND_PRINT("%s Message-ID 0x%08x (%u)", in rsvp_obj_print()
1750 obj_tlen-=4; in rsvp_obj_print()
1751 obj_tptr+=4; in rsvp_obj_print()
1760 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1765 ND_PRINT("%s Key-ID 0x%04x%08x, Sequence 0x%08x%08x, Flags [%s]", in rsvp_obj_print()
1767 GET_BE_U_2(obj_ptr.rsvp_obj_integrity->key_id), in rsvp_obj_print()
1768 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->key_id + 2), in rsvp_obj_print()
1769 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->sequence), in rsvp_obj_print()
1770 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->sequence + 4), in rsvp_obj_print()
1773 obj_ptr.rsvp_obj_integrity->flags)); in rsvp_obj_print()
1774 ND_PRINT("%s MD5-sum 0x%08x%08x%08x%08x ", in rsvp_obj_print()
1776 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->digest), in rsvp_obj_print()
1777 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->digest + 4), in rsvp_obj_print()
1778 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->digest + 8), in rsvp_obj_print()
1779 GET_BE_U_4(obj_ptr.rsvp_obj_integrity->digest + 12)); in rsvp_obj_print()
1782 obj_ptr.rsvp_obj_integrity->digest, in rsvp_obj_print()
1796 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1798 if (obj_tlen < 4) in rsvp_obj_print()
1803 obj_tlen-=4; in rsvp_obj_print()
1804 obj_tptr+=4; in rsvp_obj_print()
1812 switch(rsvp_obj_ctype) { in rsvp_obj_print()
1814 if (obj_tlen < 4) in rsvp_obj_print()
1822 switch (action) { in rsvp_obj_print()
1830 GET_BE_U_4(obj_tptr + 4), in rsvp_obj_print()
1832 obj_tlen-=12; in rsvp_obj_print()
1837 obj_tlen-=4; in rsvp_obj_print()
1838 obj_tptr+=4; in rsvp_obj_print()
1840 while(obj_tlen >= 4 ) { in rsvp_obj_print()
1843 obj_tptr+=4; in rsvp_obj_print()
1844 obj_tlen-=4; in rsvp_obj_print()
1856 switch (rsvp_obj_ctype) { in rsvp_obj_print()
1858 if (obj_tlen < 4) in rsvp_obj_print()
1860 ND_PRINT("%s Sub-LSP destination address: %s", in rsvp_obj_print()
1863 obj_tlen-=4; in rsvp_obj_print()
1864 obj_tptr+=4; in rsvp_obj_print()
1869 ND_PRINT("%s Sub-LSP destination address: %s", in rsvp_obj_print()
1872 obj_tlen-=16; in rsvp_obj_print()
1882 * you are welcome to contribute code ;-) in rsvp_obj_print()
1890 if (ndo->ndo_vflag <= 1) in rsvp_obj_print()
1895 if (ndo->ndo_vflag > 1 || hexdump == TRUE) in rsvp_obj_print()
1897 rsvp_obj_len - sizeof(struct rsvp_object_header)); in rsvp_obj_print()
1900 tlen-=rsvp_obj_len; in rsvp_obj_print()
1904 ND_PRINT("%sERROR: sub-object is too short", indent); in rsvp_obj_print()
1905 return -1; in rsvp_obj_print()
1908 return -1; in rsvp_obj_print()
1911 return -1; in rsvp_obj_print()
1914 return -1; in rsvp_obj_print()
1926 ndo->ndo_protocol = "rsvp"; in rsvp_print()
1931 version_flags = GET_U_1(rsvp_com_header->version_flags); in rsvp_print()
1942 msg_type = GET_U_1(rsvp_com_header->msg_type); in rsvp_print()
1944 /* in non-verbose mode just lets print the basic Message Type*/ in rsvp_print()
1945 if (ndo->ndo_vflag < 1) { in rsvp_print()
1953 /* ok they seem to want to know everything - lets fully decode it */ in rsvp_print()
1955 plen = tlen = GET_BE_U_2(rsvp_com_header->length); in rsvp_print()
1963 GET_U_1(rsvp_com_header->ttl), in rsvp_print()
1964 GET_BE_U_2(rsvp_com_header->checksum)); in rsvp_print()
1973 tlen-=sizeof(struct rsvp_common_header); in rsvp_print()
1975 switch(msg_type) { in rsvp_print()
1991 version_flags = GET_U_1(rsvp_com_header->version_flags); in rsvp_print()
2002 subplen = subtlen = GET_BE_U_2(rsvp_com_header->length); in rsvp_print()
2004 msg_type = GET_U_1(rsvp_com_header->msg_type); in rsvp_print()
2011 GET_U_1(rsvp_com_header->ttl), in rsvp_print()
2012 GET_BE_U_2(rsvp_com_header->checksum)); in rsvp_print()
2027 subtlen-=sizeof(struct rsvp_common_header); in rsvp_print()
2032 … if (rsvp_obj_print(ndo, subpptr, subplen, subtptr, "\n\t ", subtlen, rsvp_com_header) == -1) in rsvp_print()
2036 tlen-=subtlen+sizeof(struct rsvp_common_header); in rsvp_print()
2055 if (rsvp_obj_print(ndo, pptr, plen, tptr, "\n\t ", tlen, rsvp_com_header) == -1) in rsvp_print()