Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-lmp.c:1421

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

dissect_lmp

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-lmp.c)expand/collapse
Show more  
 1304  dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 1305  {
 1306      int offset = 0;
 1307      proto_tree *lmp_tree = NULL, *ti, *ti2;
 1308      proto_tree *lmp_header_tree;
 1309      proto_tree *lmp_header_flags_tree;
 1310      proto_tree *lmp_object_tree;
 1311      proto_tree *lmp_object_header_tree;
 1312      proto_tree *lmp_flags_tree;
 1313      proto_tree *lmp_subobj_tree;
 1314      proto_item *hidden_item;
 1315   
 1316      guint8 version;
 1317      guint8 flags;
 1318      guint8 message_type;
 1319      guint16 cksum, computed_cksum;
 1320      vec_t cksum_vec[1];
 1321      int j, k, l, len;
 1322      int msg_length;
 1323      int obj_length;
 1324      int mylen;
 1325      int offset2;
 1326      int proto;
 1327   
 1328      proto = pinfo->ipproto;
 1329   
 1330      /* Only process UDP packets */
 1331      if (proto != IP_PROTO_UDP) {
 1332              return 0;
 1333      }
 1334   
 1335      if (check_col(pinfo->cinfo, COL_PROTOCOL))
 1336          col_set_str(pinfo->cinfo, COL_PROTOCOL, "LMP");
 1337      if (check_col(pinfo->cinfo, COL_INFO))
 1338          col_clear(pinfo->cinfo, COL_INFO);
 1339   
 1340      version = (tvb_get_guint8(tvb, offset+0)) >> 4;
 1341      flags = tvb_get_guint8(tvb, offset+2);
 1342      message_type = tvb_get_guint8(tvb, offset+3);
 1343      if (check_col(pinfo->cinfo, COL_INFO)) {
 1344          col_add_str(pinfo->cinfo, COL_INFO,
 1345              val_to_str(message_type, message_type_vals, "Unknown (%u). "));
 1346      }
 1347   
 1348      if (tree) {
 1349          msg_length = tvb_get_ntohs(tvb, offset+4);
 1350          ti = proto_tree_add_item(tree, proto_lmp, tvb, offset, msg_length,
 1351              FALSE);
 1352          lmp_tree = proto_item_add_subtree(ti, lmp_subtree[LMP_TREE_MAIN]);
 1353          ti = proto_tree_add_text(lmp_tree, tvb, offset, 12, "LMP Header. %s",
 1354                                   val_to_str(message_type, message_type_vals,
 1355                                              "Unknown Message (%u). "));
 1356          lmp_header_tree = proto_item_add_subtree(ti, lmp_subtree[LMP_TREE_HEADER]);
 1357          proto_tree_add_text(lmp_header_tree, tvb, offset, 1, "LMP Version: %u",
 1358                              version);
 1359          ti = proto_tree_add_text(lmp_header_tree, tvb, offset+2, 1, "Flags: %02x",
 1360                                   flags);
 1361          lmp_header_flags_tree = proto_item_add_subtree(ti, lmp_subtree[LMP_TREE_HEADER_FLAGS]);
 1362          proto_tree_add_boolean(lmp_header_flags_tree, lmp_filter[LMPF_HDR_FLAGS_CC_DOWN],
 1363                                 tvb, offset+2, 1, flags);
 1364          proto_tree_add_boolean(lmp_header_flags_tree, lmp_filter[LMPF_HDR_FLAGS_REBOOT],
 1365                                 tvb, offset+2, 1, flags);
 1366          proto_tree_add_uint(lmp_header_tree, lmp_filter[LMPF_MSG], tvb,
 1367                              offset+3, 1, message_type);
 1368          proto_tree_add_text(lmp_header_tree, tvb, offset+4, 2, "Length: %d bytes",
 1369                              msg_length);
 1370  /*      if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) {*/
 1371      /* this "if" is still a hack, but compared to the former one at least correct */
 1372      if ((message_type >= LMP_MSG_CONFIG && message_type <= LMP_MSG_CHANNEL_STATUS_RESP) ||
 1373          (message_type >= LMP_MSG_SERVICE_CONFIG && message_type <= LMP_MSG_SERVICE_CONFIG_NACK) ||
 1374          (message_type >= LMP_MSG_DISCOVERY_RESP && message_type <= LMP_MSG_DISCOVERY_RESP_NACK) ) {
 1375              hidden_item = proto_tree_add_boolean(lmp_header_tree,
 1376                                            lmp_filter[lmp_msg_to_filter_num(message_type)],
 1377                                            tvb, offset+3, 1, 1);
 1378              PROTO_ITEM_SET_HIDDEN(hidden_item);
 1379          } else {
 1380              proto_tree_add_protocol_format(lmp_header_tree, proto_malformed, tvb, offset+3, 1,
 1381                                             "Invalid message type: %u", message_type);
 1382                  return tvb_length(tvb);
 1383          }
 1384   
 1385          cksum = tvb_get_ntohs(tvb, offset+6);
 1386          if (!pinfo->fragmented && (int) tvb_length(tvb) >= msg_length) {
 1387              /* The packet isn't part of a fragmented datagram and isn't
 1388                 truncated, so we can checksum it. */
 1389              cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, msg_length);
 1390              cksum_vec[0].len = msg_length;
 1391              computed_cksum = in_cksum(&cksum_vec[0], 1);
 1392   
 1393              if (computed_cksum == 0) {
 1394                  proto_tree_add_text(lmp_header_tree, tvb, offset+6, 2,
 1395                                      "Message Checksum: 0x%04x [correct]",
 1396                                      cksum);
 1397              } else {
 1398                  proto_tree_add_text(lmp_header_tree, tvb, offset+6, 2,
 1399                                      "Message Checksum: 0x%04x [incorrect, should be 0x%04x]",
 1400                                      cksum,
 1401                                      in_cksum_shouldbe(cksum, computed_cksum));
 1402              }
 1403          } else {
 1404              proto_tree_add_text(lmp_header_tree, tvb, offset+6, 2,
 1405                                  "Message Checksum: 0x%04x",
 1406                                  cksum);
 1407          }
 1408   
 1409          offset += 8;
 1410          len = 8;
 1411          while (len < msg_length) {
 1412            guint8 class;
 1413            guint8 type;
 1414            guint8 negotiable;
 1415            const char *object_type;
 1416   
 1417            obj_length = tvb_get_ntohs(tvb, offset+2);
 1418            class = tvb_get_guint8(tvb, offset+1);
 1419            type = tvb_get_guint8(tvb, offset);
 1420            negotiable = (type >> 7); type &= 0x7f;
 1421            object_type = val_to_str(class, lmp_class_vals, "Unknown");
 1422            hidden_item = proto_tree_add_uint(lmp_tree, lmp_filter[LMPF_OBJECT], tvb,
 1423                                       offset, 1, class);
 1424            PROTO_ITEM_SET_HIDDEN(hidden_item);
 1425            if (lmp_valid_class(class)) {
 1426   
 1427                ti = proto_tree_add_item(lmp_tree,  
 1428                                         lmp_filter[lmp_class_to_filter_num(class)],
 1429                                         tvb, offset, obj_length, FALSE);
 1430            } else {
 1431                proto_tree_add_protocol_format(lmp_tree, proto_malformed, tvb,  
 1432                                               offset+1, 1,
 1433                                               "Invalid class: %u", class);
 1434                return tvb_length(tvb);
 1435            }
 1436            lmp_object_tree = proto_item_add_subtree(ti, lmp_class_to_subtree(class));
 1437   
 1438            ti2 = proto_tree_add_text(lmp_object_tree, tvb, offset, 4,
 1439                                      "Header. Class %d, C-Type %d, Length %d, %s",
 1440                                      class, type, obj_length,
 1441                                      negotiable ? "Negotiable" : "Not Negotiable");
 1442   
 1443            lmp_object_header_tree =  
 1444                proto_item_add_subtree(ti2, lmp_subtree[LMP_TREE_OBJECT_HEADER]);
 1445   
 1446            proto_tree_add_text(lmp_object_header_tree, tvb, offset, 1,
 1447                                negotiable ? "Negotiable" : "Not Negotiable");
 1448            proto_tree_add_text(lmp_object_header_tree, tvb, offset+2, 2,
 1449                                "Length: %u", obj_length);
 1450            proto_tree_add_text(lmp_object_header_tree, tvb, offset+1, 1,
 1451                                "Object Class: %u - %s",
 1452                                class, object_type);
 1453            proto_tree_add_item(lmp_object_header_tree, lmp_filter[LMPF_VAL_CTYPE],
 1454                                tvb, offset, 1, type);
 1455            offset2 = offset+4;
 1456            mylen = obj_length - 4;
 1457             
 1458            switch (class) {
 1459   
 1460            case LMP_CLASS_NULL:
 1461                break;
 1462   
 1463            case LMP_CLASS_CCID:
 1464                switch(type) {
 1465                     
 1466                case 1:
 1467                    l = LMPF_VAL_LOCAL_CCID;
 1468                    proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
 1469                    proto_tree_add_uint(lmp_object_tree, lmp_filter[l], tvb,  
 1470                                        offset2, 4, tvb_get_ntohl(tvb, offset2));
 1471                    break;
 1472                     
 1473                case 2:
 1474                    l = LMPF_VAL_REMOTE_CCID;
 1475                    proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
 1476                    proto_tree_add_uint(lmp_object_tree, lmp_filter[l], tvb,  
 1477                                        offset2, 4, tvb_get_ntohl(tvb, offset2));
 1478                default:
 1479                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1480                                        "Data (%d bytes)", mylen);
 1481                    break;
 1482                }
 1483                break;
 1484                 
 1485            case LMP_CLASS_NODE_ID:
 1486                switch(type) {
 1487                     
 1488                case 1:
 1489                    l = LMPF_VAL_LOCAL_NODE_ID;
 1490                    proto_item_append_text(ti, ": %s",
 1491                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 1492                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1493                                        offset2, 4, FALSE);
 1494                    break;
 1495                     
 1496                case 2:
 1497                    l = LMPF_VAL_REMOTE_NODE_ID;
 1498                    proto_item_append_text(ti, ": %s",
 1499                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 1500                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1501                                        offset2, 4, FALSE);
 1502                    break;
 1503                     
 1504                default:
 1505                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1506                                        "Data (%d bytes)", mylen);
 1507                    break;
 1508                }
 1509                break;
 1510                 
 1511            case LMP_CLASS_LINK_ID:
 1512                 
 1513                switch(type) {
 1514                     
 1515                case 1:
 1516                case 2:
 1517                    l = (type == 1)? LMPF_VAL_LOCAL_LINK_ID_IPV4:
 1518                        LMPF_VAL_REMOTE_LINK_ID_IPV4;
 1519                    proto_item_append_text(ti, ": IPv4 %s",
 1520                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 1521                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1522                                        offset2, 4, FALSE);
 1523                    break;
 1524                     
 1525                case 3:
 1526                case 4:
 1527                    l = (type == 3)? LMPF_VAL_LOCAL_LINK_ID_IPV6:
 1528                        LMPF_VAL_REMOTE_LINK_ID_IPV6;
 1529                    proto_item_append_text(ti, ": IPv6 %s",
 1530                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1531                    proto_tree_add_text(lmp_object_tree, tvb, offset2, 16, "IPv6: %s",
 1532                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1533                    break;
 1534                case 5:
 1535                case 6:
 1536                    l = (type == 5)? LMPF_VAL_LOCAL_LINK_ID_UNNUM:
 1537                        LMPF_VAL_REMOTE_LINK_ID_UNNUM;
 1538                    proto_item_append_text(ti, ": Unnumbered %d",  
 1539                                           tvb_get_ntohl(tvb, offset2));
 1540                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1541                                        offset2, 4, FALSE);
 1542                    break;
 1543   
 1544                default:
 1545                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1546                                        "Data (%d bytes)", mylen);
 1547                    break;
 1548                }
 1549                break;
 1550   
 1551            case LMP_CLASS_INTERFACE_ID:
 1552                 
 1553                switch(type) {
 1554                     
 1555                case 1:
 1556                case 2:
 1557                    l = (type == 1)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV4:
 1558                        LMPF_VAL_REMOTE_INTERFACE_ID_IPV4;
 1559                    proto_item_append_text(ti, ": IPv4 %s",
 1560                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 1561                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1562                                        offset2, 4, FALSE);
 1563                    break;
 1564     
 1565                case 3:
 1566                case 4:
 1567                    l = (type == 3)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV6:
 1568                        LMPF_VAL_REMOTE_INTERFACE_ID_IPV6;
 1569                    proto_item_append_text(ti, ": IPv6 %s",
 1570                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1571                    proto_tree_add_text(lmp_object_tree, tvb, offset2, 16, "IPv6: %s",
 1572                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1573                    break;
 1574   
 1575                case 5:
 1576                case 6:
 1577                    l = (type == 5)? LMPF_VAL_LOCAL_INTERFACE_ID_UNNUM:
 1578                        LMPF_VAL_REMOTE_INTERFACE_ID_UNNUM;
 1579                    proto_item_append_text(ti, ": Unnumbered %d",  
 1580                                           tvb_get_ntohl(tvb, offset2));
 1581                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 1582                                        offset2, 4, FALSE);
 1583                    break;
 1584   
 1585                default:
 1586                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1587                                        "Data (%d bytes)", mylen);
 1588                    break;
 1589                }
 1590                break;
 1591   
 1592            case LMP_CLASS_MESSAGE_ID:
 1593                 
 1594                switch(type) {
 1595                     
 1596                case 1:
 1597                     
 1598                    l = LMPF_VAL_MESSAGE_ID;
 1599                    proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
 1600                    proto_tree_add_uint(lmp_object_tree, lmp_filter[l], tvb,  
 1601                                        offset2, 4, tvb_get_ntohl(tvb, offset2));
 1602                    break;
 1603                     
 1604                case 2:
 1605                    l = LMPF_VAL_MESSAGE_ID_ACK;
 1606                    proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
 1607                    proto_tree_add_uint(lmp_object_tree, lmp_filter[l], tvb,  
 1608                                        offset2, 4, tvb_get_ntohl(tvb, offset2));
 1609                    break;
 1610                     
 1611                default:
 1612                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1613                                          "Data (%d bytes)", mylen);
 1614                    break;
 1615                }
 1616                break;
 1617   
 1618            case LMP_CLASS_CONFIG:
 1619   
 1620                switch(type) {
 1621                     
 1622                case 1:
 1623                    proto_item_append_text(ti, ": HelloInterval: %d, HelloDeadInterval: %d",
 1624                                           tvb_get_ntohs(tvb, offset2),  
 1625                                           tvb_get_ntohs(tvb, offset2+2));
 1626                    proto_tree_add_uint(lmp_object_tree,  
 1627                                        lmp_filter[LMPF_VAL_CONFIG_HELLO],
 1628                                        tvb, offset2, 2, tvb_get_ntohs(tvb, offset2));
 1629                    proto_tree_add_uint(lmp_object_tree,  
 1630                                        lmp_filter[LMPF_VAL_CONFIG_HELLO_DEAD],
 1631                                        tvb, offset2+2, 2,  
 1632                                        tvb_get_ntohs(tvb, offset2+2));
 1633                    break;
 1634                     
 1635                default:
 1636                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1637                                        "Data (%d bytes)", mylen);
 1638                    break;
 1639                }
 1640                break;
 1641                 
 1642            case LMP_CLASS_HELLO:
 1643   
 1644                switch(type) {
 1645                     
 1646                case 1:
 1647                    proto_item_append_text(ti, ": TxSeq %d, RxSeq: %d",
 1648                                           tvb_get_ntohl(tvb, offset2),
 1649                                           tvb_get_ntohl(tvb, offset2+4));
 1650                    proto_tree_add_uint(lmp_object_tree,  
 1651                                        lmp_filter[LMPF_VAL_HELLO_TXSEQ],
 1652                                        tvb, offset2, 4,  
 1653                                        tvb_get_ntohl(tvb, offset2));
 1654                    proto_tree_add_uint(lmp_object_tree,  
 1655                                        lmp_filter[LMPF_VAL_HELLO_RXSEQ],
 1656                                        tvb, offset2+4, 4,  
 1657                                        tvb_get_ntohl(tvb, offset2+4));
 1658                    break;
 1659   
 1660                default:
 1661                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1662                                        "Data (%d bytes)", mylen);
 1663                    break;
 1664                }
 1665                break;
 1666                 
 1667            case LMP_CLASS_BEGIN_VERIFY:
 1668   
 1669                switch(type) {
 1670   
 1671                case 1:
 1672                    l = tvb_get_ntohs(tvb, offset2);
 1673                    ti2 = proto_tree_add_item(lmp_object_tree,  
 1674                                              lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS],
 1675                                              tvb, offset2, 2, FALSE);
 1676                     
 1677                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 1678                                                            lmp_subtree[LMP_TREE_BEGIN_VERIFY_FLAGS]);
 1679                    proto_tree_add_boolean(lmp_flags_tree,  
 1680                                           lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_ALL_LINKS],
 1681                                           tvb, offset2, 2, l);
 1682                    proto_tree_add_boolean(lmp_flags_tree,  
 1683                                           lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_LINK_TYPE],
 1684                                           tvb, offset2, 2, l);
 1685                    proto_tree_add_text(lmp_object_tree, tvb, offset2+2, 2,
 1686                                        "Verify Interval: %d ms",  
 1687                                        tvb_get_ntohs(tvb, offset2+2));
 1688                    proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 4,
 1689                                        "Number of Data Links: %d",  
 1690                                        tvb_get_ntohl(tvb, offset2+4));
 1691                    proto_tree_add_item(lmp_object_tree,  
 1692                                        lmp_filter[LMPF_VAL_BEGIN_VERIFY_ENCTYPE],
 1693                                        tvb, offset2+8, 1, FALSE);
 1694                    proto_tree_add_text(lmp_object_tree, tvb, offset2+10, 2,
 1695                                        "Verify Transport Mechanism: 0x%0x",  
 1696                                        tvb_get_ntohs(tvb, offset2+10));
 1697                    proto_tree_add_text(lmp_object_tree, tvb, offset2+12, 4,
 1698                                        "Transmission Rate: %.3f Mbps",  
 1699                                        tvb_get_ntohieee_float(tvb, offset2+12)*8/1000000);
 1700                    proto_tree_add_text(lmp_object_tree, tvb, offset2+16, 4,
 1701                                        "Wavelength: %d",  
 1702                                        tvb_get_ntohl(tvb, offset2+16));
 1703                    break;
 1704   
 1705                default:
 1706                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1707                                        "Data (%d bytes)", mylen);
 1708                    break;
 1709                }
 1710                break;
 1711   
 1712            case LMP_CLASS_BEGIN_VERIFY_ACK:
 1713   
 1714                switch(type) {
 1715   
 1716                case 1:
 1717                    proto_item_append_text(ti, ": VerifyDeadInterval: %d, TransportResponse: 0x%0x",
 1718                                           tvb_get_ntohs(tvb, offset2),  
 1719                                           tvb_get_ntohs(tvb, offset2+2));
 1720                    proto_tree_add_text(lmp_object_tree, tvb, offset2, 2,
 1721                                        "VerifyDeadInterval: %d ms",  
 1722                                        tvb_get_ntohs(tvb, offset2));
 1723                    proto_tree_add_text(lmp_object_tree, tvb, offset2+2, 2,
 1724                                        "Verify Transport Response: 0x%0x",  
 1725                                        tvb_get_ntohs(tvb, offset2+2));
 1726                    break;
 1727   
 1728                default:
 1729                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1730                                        "Data (%d bytes)", mylen);
 1731                    break;
 1732                }
 1733                break;
 1734                 
 1735            case LMP_CLASS_VERIFY_ID:
 1736   
 1737                switch(type) {
 1738   
 1739                case 1:
 1740                    proto_item_append_text(ti, ": %d",  
 1741                                           tvb_get_ntohl(tvb, offset2));
 1742                    proto_tree_add_uint(lmp_object_tree,  
 1743                                        lmp_filter[LMPF_VAL_VERIFY_ID],  
 1744                                        tvb, offset2, 4,
 1745                                        tvb_get_ntohl(tvb, offset2));
 1746                    break;
 1747                default:
 1748                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1749                                        "Data (%d bytes)", mylen);
 1750                    break;
 1751                }
 1752                break;
 1753   
 1754            case LMP_CLASS_TE_LINK:
 1755                l = tvb_get_guint8(tvb, offset2);
 1756                ti2 = proto_tree_add_uint(lmp_object_tree,  
 1757                                          lmp_filter[LMPF_VAL_TE_LINK_FLAGS],
 1758                                          tvb, offset2, 1, l);
 1759                 
 1760                proto_item_append_text(ti2, ": %s%s",
 1761                                       (l&0x01) ? "Fault-Mgmt-Supported " : "",
 1762                                       (l&0x02) ? "Link-Verification-Supported " : "");
 1763                 
 1764                lmp_flags_tree = proto_item_add_subtree(ti2,  
 1765                                                        lmp_subtree[LMP_TREE_TE_LINK_FLAGS]);
 1766                proto_tree_add_boolean(lmp_flags_tree,
 1767                                       lmp_filter[LMPF_VAL_TE_LINK_FLAGS_FAULT_MGMT],
 1768                                       tvb, offset2, 1, l);
 1769                proto_tree_add_boolean(lmp_flags_tree,
 1770                                       lmp_filter[LMPF_VAL_TE_LINK_FLAGS_LINK_VERIFY],
 1771                                       tvb, offset2, 1, l);
 1772                switch(type) {
 1773   
 1774                case 1:
 1775                    proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
 1776                                           ip_to_str(tvb_get_ptr(tvb, offset2+4, 4)),
 1777                                           ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
 1778                    proto_tree_add_item(lmp_object_tree,  
 1779                                        lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV4],
 1780                                        tvb, offset2+4, 4, FALSE);
 1781                    proto_tree_add_item(lmp_object_tree,  
 1782                                        lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV4],
 1783                                        tvb, offset2+8, 4, FALSE);
 1784                    break;
 1785                     
 1786                case 2:
 1787                    proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
 1788                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)),
 1789                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+8, 16)));
 1790                    proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 16,  
 1791                                        "TE-Link Local ID - IPv6: %s",
 1792                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1793                    proto_tree_add_text(lmp_object_tree, tvb, offset2+20,16,  
 1794                                        "TE-Link Remote ID - IPv6: %s",
 1795                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)));
 1796                    break;
 1797   
 1798                case 3:
 1799                    proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
 1800                                           tvb_get_ntohl(tvb, offset2+4),  
 1801                                           tvb_get_ntohl(tvb, offset2+8));
 1802                     
 1803                    proto_tree_add_item(lmp_object_tree,  
 1804                                        lmp_filter[LMPF_VAL_TE_LINK_LOCAL_UNNUM],
 1805                                        tvb, offset2+4, 4, FALSE);
 1806                     
 1807                    proto_tree_add_item(lmp_object_tree,  
 1808                                        lmp_filter[LMPF_VAL_TE_LINK_REMOTE_UNNUM],
 1809                                        tvb, offset2+8, 4, FALSE);
 1810                    break;
 1811                default:
 1812                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1813                                        "Data (%d bytes)", mylen);
 1814                    break;
 1815                }
 1816                break;
 1817                 
 1818            case LMP_CLASS_DATA_LINK:
 1819   
 1820                l = tvb_get_guint8(tvb, offset2);
 1821                ti2 = proto_tree_add_uint(lmp_object_tree,  
 1822                                          lmp_filter[LMPF_VAL_DATA_LINK_FLAGS],
 1823                                          tvb, offset2, 1, l);
 1824                proto_item_append_text(ti2, ": %s%s",
 1825                                       (l&0x01) ? "Interface-Type-Port " : "Interface-Type-Component-Link ",
 1826                                       (l&0x02) ? "Allocated " : "Unallocated ");
 1827   
 1828                lmp_flags_tree = proto_item_add_subtree(ti2,  
 1829                                                        lmp_subtree[LMP_TREE_DATA_LINK_FLAGS]);
 1830                proto_tree_add_boolean(lmp_flags_tree,
 1831                                       lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_PORT],
 1832                                       tvb, offset2, 1, l);
 1833                proto_tree_add_boolean(lmp_flags_tree,
 1834                                       lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_ALLOCATED],
 1835                                       tvb, offset2, 1, l);
 1836                switch(type) {
 1837   
 1838                case 1:
 1839                    proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
 1840                                           ip_to_str(tvb_get_ptr(tvb, offset2+4, 4)),
 1841                                           ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
 1842   
 1843                    proto_tree_add_item(lmp_object_tree,  
 1844                                        lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_IPV4],
 1845                                        tvb, offset2+4, 4, FALSE);
 1846   
 1847                    proto_tree_add_item(lmp_object_tree,  
 1848                                        lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_IPV4],
 1849                                        tvb, offset2+8, 4, FALSE);
 1850                    l = 12;
 1851                    break;
 1852   
 1853                case 2:
 1854                    proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
 1855                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)),
 1856                                           ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+8, 16)));
 1857                    proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 16,
 1858                                        "Data-Link Local ID - IPv6: %s",
 1859                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
 1860                    proto_tree_add_text(lmp_object_tree, tvb, offset2+20,16,
 1861                                        "Data-Link Remote ID - IPv6: %s",
 1862                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)));
 1863                    l = 36;
 1864                    break;
 1865   
 1866                case 3:
 1867                    proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
 1868                                           tvb_get_ntohl(tvb, offset2+4),  
 1869                                           tvb_get_ntohl(tvb, offset2+8));
 1870                    proto_tree_add_item(lmp_object_tree,  
 1871                                        lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_UNNUM],
 1872                                        tvb, offset2+4, 4, FALSE);
 1873                    proto_tree_add_item(lmp_object_tree, lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_UNNUM],
 1874                                        tvb, offset2+8, 4, FALSE);
 1875                    l = 12;
 1876                    break;
 1877   
 1878                default:
 1879                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 1880                                        "Data (%d bytes)", mylen);
 1881                    break;
 1882                }
 1883                 
 1884                while (l < obj_length - 4) {
 1885                    mylen = tvb_get_guint8(tvb, offset2+l+1);
 1886                    ti2 = proto_tree_add_item(lmp_object_tree,  
 1887                                              lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ],
 1888                                              tvb, offset2+l, mylen, FALSE);
 1889                    lmp_subobj_tree = proto_item_add_subtree(ti2,  
 1890                                                             lmp_subtree[LMP_TREE_DATA_LINK_SUBOBJ]);
 1891                    proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
 1892                                        "Subobject Type: %d",  
 1893                                        tvb_get_guint8(tvb, offset2+l));
 1894   
 1895                    proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+1, 1,
 1896                                        "Subobject Length: %d", mylen);
 1897                    switch(tvb_get_guint8(tvb, offset2+l)) {
 1898   
 1899                    case 1:
 1900   
 1901                        proto_item_set_text(ti2, "Interface Switching Capability: "
 1902                                            "Switching Cap: %s, Encoding Type: %s, "
 1903                                            "Min BW: %.3f Mbps, Max BW: %.3f Mbps",
 1904                                            val_to_str(tvb_get_guint8(tvb, offset2+l+2),
 1905                                                       gmpls_switching_type_str, "Unknown (%d)"),
 1906                                            val_to_str(tvb_get_guint8(tvb, offset2+l+3),
 1907                                                       gmpls_lsp_enc_str, "Unknown (%d)"),
 1908                                            tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000,
 1909                                            tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000);
 1910                        proto_tree_add_item(lmp_subobj_tree,
 1911                                            lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_SWITCHING_TYPE],
 1912                                            tvb, offset2+l+2, 1, FALSE);
 1913                        proto_tree_add_item(lmp_subobj_tree,
 1914                                            lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_LSP_ENCODING],
 1915                                            tvb, offset2+l+3, 1, FALSE);
 1916                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+4, 4,
 1917                                            "Minimum Reservable Bandwidth: %.3f Mbps",
 1918                                            tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000);
 1919                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+8, 4,
 1920                                            "Maximum Reservable Bandwidth: %.3f Mbps",
 1921                                            tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000);
 1922                        break;
 1923                         
 1924                    case 2:
 1925                        proto_item_set_text(ti2, "Wavelength: %d",
 1926                                            tvb_get_ntohl(tvb, offset2+l+2));
 1927                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+4, 4,
 1928                                            "Wavelength: %d",
 1929                                            tvb_get_ntohl(tvb, offset2+l+4));
 1930                        break;
 1931                         
 1932                    default:
 1933                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l,
 1934                                            tvb_get_guint8(tvb, offset2+l+1),
 1935                                            "Data (%d bytes)", tvb_get_guint8(tvb, offset2+l+1));
 1936                        break;
 1937                    }
 1938                    if (tvb_get_guint8(tvb, offset2+l+1) < 1)
 1939                        THROW(ReportedBoundsError);
 1940                    l += tvb_get_guint8(tvb, offset2+l+1);
 1941                }
 1942                 
 1943                break;
 1944                 
 1945            case LMP_CLASS_CHANNEL_STATUS:
 1946   
 1947                k = 0; j = 0;
 1948   
 1949                switch(type) {
 1950   
 1951                case 1:
 1952                case 3:
 1953                    k = 8; break;
 1954   
 1955                case 2:
 1956                    k = 20; break;
 1957                }
 1958   
 1959                if (!k)
 1960                    break;
 1961   
 1962                for (l=0; l<obj_length - 4; ) {
 1963   
 1964                    ti2 = proto_tree_add_text(lmp_object_tree, tvb, offset2+l, k,
 1965                                              "Interface-Id");
 1966                    lmp_subobj_tree = proto_item_add_subtree(ti2,  
 1967                                                             lmp_subtree[LMP_TREE_CHANNEL_STATUS_ID]);
 1968                    switch(type) {
 1969   
 1970                    case 1:
 1971                        if (j < 4)
 1972                            proto_item_append_text(ti, ": [IPv4-%s",
 1973                                                   ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
 1974                        proto_item_append_text(ti2, ": IPv4 %s",
 1975                                               ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
 1976                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 4,
 1977                                            "Interface ID: IPv4: %s",
 1978                                            ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
 1979                        l += 4;
 1980                        break;
 1981   
 1982                    case 2:
 1983                        if (j < 4)
 1984                            proto_item_append_text(ti, ": [IPv6-%s",
 1985                                                   ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
 1986                        proto_item_append_text(ti2, ": IPv6 %s",
 1987                                               ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
 1988                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2, 16, "Interface ID: IPv6: %s",
 1989                                            ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
 1990                        l += 16;
 1991                        break;
 1992   
 1993                    case 3:
 1994                        if (j < 4)
 1995                            proto_item_append_text(ti, ": [Unnum-%d",  
 1996                                                   tvb_get_ntohl(tvb, offset2+l));
 1997                        proto_item_append_text(ti, ": Unnumbered %d",  
 1998                                               tvb_get_ntohl(tvb, offset2+l));
 1999                        proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 4,
 2000                                            "Interface ID: Unnumbered: %d",
 2001                                            tvb_get_ntohl(tvb, offset2+l));
 2002                        l += 4;
 2003                        break;
 2004   
 2005                    default:
 2006                        proto_tree_add_text(lmp_object_tree, tvb, offset2+l, obj_length-4-l,
 2007                                            "Data (%d bytes)", obj_length-4-l);
 2008                        l = obj_length - 4;
 2009                        break;
 2010                    }
 2011                    if (l == obj_length - 4) break;
 2012                     
 2013                    proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
 2014                                        tvb_get_guint8(tvb, offset2+l) & 0x80 ?
 2015                                        "Link Allocated - Active Monitoring" :
 2016                                        "Link Not Allocated");
 2017                    if (j < 4)
 2018                        proto_item_append_text(ti, "-%s,%s], ",
 2019                                               tvb_get_guint8(tvb, offset2+l) & 0x80 ? "Act" : "NA",
 2020                                               val_to_str(tvb_get_ntohl(tvb, offset2+l) & 0x7fffffff,
 2021                                                          channel_status_short_str, "UNK (%u)."));
 2022                    proto_item_append_text(ti2, ": %s, ",
 2023                                           tvb_get_guint8(tvb, offset2+l) & 0x80 ? "Active" : "Not Active");
 2024                    proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 4,
 2025                                        "Channel Status: %s",
 2026                                        val_to_str(tvb_get_ntohl(tvb, offset2+l) & 0x7fffffff,
 2027                                                   channel_status_str, "Unknown (%u). "));
 2028                    proto_item_append_text(ti2, "%s", val_to_str(tvb_get_ntohl(tvb, offset2+l) & 0x7fffffff,
 2029                                                           channel_status_str, "Unknown (%u). "));
 2030                    j++;
 2031                    l += 4;
 2032                    if (j==4 && l < obj_length - 4)
 2033                        proto_item_append_text(ti, " ...");
 2034                }
 2035                break;
 2036   
 2037            case LMP_CLASS_CHANNEL_STATUS_REQUEST:
 2038                for (l=0; l<obj_length - 4; ) {
 2039                    switch(type) {
 2040                    case 1:
 2041                        proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 4,
 2042                                            "Interface ID: IPv4: %s",
 2043                                            ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
 2044                        l += 4;
 2045                        break;
 2046   
 2047                    case 2:
 2048                        proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 16, "Interface ID: IPv6: %s",
 2049                                            ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l,16)));
 2050                        l += 16;
 2051                        break;
 2052   
 2053                    case 3:
 2054                        proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 4,
 2055                                            "Interface ID: Unnumbered: %d",
 2056                                            tvb_get_ntohl(tvb, offset2+l));
 2057                        l += 4;
 2058                        break;
 2059   
 2060                    default:
 2061                        proto_tree_add_text(lmp_object_tree, tvb, offset2+l,  
 2062                                            obj_length-4-l,
 2063                                            "Data (%d bytes)", obj_length-4-l);
 2064                        l = obj_length - 4;
 2065                        break;
 2066                    }
 2067                }
 2068                break;
 2069                 
 2070            case LMP_CLASS_ERROR:
 2071                l = tvb_get_ntohl(tvb, offset2);
 2072                ti2 = proto_tree_add_uint(lmp_object_tree, lmp_filter[LMPF_VAL_ERROR],
 2073                                          tvb, offset2, 4, l);
 2074   
 2075                switch(type) {
 2076   
 2077                case 1:
 2078                    proto_item_append_text(ti, ": BEGIN_VERIFY_ERROR: %s%s%s%s",
 2079                                           (l&0x01) ? "Unsupported-Link " : "",
 2080                                           (l&0x02) ? "Unwilling" : "",
 2081                                           (l&0x04) ? "Unsupported-Transport" : "",
 2082                                           (l&0x08) ? "TE-Link-ID" : "");
 2083                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2084                                                            lmp_subtree[LMP_TREE_ERROR_FLAGS]);
 2085                    proto_tree_add_boolean(lmp_flags_tree,
 2086                                           lmp_filter[LMPF_VAL_ERROR_VERIFY_UNSUPPORTED_LINK],
 2087                                           tvb, offset, 4, l);
 2088                    proto_tree_add_boolean(lmp_flags_tree,
 2089                                           lmp_filter[LMPF_VAL_ERROR_VERIFY_UNWILLING],
 2090                                           tvb, offset, 4, l);
 2091                    proto_tree_add_boolean(lmp_flags_tree,
 2092                                           lmp_filter[LMPF_VAL_ERROR_VERIFY_TRANSPORT],
 2093                                           tvb, offset, 4, l);
 2094                    proto_tree_add_boolean(lmp_flags_tree,
 2095                                           lmp_filter[LMPF_VAL_ERROR_VERIFY_TE_LINK_ID],
 2096                                           tvb, offset, 4, l);
 2097                    break;
 2098   
 2099                  case 2:
 2100                      proto_item_append_text(ti, ": LINK_SUMMARY_ERROR: %s%s%s%s%s%s",
 2101                                             (l&0x01) ? "Unacceptable-Params " : "",
 2102                                             (l&0x02) ? "Renegotiate" : "",
 2103                                             (l&0x04) ? "Bad-TE-Link" : "",
 2104                                             (l&0x08) ? "Bad-Data-Link" : "",
 2105                                             (l&0x10) ? "Bad-TE-Link-CType" : "",
 2106                                             (l&0x20) ? "Bad-Data-Link-CType" : "");
 2107                      lmp_flags_tree = proto_item_add_subtree(ti2,  
 2108                                                              lmp_subtree[LMP_TREE_ERROR_FLAGS]);
 2109                      proto_tree_add_boolean(lmp_flags_tree,
 2110                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_PARAMETERS],
 2111                                             tvb, offset, 4, l);
 2112                      proto_tree_add_boolean(lmp_flags_tree,
 2113                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_RENEGOTIATE],
 2114                                             tvb, offset, 4, l);
 2115                      proto_tree_add_boolean(lmp_flags_tree,
 2116                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_TE_LINK],
 2117                                             tvb, offset, 4, l);
 2118                      proto_tree_add_boolean(lmp_flags_tree,
 2119                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_DATA_LINK],
 2120                                             tvb, offset, 4, l);
 2121                      proto_tree_add_boolean(lmp_flags_tree,
 2122                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_TEL_CTYPE],
 2123                                             tvb, offset, 4, l);
 2124                      proto_tree_add_boolean(lmp_flags_tree,
 2125                                             lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_DL_CTYPE],
 2126                                             tvb, offset, 4, l);
 2127                      break;
 2128                       
 2129                case 3:
 2130                    proto_item_append_text(ti, ": TRACE_ERROR: %s%s%s",
 2131                                           (l&0x01) ? "Unsupported Trace Type " : "",
 2132                                           (l&0x02) ? "Invalid Trace Message" : "",
 2133                                           (l&0x10) ? "Unknown Object C-Type" : "");
 2134                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2135                                                            lmp_subtree[LMP_TREE_ERROR_FLAGS]);
 2136                    proto_tree_add_boolean(lmp_flags_tree,
 2137                                           lmp_filter[LMPF_VAL_ERROR_TRACE_UNSUPPORTED_TYPE],
 2138                                           tvb, offset, 4, l);
 2139                    proto_tree_add_boolean(lmp_flags_tree,
 2140                                           lmp_filter[LMPF_VAL_ERROR_TRACE_INVALID_MSG],
 2141                                           tvb, offset, 4, l);
 2142                    proto_tree_add_boolean(lmp_flags_tree,
 2143                                           lmp_filter[LMPF_VAL_ERROR_TRACE_UNKNOWN_CTYPE],
 2144                                           tvb, offset, 4, l);
 2145                    break;
 2146   
 2147                case 4:
 2148                    proto_item_append_text(ti, ": LAD_ERROR: %s%s%s%s%s",
 2149                                           (l&0x01) ? "Domain Routing Area ID mismatch" : "",
 2150                                           (l&0x02) ? "TCP ID mismatch" : "",
 2151                                           (l&0x04) ? "DA DCN mismatch" : "",
 2152                                           (l&0x08) ? "Capability mismatch" : "",
 2153                                           (l&0x10) ? "Unknown Object C-Type" : "");
 2154                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2155                                                            lmp_subtree[LMP_TREE_ERROR_FLAGS]);
 2156                    proto_tree_add_boolean(lmp_flags_tree,
 2157                                           lmp_filter[LMPF_VAL_ERROR_LAD_AREA_ID_MISMATCH],
 2158                                           tvb, offset, 4, l);
 2159                    proto_tree_add_boolean(lmp_flags_tree,
 2160                                           lmp_filter[LMPF_VAL_ERROR_LAD_TCP_ID_MISMATCH],
 2161                                           tvb, offset, 4, l);
 2162                    proto_tree_add_boolean(lmp_flags_tree,
 2163                                           lmp_filter[LMPF_VAL_ERROR_LAD_DA_DCN_MISMATCH],
 2164                                           tvb, offset, 4, l);
 2165                    proto_tree_add_boolean(lmp_flags_tree,
 2166                                           lmp_filter[LMPF_VAL_ERROR_LAD_CAPABILITY_MISMATCH],
 2167                                           tvb, offset, 4, l);
 2168                    proto_tree_add_boolean(lmp_flags_tree,
 2169                                           lmp_filter[LMPF_VAL_ERROR_LAD_UNKNOWN_CTYPE],
 2170                                           tvb, offset, 4, l);
 2171                    break;
 2172   
 2173                default:
 2174                    proto_item_append_text(ti, ": UNKNOWN_ERROR (%d): 0x%04x", type, l);
 2175                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2176                                        "Data (%d bytes)", mylen);
 2177                    break;
 2178                }
 2179                break;
 2180                 
 2181            case LMP_CLASS_TRACE:
 2182                switch (type) {
 2183                case 1:
 2184                    l = tvb_get_ntohs(tvb, offset2);
 2185                    proto_tree_add_uint(lmp_object_tree,  
 2186                                        lmp_filter[LMPF_VAL_TRACE_LOCAL_TYPE],
 2187                                        tvb, offset2, 2, l);
 2188                    proto_item_append_text(lmp_object_tree, ": %s",
 2189                                           val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
 2190   
 2191                    l = tvb_get_ntohs(tvb, offset2+2);
 2192                    proto_tree_add_uint(lmp_object_tree,  
 2193                                        lmp_filter[LMPF_VAL_TRACE_LOCAL_LEN],
 2194                                        tvb, offset2+2, 2, l);
 2195                    if (l && l <= obj_length - 8) {
 2196                      proto_item_append_text(lmp_object_tree, " = %s",
 2197                                             tvb_format_text(tvb, offset2+4, l));
 2198                      proto_tree_add_string(lmp_object_tree,  
 2199                                            lmp_filter[LMPF_VAL_TRACE_LOCAL_MSG],
 2200                                            tvb, offset2+4, l, tvb_format_text(tvb,
 2201                                                                               offset2+4,l));
 2202                    }
 2203                    else 
 2204                      proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 1,
 2205                                          "[Invalid Trace Length]");
 2206                    break;
 2207   
 2208                case 2:
 2209                    l = tvb_get_ntohs(tvb, offset2);
 2210                    proto_tree_add_uint(lmp_object_tree,  
 2211                                        lmp_filter[LMPF_VAL_TRACE_REMOTE_TYPE],
 2212                                        tvb, offset2, 2, l);
 2213                    proto_item_append_text(lmp_object_tree, ": %s",
 2214                                           val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
 2215   
 2216                    l = tvb_get_ntohs(tvb, offset2+2);
 2217                    proto_tree_add_uint(lmp_object_tree,  
 2218                                        lmp_filter[LMPF_VAL_TRACE_REMOTE_LEN],
 2219                                        tvb, offset2+2, 2, l);
 2220                    proto_item_append_text(lmp_object_tree, " = %s",
 2221                                           tvb_format_text(tvb, offset2+4, l));
 2222                    proto_tree_add_string(lmp_object_tree,  
 2223                                          lmp_filter[LMPF_VAL_TRACE_REMOTE_MSG],
 2224                                          tvb, offset2+4, l, tvb_format_text(tvb, offset2+4,l));
 2225                    break;
 2226   
 2227                default:
 2228                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2229                                        "Data (%d bytes)", mylen);
 2230                    break;
 2231                 
 2232                }
 2233                break;
 2234   
 2235            case LMP_CLASS_TRACE_REQ:
 2236                switch (type) {
 2237                case 1:
 2238                    l = tvb_get_ntohs(tvb, offset2);
 2239                    proto_tree_add_uint(lmp_object_tree,  
 2240                                        lmp_filter[LMPF_VAL_TRACE_REQ_TYPE],
 2241                                        tvb, offset2, 2, l);
 2242                    proto_item_append_text(lmp_object_tree, ": %s",
 2243                                           val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
 2244                    break;
 2245   
 2246                default:
 2247                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2248                                        "Data (%d bytes)", mylen);
 2249                    break;
 2250                 
 2251                }
 2252                break;
 2253   
 2254            case LMP_CLASS_SERVICE_CONFIG:
 2255   
 2256                /* Support for the ServiceConfig object defined in the UNI 1.0 spec */
 2257                switch (type) {
 2258   
 2259                case 1:
 2260                    /* Supported Signaling Protocols Object */
 2261                     
 2262                    /* Signaling Protocols */
 2263                    l = tvb_get_guint8(tvb, offset2);
 2264                     
 2265                    ti2 = proto_tree_add_uint(lmp_object_tree,  
 2266                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS],
 2267                                              tvb, offset2, 1, l);
 2268                    proto_item_append_text(ti2, ": %s %s",
 2269                                           (l & 0x01) ? "RSVP-based UNI signaling supported " : "",
 2270                                           (l & 0x02) ? "LDP-based UNI signaling supported " : "");
 2271                     
 2272                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2273                                                            lmp_subtree[LMP_TREE_SERVICE_CONFIG_SP_FLAGS]);
 2274                     
 2275                    proto_tree_add_boolean(lmp_flags_tree,
 2276                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP],
 2277                                           tvb, offset2, 1, l);
 2278                     
 2279                    proto_tree_add_boolean(lmp_flags_tree,
 2280                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP],
 2281                                           tvb, offset2, 1, l);
 2282                     
 2283                    /* UNI version */
 2284                    proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1,  
 2285                                        "UNI Version: %u",  
 2286                                        tvb_get_guint8(tvb, offset2+1));
 2287                    break;
 2288                     
 2289                case 2:
 2290                    /* Client Port-Level Service Attributes Object */
 2291                     
 2292                    /* Link Type */
 2293                    proto_tree_add_text(lmp_object_tree, tvb, offset2, 1,
 2294                                        "Link Type: %s",
 2295                                        val_to_str(tvb_get_guint8(tvb, offset2),
 2296                                                   service_attribute_link_type_str,  
 2297                                                   "UNK (%u). "));
 2298                     
 2299                    proto_item_append_text(lmp_object_tree, "%s",
 2300                                           val_to_str(tvb_get_guint8(tvb, offset2),
 2301                                                      service_attribute_link_type_str,
 2302                                                      "Unknown (%u). "));
 2303                     
 2304                    l = tvb_get_guint8(tvb, offset2+1);
 2305                    /* Signal type for SDH */
 2306                    if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SDH) {
 2307                        /* Signal types for an SDH link */
 2308                        proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1,
 2309                                            "Signal Types: %s",
 2310                                            val_to_str(tvb_get_guint8(tvb, offset2+1),
 2311                                                       service_attribute_signal_types_sdh_str,
 2312                                                       "Unknown (%u).  "));
 2313                         
 2314                        proto_item_append_text(lmp_object_tree, "%s",
 2315                                               val_to_str(tvb_get_guint8(tvb, offset2+1),
 2316                                                          service_attribute_signal_types_sdh_str,
 2317                                                          "Unknown (%u).   "));
 2318                    }
 2319                     
 2320                    if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SONET) {
 2321                        /* Signal types for a SONET link */
 2322                        proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1,
 2323                                            "Signal Types: %s",
 2324                                            val_to_str(tvb_get_guint8(tvb, offset2+1),
 2325                                                       service_attribute_signal_types_sonet_str,
 2326                                                       "Unknown (%u).  "));
 2327                         
 2328                        proto_item_append_text(lmp_object_tree, "%s",
 2329                                               val_to_str(tvb_get_guint8(tvb, offset2+1),
 2330                                                          service_attribute_signal_types_sonet_str,
 2331                                                          "Unknown (%u).   "));
 2332                    }
 2333                     
 2334                    /* TP Transparency */
 2335                    l = tvb_get_guint8(tvb, offset2+2);
 2336                    ti2 = proto_tree_add_uint(lmp_object_tree,  
 2337                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS],
 2338                                              tvb, offset2+2, 1, l);
 2339                     
 2340                    proto_item_append_text(ti2, ": %s%s%s",
 2341                                           (l & 0x01) ? "Path/VC Overhead Transparency " : "",
 2342                                           (l & 0x02) ? "Line/MS Overhead Transparency " : "",
 2343                                           (l & 0x04) ? "Section/RS Overhead Transparency " : "");
 2344                     
 2345                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2346                                                            lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_TP_FLAGS]);
 2347                     
 2348                    proto_tree_add_boolean(lmp_flags_tree,
 2349                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD],
 2350                                           tvb, offset2+2, 1, l);
 2351                     
 2352                    proto_tree_add_boolean(lmp_flags_tree,
 2353                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD],
 2354                                           tvb, offset2+2, 1, l);
 2355                     
 2356                    proto_tree_add_boolean(lmp_flags_tree,
 2357                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD],
 2358                                           tvb, offset2+2, 1, l);
 2359                     
 2360                    /* Contiguous Concatentation Types */
 2361                    l = tvb_get_guint8(tvb, offset2+3);
 2362                    ti2 = proto_tree_add_uint(lmp_object_tree,  
 2363                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS],
 2364                                              tvb, offset2+3, 1, l);
 2365                     
 2366                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2367                                                            lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_CCT_FLAGS]);
 2368                     
 2369                    proto_tree_add_boolean(lmp_flags_tree,
 2370                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED],
 2371                                           tvb, offset2+3, 1, l);
 2372                     
 2373                    /* Min and Max NCC */
 2374                    proto_item_append_text(ti, ": Minimum NCC: %d, Maximum NCC: %d",
 2375                                           tvb_get_ntohs(tvb, offset2+4),  
 2376                                           tvb_get_ntohs(tvb, offset2+6));
 2377                     
 2378                    proto_tree_add_uint(lmp_object_tree,  
 2379                                        lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC],
 2380                                        tvb, offset2+4, 2,  
 2381                                        tvb_get_ntohs(tvb, offset2+4));
 2382                     
 2383                    proto_tree_add_uint(lmp_object_tree,  
 2384                                        lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC],
 2385                                        tvb, offset2+6, 2,  
 2386                                        tvb_get_ntohs(tvb, offset2+6));
 2387                     
 2388                    /* Min and Max NVC */
 2389                    proto_item_append_text(ti, ": Minimum NVC: %d, Maximum NVC: %d",
 2390                                           tvb_get_ntohs(tvb, offset2+8),  
 2391                                           tvb_get_ntohs(tvb, offset2+10));
 2392                     
 2393                    proto_tree_add_uint(lmp_object_tree,  
 2394                                        lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC],
 2395                                        tvb, offset2+8, 2,  
 2396                                        tvb_get_ntohs(tvb, offset2+8));
 2397                     
 2398                    proto_tree_add_uint(lmp_object_tree,  
 2399                                        lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC],
 2400                                        tvb, offset2+10, 2,  
 2401                                        tvb_get_ntohs(tvb, offset2+10));
 2402                     
 2403                    /* Local interface ID */
 2404                    proto_item_append_text(ti, ": Local Interface ID %s",
 2405                                           ip_to_str(tvb_get_ptr(tvb, offset2+12, 4)));
 2406                     
 2407                    proto_tree_add_item(lmp_object_tree,  
 2408                                        lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID],
 2409                                        tvb, offset2+12, 4, FALSE);
 2410                     
 2411                    break;
 2412                     
 2413                case 3:
 2414   
 2415                    /* Network Transparency Support and TCM Monitoring Object */
 2416                     
 2417                    /* Transparency */
 2418                    l = tvb_get_ntohl(tvb, offset2);
 2419                    ti2 = proto_tree_add_uint(lmp_object_tree,  
 2420                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS],
 2421                                              tvb, offset2, 4, l);
 2422                     
 2423                    proto_item_append_text(ti2, ": %s %s",
 2424                                           (l & 0x01) ? "Standard SOH/RSOH transparency supported " : "",
 2425                                           (l & 0x02) ? "Standard LOH/MSOH transparency supported " : "");
 2426                     
 2427                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2428                                                            lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS]);
 2429                     
 2430                    proto_tree_add_boolean(lmp_flags_tree,
 2431                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_SOH],
 2432                                           tvb, offset2, 4, l);
 2433                     
 2434                    proto_tree_add_boolean(lmp_flags_tree,
 2435                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_LOH],
 2436                                           tvb, offset2, 4, l);
 2437                     
 2438                    /* TCM Monitoring */
 2439                    l = tvb_get_guint8(tvb, offset2+7);
 2440                     
 2441                    ti2 = proto_tree_add_uint(lmp_object_tree,
 2442                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS],
 2443                                              tvb, offset2+7, 1, l);
 2444                     
 2445                    proto_item_append_text(ti2, ": %s",
 2446                                           (l & 0x01) ? "Transparent Support of TCM available " :  "");
 2447                     
 2448                    proto_tree_add_boolean(lmp_flags_tree,
 2449                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED],
 2450                                           tvb, offset2+7, 1, l);
 2451                     
 2452                    break;
 2453                     
 2454                case 4:
 2455                     
 2456                    /* Network Diversity Object */
 2457                    l = tvb_get_guint8(tvb,offset2+3);
 2458                     
 2459                    ti2 = proto_tree_add_uint(lmp_object_tree,  
 2460                                              lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS],
 2461                                              tvb, offset2+3, 1, l);
 2462                     
 2463                    proto_item_append_text(ti2, ": %s%s%s",
 2464                                           (l & 0x01) ? "Node Diversity is supported " :  "",
 2465                                           (l & 0x02) ? "Link Diversity is supported " : "",
 2466                                           (l & 0x04) ? "SRLG Diversity is supported " : "");
 2467                     
 2468                     
 2469                    lmp_flags_tree = proto_item_add_subtree(ti2,  
 2470                                                            lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS]);
 2471                     
 2472                    proto_tree_add_boolean(lmp_flags_tree,
 2473                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE],
 2474                                           tvb, offset2+3, 1, l);
 2475                     
 2476                    proto_tree_add_boolean(lmp_flags_tree,
 2477                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK],
 2478                                           tvb, offset2+3, 1, l);
 2479                     
 2480                    proto_tree_add_boolean(lmp_flags_tree,
 2481                                           lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG],
 2482                                           tvb, offset2+3, 1, l);
 2483                    break;
 2484                     
 2485                default:
 2486                    /* Unknown type in Service Config object */
 2487                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2488                                        "Data (%d bytes)", mylen);
 2489                    break;
 2490                }
 2491                 
 2492            case LMP_CLASS_DA_DCN_ADDRESS:
 2493                switch(type) {
 2494                     
 2495                case 1:
 2496                    l = LMPF_VAL_LOCAL_DA_DCN_ADDR;
 2497                    proto_item_append_text(ti, ": %s",
 2498                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 2499                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 2500                                        offset2, 4, FALSE);
 2501                    break;
 2502                     
 2503                case 2:
 2504                    l = LMPF_VAL_REMOTE_DA_DCN_ADDR;
 2505                    proto_item_append_text(ti, ": %s",
 2506                                           ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
 2507                    proto_tree_add_item(lmp_object_tree, lmp_filter[l], tvb,  
 2508                                        offset2, 4, FALSE);
 2509                    break;
 2510                     
 2511                default:
 2512                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2513                                        "Data (%d bytes)", mylen);
 2514                    break;
 2515                }
 2516                break;
 2517                 
 2518   
 2519            case LMP_CLASS_LOCAL_LAD_INFO:
 2520                switch(type) {
 2521                  case 1:
 2522                    proto_item_append_text(ti, ": IPv4");
 2523                    proto_tree_add_item(lmp_object_tree,
 2524                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_NODE_ID],
 2525                                        tvb, offset2, 4, FALSE);
 2526                    proto_tree_add_item(lmp_object_tree,
 2527                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_AREA_ID],
 2528                                        tvb, offset2+4, 4, FALSE);
 2529                    proto_tree_add_item(lmp_object_tree,
 2530                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_TE_LINK_ID],
 2531                                        tvb, offset2+8, 4, FALSE);
 2532                    proto_tree_add_item(lmp_object_tree,
 2533                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_COMPONENT_ID],
 2534                                        tvb, offset2+12, 4, FALSE);
 2535                    proto_tree_add_item(lmp_object_tree,
 2536                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ID],
 2537                                        tvb, offset2+16, 4, FALSE);
 2538                    proto_tree_add_item(lmp_object_tree,
 2539                                        lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ADDR],
 2540                                        tvb, offset2+20, 4, FALSE);
 2541                    l = 24;
 2542                    while (l < obj_length - 4) {
 2543                      mylen = tvb_get_guint8(tvb, offset2+l+1);
 2544                      ti2 = proto_tree_add_item(lmp_object_tree,  
 2545                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ],
 2546                                              tvb, offset2+l, mylen, FALSE);
 2547                      lmp_subobj_tree = proto_item_add_subtree(ti2,  
 2548                                                               lmp_subtree[LMP_TREE_LAD_INFO_SUBOBJ]);
 2549                      proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
 2550                                          "Subobject Type: %d", tvb_get_guint8(tvb, offset2+l));
 2551   
 2552                      if (mylen == 0 || l + mylen > obj_length - 4) {
 2553                          proto_tree_add_text(lmp_object_tree, tvb, offset2+l+1, 1,
 2554                                              "Subobject Length: %d (Invalid)", mylen);
 2555                          break;
 2556                      }
 2557                      else 
 2558                          proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+1, 1,
 2559                                              "Subobject Length: %d", mylen);
 2560   
 2561                      switch(tvb_get_guint8(tvb, offset2+l)) {
 2562   
 2563                        case 250:
 2564                          proto_item_set_text(ti2, "Primary Routing Controller: "
 2565                                              "Area ID: %s, RC PC ID: %s, "
 2566                                              "RC PC Addr: %s",
 2567                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)),
 2568                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+8, 4)),
 2569                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+12, 4)));
 2570                          proto_tree_add_item(lmp_subobj_tree,
 2571                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_AREA_ID],
 2572                                              tvb, offset2+l+4, 4, FALSE);
 2573                          proto_tree_add_item(lmp_subobj_tree,
 2574                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ID],
 2575                                              tvb, offset2+l+8, 4, FALSE);
 2576                          proto_tree_add_item(lmp_subobj_tree,
 2577                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ADDR],
 2578                                              tvb, offset2+l+12, 4, FALSE);
 2579                          break;
 2580                         
 2581                        case 251:
 2582                          proto_item_set_text(ti2, "Secondary Routing Controller: "
 2583                                              "Area ID: %s, RC PC ID: %s, "
 2584                                              "RC PC Addr: %s",
 2585                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)),
 2586                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+8, 4)),
 2587                                              ip_to_str(tvb_get_ptr(tvb, offset2+l+12, 4)));
 2588                          proto_tree_add_item(lmp_subobj_tree,
 2589                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_AREA_ID],
 2590                                              tvb, offset2+l+4, 4, FALSE);
 2591                          proto_tree_add_item(lmp_subobj_tree,
 2592                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ID],
 2593                                              tvb, offset2+l+8, 4, FALSE);
 2594                          proto_tree_add_item(lmp_subobj_tree,
 2595                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ADDR],
 2596                                              tvb, offset2+l+12, 4, FALSE);
 2597                          break;
 2598                         
 2599                        case 252:
 2600                          proto_item_set_text(ti2, "SONET/SDH Layer Capability: "
 2601                                              "Switching Cap: %s, Encoding Type: %s",
 2602                                              val_to_str(tvb_get_guint8(tvb, offset2+l+4),
 2603                                                         gmpls_switching_type_str, "Unknown (%d)"),
 2604                                              val_to_str(tvb_get_guint8(tvb, offset2+l+5),
 2605                                                         gmpls_lsp_enc_str, "Unknown (%d)"));
 2606                          proto_tree_add_item(lmp_subobj_tree,
 2607                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SWITCHING_TYPE],
 2608                                              tvb, offset2+l+4, 1, FALSE);
 2609                          proto_tree_add_item(lmp_subobj_tree,
 2610                                              lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_LSP_ENCODING],
 2611                                              tvb, offset2+l+5, 1, FALSE);
 2612   
 2613                          for (j = 0; j < (mylen - 8) / 4; j++) {
 2614                            proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+8+(j*4), 4,
 2615                                                "%s: %d free timeslots",
 2616                                                val_to_str(tvb_get_guint8(tvb, offset2+l+8+(j*4)),
 2617                                                           gmpls_sonet_signal_type_str,
 2618                                                           "Unknown Signal Type (%d)"),
 2619                                                tvb_get_ntoh24(tvb, offset2+l+9+(j*4)));
 2620                          }
 2621                          break;
 2622   
 2623                        default:
 2624                          proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l,
 2625                                              tvb_get_guint8(tvb, offset2+l+1),
 2626                                              "Data (%d bytes)", tvb_get_guint8(tvb,
 2627                                                                                offset2+l+1));
 2628                          break;
 2629                    }
 2630                    if (tvb_get_guint8(tvb, offset2+l+1) < 1)
 2631                        THROW(ReportedBoundsError);
 2632                    l += tvb_get_guint8(tvb, offset2+l+1);
 2633                }
 2634                 
 2635                    break;
 2636                     
 2637                default:
 2638                    proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2639                                        "Data (%d bytes)", mylen);
 2640                    break;
 2641                }
 2642                break;
 2643                 
 2644   
 2645   
 2646            default:
 2647                proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
 2648                                    "Data (%d bytes)", mylen);
 2649                break;
 2650            }
 2651             
 2652            if (obj_length < 1)
 2653                THROW(ReportedBoundsError);
 2654            offset += obj_length;
 2655            len += obj_length;
 2656             
 2657          } /* while */
 2658      } /* tree */
 2659       
 2660      return tvb_length(tvb);
 2661  }
Show more  




Change Warning 5482.35748 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: