* Furthermore RFC2740 (OSPFv3 - OSPF for IPv6) is now supported
* - (c) 2001 Palle Lyckegaard <palle[AT]lyckegaard.dk>
*
+ * Added support to E-NNI routing (OIF2003.259.02)
+ * - (c) 2004 Roberto Morro <roberto.morro[AT]tilab.com>
+
* TOS - support is not fully implemented
*
* Ethereal - Network traffic analyzer
static gint ett_ospf_lsa_mpls_router = -1;
static gint ett_ospf_lsa_mpls_link = -1;
static gint ett_ospf_lsa_mpls_link_stlv = -1;
+static gint ett_ospf_lsa_oif_tna = -1;
+static gint ett_ospf_lsa_oif_tna_stlv = -1;
/*-----------------------------------------------------------------------
* OSPF Filtering
/* MPLS/TE TLV types */
#define MPLS_TLV_ROUTER 1
#define MPLS_TLV_LINK 2
+#define OIF_TLV_TNA 32768
/* MPLS/TE Link STLV types */
enum {
MPLS_LINK_MAX_RES_BW,
MPLS_LINK_UNRES_BW,
MPLS_LINK_COLOR,
- MPLS_LINK_LOCAL_ID = 11,
- MPLS_LINK_REMOTE_ID,
+ MPLS_LINK_LOCAL_REMOTE_ID = 11,
MPLS_LINK_PROTECTION = 14,
MPLS_LINK_IF_SWITCHING_DESC,
MPLS_LINK_SHARED_RISK_GROUP
};
+/* OIF TLV types */
+enum {
+ OIF_LOCAL_NODE_ID = 32773,
+ OIF_REMOTE_NODE_ID,
+ OIF_SONET_SDH_SWITCHING_CAPABILITY,
+ OIF_TNA_IPv4_ADDRESS,
+ OIF_NODE_ID,
+ OIF_TNA_IPv6_ADDRESS,
+ OIF_TNA_NSAP_ADDRESS
+};
+
static const value_string mpls_link_stlv_str[] = {
{MPLS_LINK_TYPE, "Link Type"},
{MPLS_LINK_ID, "Link ID"},
{MPLS_LINK_MAX_RES_BW, "Maximum Reservable Bandwidth"},
{MPLS_LINK_UNRES_BW, "Unreserved Bandwidth"},
{MPLS_LINK_COLOR, "Resource Class/Color"},
- {MPLS_LINK_LOCAL_ID, "Link Local Identifier"},
- {MPLS_LINK_REMOTE_ID, "Link Remote Identifier"},
+ {MPLS_LINK_LOCAL_REMOTE_ID, "Link Local/Remote Identifier"},
{MPLS_LINK_PROTECTION, "Link Protection Type"},
{MPLS_LINK_IF_SWITCHING_DESC, "Interface Switching Capability Descriptor"},
{MPLS_LINK_SHARED_RISK_GROUP, "Shared Risk Link Group"},
+ {OIF_LOCAL_NODE_ID, "Local Node ID"},
+ {OIF_REMOTE_NODE_ID, "Remote Node ID"},
+ {OIF_SONET_SDH_SWITCHING_CAPABILITY, "Sonet/SDH Interface Switching Capability"},
+ {0, NULL},
+};
+
+static const value_string oif_stlv_str[] = {
+ {OIF_TNA_IPv4_ADDRESS, "TNA address"},
+ {OIF_NODE_ID, "Node ID"},
+ {OIF_TNA_IPv6_ADDRESS, "TNA address"},
+ {OIF_TNA_NSAP_ADDRESS, "TNA address"},
{0, NULL},
};
int stlv_type, stlv_len, stlv_offset;
char *stlv_name;
int i;
+ guint8 switch_cap;
ti = proto_tree_add_text(tree, tvb, offset, length,
"MPLS Traffic Engineering LSA");
}
break;
- case MPLS_LINK_LOCAL_ID:
- case MPLS_LINK_REMOTE_ID:
+ case MPLS_LINK_LOCAL_REMOTE_ID:
ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
- "Link Local/Remote Identifier");
+ "%s: %d (0x%x) - %d (0x%x)", stlv_name,
+ tvb_get_ntohl(tvb, stlv_offset + 4),
+ tvb_get_ntohl(tvb, stlv_offset + 4),
+ tvb_get_ntohl(tvb, stlv_offset + 8),
+ tvb_get_ntohl(tvb, stlv_offset + 8));
stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
"TLV Type: %u: %s", stlv_type, stlv_name);
proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
stlv_len);
- proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "Local ID: %s",
- ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
- proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, 4, "Remote ID: %s",
- ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
+ proto_tree_add_item(stlv_tree,
+ ospf_filter[OSPFF_LS_MPLS_LOCAL_IFID],
+ tvb, stlv_offset+4, 4, FALSE);
+ proto_tree_add_item(stlv_tree,
+ ospf_filter[OSPFF_LS_MPLS_REMOTE_IFID],
+ tvb, stlv_offset+8, 4, FALSE);
break;
case MPLS_LINK_IF_SWITCHING_DESC:
"TLV Type: %u: %s", stlv_type, stlv_name);
proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
stlv_len);
+ switch_cap = tvb_get_guint8 (tvb, stlv_offset+4);
proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Switching Type: %s",
val_to_str(tvb_get_guint8(tvb,stlv_offset+4),
gmpls_switching_type_str, "Unknown (%d)"));
tvb_get_ntohieee_float(tvb, stlv_offset + 8 + i*4),
tvb_get_ntohieee_float(tvb, stlv_offset + 8 + i*4) * 8.0);
}
+ if (switch_cap >=1 && switch_cap <=4) { // PSC-1 .. PSC-4
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+40, 4,
+ "Minimum LSP bandwidth: %.10g bytes/s (%.0f bits/s)",
+ tvb_get_ntohieee_float(tvb, stlv_offset + 40),
+ tvb_get_ntohieee_float(tvb, stlv_offset + 40) * 8.0);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+44, 2,
+ "Interface MTU: %d", tvb_get_ntohs(tvb, stlv_offset+44));
+ }
+
+ if (switch_cap == 100) { // TDM
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+40, 4,
+ "Minimum LSP bandwidth: %.10g bytes/s (%.0f bits/s)",
+ tvb_get_ntohieee_float(tvb, stlv_offset + 40),
+ tvb_get_ntohieee_float(tvb, stlv_offset + 40) * 8.0);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+44, 2,
+ "SONET/SDH: %s",
+ tvb_get_guint8(tvb, stlv_offset+44) ?
+ "Arbitrary" : "Standard");
+ }
break;
case MPLS_LINK_PROTECTION:
ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
tvb_get_ntohl(tvb,stlv_offset+4+i));
break;
+ case OIF_LOCAL_NODE_ID:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "%s: %s", stlv_name,
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+ stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "Local Node ID: %s",
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ break;
+
+ case OIF_REMOTE_NODE_ID:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "%s: %s", stlv_name,
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+ stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "Remote Node ID: %s",
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ break;
+
+ case OIF_SONET_SDH_SWITCHING_CAPABILITY:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4, "%s", stlv_name);
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+ stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Switching Cap: %s",
+ val_to_str(tvb_get_guint8 (tvb, stlv_offset+4),
+ gmpls_switching_type_str, "Unknown (%d)"));
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+5, 1, "Encoding: %s",
+ val_to_str(tvb_get_guint8(tvb,stlv_offset+5),
+ gmpls_lsp_enc_str, "Unknown (%d)"));
+ for (i = 0; i < (stlv_len - 4) / 4; i++) {
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+8+(i*4), 4,
+ "%s: %d free timeslots",
+ val_to_str(tvb_get_guint8(tvb, stlv_offset+8+(i*4)),
+ gmpls_sonet_signal_type_str,
+ "Unknown Signal Type (%d)"),
+ tvb_get_ntoh24(tvb, stlv_offset + 9 + i*4));
+ }
+
+ break;
default:
proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
"Unknown Link sub-TLV: %u", stlv_type);
}
break;
+ case OIF_TLV_TNA:
+ ti = proto_tree_add_text(mpls_tree, tvb, offset, tlv_length+4,
+ "TNA Information");
+ tlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna);
+ proto_tree_add_text(tlv_tree, tvb, offset, 2, "TLV Type: 32768 - TNA Information");
+ proto_tree_add_text(tlv_tree, tvb, offset+2, 2, "TLV Length: %u",
+ tlv_length);
+ stlv_offset = offset + 4;
+
+ /* Walk down the sub-TLVs for TNA information */
+ while (stlv_offset < tlv_end_offset) {
+ stlv_type = tvb_get_ntohs(tvb, stlv_offset);
+ stlv_len = tvb_get_ntohs(tvb, stlv_offset + 2);
+ stlv_name = val_to_str(stlv_type, oif_stlv_str, "Unknown sub-TLV");
+ switch (stlv_type) {
+
+ case OIF_NODE_ID:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "%s: %s", stlv_name,
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+ stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "%s: %s", stlv_name,
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+ break;
+
+ case OIF_TNA_IPv4_ADDRESS:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s (IPv4)", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u", stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Addr Length: %u",
+ tvb_get_guint8 (tvb, stlv_offset+4));
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, stlv_len - 4, "TNA Addr: %s",
+ ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
+ break;
+
+ case OIF_TNA_IPv6_ADDRESS:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "%s (IPv6): %s", stlv_name,
+ ip6_to_str((const struct e_in6_addr *)
+ tvb_get_ptr(tvb, stlv_offset + 8, 16)));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s (IPv6)", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u", stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Addr Length: %u",
+ tvb_get_guint8 (tvb, stlv_offset+4));
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, stlv_len - 4, "TNA Addr: %s",
+ ip6_to_str((const struct e_in6_addr *)
+ tvb_get_ptr(tvb, stlv_offset + 8, 16)));
+ break;
+
+ case OIF_TNA_NSAP_ADDRESS:
+ ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "%s (NSAP): %s", stlv_name,
+ tvb_bytes_to_str (tvb, stlv_offset + 8, stlv_len - 4));
+ stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+ "TLV Type: %u: %s (NSAP)", stlv_type, stlv_name);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u", stlv_len);
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Addr Length: %u",
+ tvb_get_guint8 (tvb, stlv_offset+4));
+ proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, stlv_len - 4, "TNA Addr: %s",
+ tvb_bytes_to_str(tvb, stlv_offset+8, stlv_len - 4));
+ break;
+
+ default:
+ proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+ "Unknown Link sub-TLV: %u", stlv_type);
+ break;
+ }
+ stlv_offset += ((stlv_len+4+3)/4)*4;
+ }
+ break;
default:
ti = proto_tree_add_text(mpls_tree, tvb, offset, tlv_length+4,
"Unknown LSA: %u", tlv_type);
&ett_ospf_lsa_mpls,
&ett_ospf_lsa_mpls_router,
&ett_ospf_lsa_mpls_link,
- &ett_ospf_lsa_mpls_link_stlv
+ &ett_ospf_lsa_mpls_link_stlv,
+ &ett_ospf_lsa_oif_tna,
+ &ett_ospf_lsa_oif_tna_stlv
};
proto_ospf = proto_register_protocol("Open Shortest Path First",
*
* Mar 3, 2000: Added support for MPLS/TE objects, as defined in
* <draft-ietf-mpls-rsvp-lsp-tunnel-04.txt>
+ *
+ * May 6, 2004: Added support for E-NNI objects, as defined in
+ * <OIF-E-NNI-01.0> (Roberto Morro)
+ * <roberto.morro[AT]tilab.com>
+ *
+ * May 6, 2004: Modified some UNI objects, as defined in
+ * <OIF2003.249.09> (Roberto Morro)
+ * <roberto.morro[AT]tilab.com>
*/
TT_MESSAGE_ID_ACK,
TT_MESSAGE_ID_LIST,
TT_LABEL,
+ TT_LABEL_SET,
TT_LABEL_REQUEST,
TT_SESSION_ATTRIBUTE,
TT_SESSION_ATTRIBUTE_FLAGS,
TT_ADMIN_STATUS_FLAGS,
TT_GEN_UNI,
TT_GEN_UNI_SUBOBJ,
+ TT_CALL_ID,
TT_BUNDLE_COMPMSG,
TT_RESTART_CAP,
TT_PROTECTION_INFO,
RSVP_CLASS_SESSION_ATTRIBUTE = 207,
RSVP_CLASS_DCLASS = 225,
RSVP_CLASS_LSP_TUNNEL_IF_ID = 227,
- RSVP_CLASS_GENERALIZED_UNI = 229
+ RSVP_CLASS_GENERALIZED_UNI = 229,
+ RSVP_CLASS_CALL_ID
};
{RSVP_CLASS_NOTIFY_REQUEST, "NOTIFY-REQUEST object"},
{RSVP_CLASS_ADMIN_STATUS, "ADMIN-STATUS object"},
{RSVP_CLASS_GENERALIZED_UNI, "GENERALIZED-UNI object"},
+ {RSVP_CLASS_CALL_ID, "CALL-ID object"},
{RSVP_CLASS_DETOUR, "DETOUR object"},
{RSVP_CLASS_FAST_REROUTE, "FAST-REROUTE object"},
{0, NULL}
RSVP_SESSION_TYPE_IPV4_LSP = 7,
RSVP_SESSION_TYPE_IPV6_LSP,
- RSVP_SESSION_TYPE_IPV4_UNI = 9
+ RSVP_SESSION_TYPE_IPV4_UNI = 11,
+ RSVP_SESSION_TYPE_IPV4_E_NNI = 15
};
/*
{ 0, NULL },
};
-static const value_string gmpls_sonet_signal_type_str[] = {
+const value_string gmpls_sonet_signal_type_str[] = {
{ 1, "VT1.5 SPE / VC-11"},
{ 2, "VT2 SPE / VC-12"},
{ 3, "VT3 SPE"},
{17, "STSG-48 / AUG-16"},
{18, "STSG-192 / AUG-64"},
{19, "STSG-768 / AUG-256"},
+
+ /* Other SONEt signal types */
+ {21, "STS-12c SPE / VC-4-4c"},
+ {22, "STS-48c SPE / VC-4-16c"},
+ {23, "STS-192c SPE / VC-4-64c"},
};
static const value_string ouni_guni_diversity_str[] = {
RSVPF_NOTIFY_REQUEST,
RSVPF_ADMIN_STATUS,
RSVPF_GENERALIZED_UNI,
+ RSVPF_CALL_ID,
RSVPF_UNKNOWN_OBJ,
/* Session object */
"", HFILL }},
{&rsvp_filter[RSVPF_LABEL_SET],
- { "RESTRICTED LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
+ { "LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
"", HFILL }},
{&rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
{ "GENERALIZED UNI", "rsvp.generalized_uni", FT_NONE, BASE_NONE, NULL, 0x0,
"", HFILL }},
+ {&rsvp_filter[RSVPF_CALL_ID],
+ { "CALL ID", "rsvp.call_id", FT_NONE, BASE_NONE, NULL, 0x0,
+ "", HFILL }},
+
{&rsvp_filter[RSVPF_UNKNOWN_OBJ],
{ "Unknown object", "rsvp.obj_unknown", FT_NONE, BASE_NONE, NULL, 0x0,
"", HFILL }},
return RSVPF_SESSION_ATTRIBUTE;
case RSVP_CLASS_GENERALIZED_UNI :
return RSVPF_GENERALIZED_UNI;
+ case RSVP_CLASS_CALL_ID :
+ return RSVPF_CALL_ID;
case RSVP_CLASS_DCLASS :
return RSVPF_DCLASS;
case RSVP_CLASS_LSP_TUNNEL_IF_ID :
static char *summary_session (tvbuff_t *tvb, int offset)
{
- static char buf[80];
+ static char buf[100];
switch(tvb_get_guint8(tvb, offset+3)) {
case RSVP_SESSION_TYPE_IPV4:
- snprintf(buf, 80, "SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
+ snprintf(buf, 100, "SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
tvb_get_guint8(tvb, offset+8),
tvb_get_ntohs(tvb, offset+10));
break;
case RSVP_SESSION_TYPE_IPV4_LSP:
- snprintf(buf, 80, "SESSION: IPv4-LSP, Destination %s, Tunnel ID %d, Ext ID %0x. ",
+ snprintf(buf, 100, "SESSION: IPv4-LSP, Destination %s, Tunnel ID %d, Ext ID %0x. ",
ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
tvb_get_ntohs(tvb, offset+10),
tvb_get_ntohl(tvb, offset+12));
break;
case RSVP_SESSION_TYPE_IPV4_UNI:
- snprintf(buf, 80, "SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
+ snprintf(buf, 100, "SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
+ ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_get_ntohs(tvb, offset+10),
+ ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
+ break;
+ case RSVP_SESSION_TYPE_IPV4_E_NNI:
+ snprintf(buf, 100, "SESSION: IPv4-E-NNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
tvb_get_ntohs(tvb, offset+10),
ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
break;
default:
- snprintf(buf, 80, "SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
+ snprintf(buf, 100, "SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
}
return buf;
case RSVP_SESSION_TYPE_IPV4_UNI:
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
- "C-type: 9 - IPv4 UNI");
+ "C-type: 11 - IPv4 UNI");
+ proto_tree_add_item(rsvp_object_tree,
+ rsvp_filter[RSVPF_SESSION_IP],
+ tvb, offset2, 4, FALSE);
+
+ proto_tree_add_item(rsvp_object_tree,
+ rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
+ tvb, offset2+6, 2, FALSE);
+
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
+ "Extended IPv4 Address: %s",
+ ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
+ proto_tree_add_item_hidden(rsvp_object_tree,
+ rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
+ tvb, offset2+8, 4, FALSE);
+ break;
+
+ case RSVP_SESSION_TYPE_IPV4_E_NNI:
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: 15 - IPv4 E-NNI");
proto_tree_add_item(rsvp_object_tree,
rsvp_filter[RSVPF_SESSION_IP],
tvb, offset2, 4, FALSE);
}
}
+/*------------------------------------------------------------------------------
+ * LABEL_SET
+ *------------------------------------------------------------------------------*/
+static void
+dissect_rsvp_label_set (proto_tree *ti, tvbuff_t *tvb,
+ int offset, int obj_length,
+ int class, int type,
+ char *type_str)
+{
+ int offset2 = offset + 8;
+ proto_tree *rsvp_object_tree;
+ guint8 label_type;
+ int len, i;
+
+ static value_string action_type_vals[] = {
+ {0, "Inclusive list"},
+ {1, "Exclusive list"},
+ {2, "Inclusive range"},
+ {3, "Exclusive range"},
+ {0xff, NULL}
+ };
+
+ rsvp_object_tree = proto_item_add_subtree(ti, TREE(TT_LABEL_SET));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
+ "Length: %u", obj_length);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+2, 1,
+ "Class number: %u - %s",
+ class, type_str);
+ len = obj_length - 8;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: %u", type);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1, "Action: %s",
+ val_to_str(tvb_get_guint8(tvb, offset+4),
+ action_type_vals, "Unknown (%u)"));
+ label_type = tvb_get_guint8 (tvb, offset+7);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1, "Label type: %s",
+ label_type==1 ? "Packet Label" : "Generalized Label");
+
+ for (i = 0; i < len/4; i++) {
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+i*4, 4,
+ "Subchannel %u: %u", i+1,
+ tvb_get_ntohl(tvb, offset2+i*4));
+ }
+}
+
/*------------------------------------------------------------------------------
* SESSION ATTRIBUTE
*------------------------------------------------------------------------------*/
case 4: /* Egress Label */
k = tvb_get_guint8(tvb, offset2+l+3);
- switch(k) {
- default:
- case 1:
+ if (k == 1) // Egress label sub-type
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset2+l, tvb_get_ntohs(tvb, offset2+l),
"Egress Label Subobject");
- rsvp_gen_uni_subtree =
- proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
- "Class: %d (Egress Label)", j);
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
- "Type: %d", tvb_get_guint8(tvb, offset2+l+3));
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
- "Length: %u",
- tvb_get_ntohs(tvb, offset2+l));
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
- "Direction: %s",
- decode_boolean_bitfield(
- tvb_get_guint8(tvb, offset2+l+4), 0x80, 8,
- "U: 1 - Upstream label/port ID",
- "U: 0 - Downstream label/port ID"));
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+7, 1,
- "Label type: %u", tvb_get_guint8(tvb, offset2+l+7));
- proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8, 4,
- "Logical Port ID: %u", tvb_get_ntohl(tvb, offset2+l+8));
- proto_item_append_text(ti2, ": %s, Label type %d, Port ID %d, Label ",
- tvb_get_guint8(tvb, offset2+l+4) & 0x80 ?
- "Upstream" : "Downstream",
- tvb_get_guint8(tvb, offset2+l+7),
- tvb_get_ntohl(tvb, offset2+l+8));
- for (j=12; j < tvb_get_ntohs(tvb, offset2+l); j+=4) {
+ else if (k == 2) // SPC_label sub-type (see G.7713.2)
+ ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
+ offset2+l, tvb_get_ntohs(tvb, offset2+l),
+ "SPC Label Subobject");
+ else
+ ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
+ offset2+l, tvb_get_ntohs(tvb, offset2+l),
+ "Unknown Label Subobject");
+ rsvp_gen_uni_subtree = proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
+ "Class: %d (Egress/SPC Label)", j);
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
+ "Type: %d", k);
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
+ "Length: %u",
+ tvb_get_ntohs(tvb, offset2+l));
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
+ "Direction: %s",
+ decode_boolean_bitfield(
+ tvb_get_guint8(tvb, offset2+l+4), 0x80, 8,
+ "U: 1 - Upstream label/port ID",
+ "U: 0 - Downstream label/port ID"));
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+7, 1,
+ "Label type: %u", tvb_get_guint8(tvb, offset2+l+7));
+ proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8, 4,
+ "Logical Port ID: %u", tvb_get_ntohl(tvb, offset2+l+8));
+ proto_item_append_text(ti2, ": %s, Label type %d, Port ID %d, Label ",
+ tvb_get_guint8(tvb, offset2+l+4) & 0x80 ?
+ "Upstream" : "Downstream",
+ tvb_get_guint8(tvb, offset2+l+7),
+ tvb_get_ntohl(tvb, offset2+l+8));
+ for (j=12; j < tvb_get_ntohs(tvb, offset2+l); j+=4) {
proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8, 4,
"Label: %u", tvb_get_ntohl(tvb, offset2+l+j));
proto_item_append_text(ti2, "%u ", tvb_get_ntohl(tvb, offset2+l+j));
- }
- if (i < 4) {
- proto_item_append_text(ti, "Egress Label");
- }
- break;
+ }
+ if (i < 4) {
+ if (k == 1)
+ proto_item_append_text(ti, "Egress Label");
+ else if (k == 2)
+ proto_item_append_text(ti, "SPC Label");
}
break;
}
}
+/*------------------------------------------------------------------------------
+ * CALL_ID
+ *------------------------------------------------------------------------------*/
+static void
+dissect_rsvp_call_id (proto_tree *ti, tvbuff_t *tvb,
+ int offset, int obj_length,
+ int class, int c_type,
+ char *type_str)
+{
+ int type;
+ char *str;
+ int offset2 = offset + 4;
+ int offset3, offset4, len;
+ proto_tree *rsvp_object_tree;
+
+ static value_string address_type_vals[] = {
+ {1, "1 (IPv4)"},
+ {2, "2 (IPv6)"},
+ {3, "3 (NSAP)"},
+ {4, "4 (MAC)"},
+ {0x7f, "0x7f (Vendor-defined)"},
+ {0, NULL}
+};
+
+ rsvp_object_tree = proto_item_add_subtree(ti, TREE(TT_CALL_ID));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
+ "Length: %u", obj_length);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+2, 1,
+ "Class number: %u - %s",
+ class, type_str);
+ proto_item_set_text(ti, "CALL-ID");
+ type = tvb_get_guint8 (tvb, offset2);
+ switch(c_type) {
+ case 1:
+ case 2:
+ if (c_type == 1) {
+ offset3 = offset2 + 4;
+ len = obj_length - 16;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: 1 (operator specific)");
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
+ val_to_str(type, address_type_vals, "Unknown (%u)"));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 3, "Reserved: %u",
+ tvb_get_ntoh24(tvb, offset2+1));
+ }
+ else {
+ offset3 = offset2 + 16;
+ len = obj_length - 28;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: 2 (globally unique)");
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
+ val_to_str(type, address_type_vals, "Unknown (%u)"));
+ str = tvb_get_string (tvb, offset2 + 1, 3);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 1, 3,
+ "International Segment: %s", str);
+ g_free (str);
+ str = tvb_get_string (tvb, offset2 + 4, 12);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 12,
+ "National Segment: %s", str);
+ g_free (str);
+ }
+
+ switch(type) {
+ case 1:
+ offset4 = offset3 + 4;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, 4, "Source Transport Network addr: %s",
+ ip_to_str(tvb_get_ptr(tvb, offset3, 4)));
+ break;
+
+ case 2:
+ offset4 = offset3 + 16;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, 16, "Source Transport Network addr: %s",
+ ip6_to_str((const struct e_in6_addr *) tvb_get_ptr(tvb, offset3, 16)));
+ break;
+
+ case 3:
+ offset4 = offset3 + 20;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, 20, "Source Transport Network addr: %s",
+ tvb_bytes_to_str(tvb, offset3, 20));
+ break;
+
+ case 4:
+ offset4 = offset3 + 6;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, 6, "Source Transport Network addr: %s",
+ tvb_bytes_to_str(tvb, offset3, 6));
+ break;
+
+ case 0x7F:
+ offset4 = offset3 + len;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, len, "Source Transport Network addr: %s",
+ tvb_bytes_to_str(tvb, offset3, len));
+ break;
+
+ default:
+ offset4 = offset3 + len;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset3, len, "Unknow Transport Network type: %d",
+ type);
+ }
+
+ proto_tree_add_text(rsvp_object_tree, tvb, offset4, 8, "Local Identifier: %s",
+ tvb_bytes_to_str(tvb, offset4, 8));
+ break;
+
+ default:
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: Unknown (%u)", type);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
+ "Data (%d bytes)", obj_length - 4);
+ break;
+ }
+}
+
/*------------------------------------------------------------------------------
* RESTART CAPABILITY
*------------------------------------------------------------------------------*/
dissect_rsvp_label(ti, tvb, offset, obj_length, class, type, type_str);
break;
+ case RSVP_CLASS_LABEL_SET:
+ dissect_rsvp_label_set(ti, tvb, offset, obj_length, class, type, type_str);
+ break;
+
case RSVP_CLASS_SESSION_ATTRIBUTE:
dissect_rsvp_session_attribute(ti, tvb, offset, obj_length, class, type, type_str);
break;
dissect_rsvp_gen_uni(ti, tvb, offset, obj_length, class, type, type_str);
break;
+ case RSVP_CLASS_CALL_ID:
+ dissect_rsvp_call_id(ti, tvb, offset, obj_length, class, type, type_str);
+ break;
+
case RSVP_CLASS_RESTART_CAP:
dissect_rsvp_restart_cap(ti, tvb, offset, obj_length, class, type, type_str);
break;