Guy, Lego,
Tcap fakes an SSN field from SCCP here...
/* we will fake a ssn subfield which has the same value obtained from
sccp */
tcap_itu_ssn_dissector_table =
register_dissector_table("tcap.itu_ssn", "ITU TCAP SSN", FT_UINT8,
BASE_DEC);
Then this code hands off to CAMEL, MAP etc...
if (ber_oid_dissector_table && cur_oid){
if(!dissector_try_string(ber_oid_dissector_table, cur_oid, next_tvb,
pinfo, tcap_top_tree)) {
dissector_try_port(tcap_itu_ssn_dissector_table,
pinfo->match_port, next_tvb,pinfo, tcap_top_tree);
}
}
else
dissector_try_port(tcap_itu_ssn_dissector_table,
pinfo->match_port, next_tvb, pinfo, tcap_top_tree);
The key here is that the SSN is in the pinfo structure, sua and sccp
populate the pinfo->match_port with the subsystem number from those
layers, thus TCAP knows the SSN from sccp and sua and can use the
dissector table it made and that MAP, CAMEL etc register to.
Note the OID is tried first, this is registered in the MAP dissector
here...
register_ber_oid_dissector_handle("0.4.0.0.1.0.1.3", map_handle,
proto_gsm_map, "itu-t(0) identified-organization(4) etsi(0)
mobileDomain(0) gsm-Network(1) map-ac(0) networkLocUp(1) version3(3)");
register_ber_oid_dissector_handle("0.4.0.0.1.0.1.2", map_handle,
proto_gsm_map,"itu-t(0) identified-organization(4) etsi(0)
mobileDomain(0) gsm-Network(1) map-ac(0) networkLocUp(1) version2(2)" );
This allows protocols with OIDs to have their dissectors automatically
called no matter what the SSN is, otherwise the SSN needs to be
configured in the subdissectors configuration.
static void range_add_callback(guint32 ssn)
{
if (ssn) {
dissector_add("tcap.itu_ssn", ssn, map_handle);
}
}
So for BER with a application context number OID I implemented a way of
calling the dissector without having to configure the SSN.
Hope this helps.
Tim
-----Original Message-----
From: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of LEGO
Sent: 18 December 2005 17:28
To: Ethereal development
Subject: Re: [Ethereal-dev] Re: [Ethereal-cvs] rev 16834:
/trunk/asn1/camel/:packet-camel-template.c
/trunk/epan/dissectors/:packet-ansi_map.c packet-camel.c
packet-camel.hpacket-gsm_map.c packet-inap.c packet-sccp.c
packet-tcap.cpacket-tcap.h ...
On 12/18/05, Guy Harris <gharris@xxxxxxxxx> wrote:
> lego@xxxxxxxxxxxx wrote:
>
> > Have tcap subdissectors registering using functions provided by
> > tcap and tcap manage ssn registration.
>
> What do those functions do that can't be done with the regular
> dissector table code?
to tell TCAP to register for those ssns too in sccp's table.
If I'm to dissect CAMEL (camel/tcap/sccp) for an sccp.ssn I need TCAP to
know it has to handle camel as payload when it is called to handle a
certain sccp.ssn, and it has to register for that ssn as well.
--
This information is top security. When you have read it, destroy
yourself.
-- Marshall McLuhan
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev