int offset = *data_offset;
/* Get the sctpprim command code. */
- guint8 tag = tvb_get_guint8(tvb, offset++);
+ guint8 first_tag = tvb_get_guint8(tvb, offset++);
+ guint8 tag;
/* Only accept interested in data requests or indications */
- switch (tag)
+ switch (first_tag)
{
case 0x04: /* data request */
case 0x62: /* data indication */
return FALSE;
}
- /* Length field. msb set indicates 2 bytes */
- if (tvb_get_guint8(tvb, offset) & 0x80)
+ if (first_tag == 0x04)
{
- offset += 2;
+ /* Overall length field. msb set indicates 2 bytes */
+ if (tvb_get_guint8(tvb, offset) & 0x80)
+ {
+ offset += 2;
+ }
+ else
+ {
+ offset++;
+ }
}
else
{
- offset++;
+ offset += 3;
}
- /* Skip any other TLC fields before reach payload */
+ /* Skip any other fields before reach payload */
while (tvb_length_remaining(tvb, offset) > 2)
{
/* Look at next tag */
}
else
{
- /* Read length in next byte */
- length = tvb_get_guint8(tvb, offset++);
- /* Skip the following value */
- offset += length;
+ if (first_tag == 0x62)
+ {
+ switch (tag)
+ {
+ case 0x0a: /* dest port */
+ case 0x1e: /* strseqnum */
+ case 0x0d:
+ offset += 2;
+ continue;
+ case 0x1d:
+ case 0x09:
+ case 0x0c:
+ offset += 4;
+ continue;
+ }
+ }
+ else
+ {
+ /* Read length in next byte */
+ length = tvb_get_guint8(tvb, offset++);
+ /* Skip the following value */
+ offset += length;
+ }
}
}
/* 2-byte length field */
offset += 2;
+ /* Skip 2-byte length field */
+ offset += 2;
+
/* Data is here!!! */
*data_offset = offset;
return TRUE;
{
return find_dissector("rtp");
}
+ else
+ if (strcmp(protocol_name, "sipt") == 0)
+ {
+ return find_dissector("sip");
+ }
+ else
+ if (strncmp(protocol_name, "nbap_sctp", strlen("nbap_sctp")) == 0)
+ {
+ return find_dissector("nbap");
+ }
/* Try for an exact match */
else
case DCT2000_ENCAP_MTP2:
protocol_handle = find_dissector("mtp2");
break;
+ case DCT2000_ENCAP_NBAP:
+ protocol_handle = find_dissector("nbap");
+ break;
case DCT2000_ENCAP_UNHANDLED:
/* Show context.port in src or dest column as appropriate */
if (check_col(pinfo->cinfo, COL_DEF_SRC) && direction == 0)
*encap = DCT2000_ENCAP_MTP2;
}
else
+ if ((strcmp(protocol_name, "nbap") == 0) ||
+ (strcmp(protocol_name, "nbap_r4") == 0) ||
+ (strncmp(protocol_name, "nbap_sscfuni", strlen("nbap_sscfuni")) == 0))
{
- /* Not a supported board port protocol/encap, but can show as raw data anyway */
+ /* The entire message in these cases is nbap, so use an encap value. */
+ *encap = DCT2000_ENCAP_NBAP;
+ }
+ else
+ {
+ /* Not a supported board port protocol/encap, but can show as raw data or
+ in some cases find protocol embedded inside primitive */
*encap = DCT2000_ENCAP_UNHANDLED;
}