/************************************************************************ * dissect_actrace - The dissector for the AudioCodes Trace prtocol ************************************************************************/ static int dissect_actrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *actrace_tree; proto_item *ti; int actrace_protocol; /* Initialize variables */ actrace_tree = NULL; /* * Check to see whether we're really dealing with AC trace by looking * for a valid "source" and fixed len for CAS, and the direction for ISDN. * This isn't infallible, but its cheap and it's better than nothing. */ actrace_protocol = is_actrace(tvb, 0); if (actrace_protocol != NOT_ACTRACE) { /* * Set the columns now, so that they'll be set correctly if we throw * an exception. We can set them later as well.... */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "AC_TRACE"); col_clear(pinfo->cinfo, COL_INFO); if (tree) { /* Create our actrace subtree */ ti = proto_tree_add_item(tree,proto_actrace,tvb,0,-1, ENC_NA); actrace_tree = proto_item_add_subtree(ti, ett_actrace); } switch (actrace_protocol) { case ACTRACE_CAS: dissect_actrace_cas(tvb, pinfo, actrace_tree); break; case ACTRACE_ISDN: dissect_actrace_isdn(tvb, pinfo, tree, actrace_tree); break; } return tvb_length(tvb); } return 0; }
************************************************************************/ static int dissect_actrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { proto_tree *actrace_tree; proto_item *ti; int actrace_protocol; /* Initialize variables */ actrace_tree = NULL; /* * Check to see whether we're really dealing with AC trace by looking * for a valid "source" and fixed len for CAS, and the direction for ISDN. * This isn't infallible, but it's cheap and it's better than nothing. */ actrace_protocol = is_actrace(tvb, 0); if (actrace_protocol != NOT_ACTRACE) { /* * Set the columns now, so that they'll be set correctly if we throw * an exception. We can set them later as well.... */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "AC_TRACE"); col_clear(pinfo->cinfo, COL_INFO); if (tree) { /* Create our actrace subtree */ ti = proto_tree_add_item(tree,proto_actrace,tvb,0,-1, ENC_NA); actrace_tree = proto_item_add_subtree(ti, ett_actrace); }