aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-04-02 09:18:18 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-04-02 09:18:18 +0000
commite645e3c4d05a4d9dd876003dfa492516709a08ad (patch)
tree01ca2b9578a9579c07e3ff74d21864511dcee92b /asn1
parentf8ce3da390b34cb7a6ec92587823f6efc013b888 (diff)
-Whitespace fix in gsm_map-template(no need to regenerate).
- Fix dissection of extensions in INAP it should now be possible to add an "OID dissector" for extensions. Should fix BUG https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5799 svn path=/trunk/; revision=36435
Diffstat (limited to 'asn1')
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c2
-rw-r--r--asn1/inap/inap.cnf10
-rw-r--r--asn1/inap/packet-inap-template.c7
3 files changed, 16 insertions, 3 deletions
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index 308a8a9400..0e5389c9d9 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -2108,7 +2108,7 @@ void proto_reg_handoff_gsm_map(void) {
static range_t *ssn_range;
if (!map_prefs_initialized) {
- map_prefs_initialized = TRUE;
+ map_prefs_initialized = TRUE;
data_handle = find_dissector("data");
ranap_handle = find_dissector("ranap");
dtap_handle = find_dissector("gsm_a_dtap");
diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf
index 4185dfc72b..9674a011cd 100644
--- a/asn1/inap/inap.cnf
+++ b/asn1/inap/inap.cnf
@@ -212,10 +212,16 @@ static const inap_err_t inap_err_tab[] = {
#.FN_BODY ScriptRunArg/uIScriptSpecificInfo
/* FIX ME */
+#.FN_PARS ExtensionField/type FN_VARIANT = _str VAL_PTR = &obj_id
#.FN_BODY ExtensionField/value
- offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
+ if (obj_id){
+ offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree);
+ }else{
+ call_dissector(data_handle, tvb, actx->pinfo, tree);
+ offset = tvb_length_remaining(tvb,offset);
+ }
diff --git a/asn1/inap/packet-inap-template.c b/asn1/inap/packet-inap-template.c
index 6a1717d183..061f254dfa 100644
--- a/asn1/inap/packet-inap-template.c
+++ b/asn1/inap/packet-inap-template.c
@@ -61,10 +61,12 @@ static int proto_inap = -1;
static range_t *global_ssn_range;
static dissector_handle_t inap_handle;
+static dissector_handle_t data_handle;
/* Global variables */
static guint32 opcode=0;
static guint32 errorCode=0;
+static const char *obj_id = NULL;
static int inap_opcode_type;
#define INAP_OPCODE_INVOKE 1
@@ -126,9 +128,12 @@ dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_item *item=NULL;
proto_tree *tree=NULL;
int offset = 0;
+ guint length;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ length = tvb_length(tvb);
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "INAP");
/* create display subtree for the protocol */
@@ -168,7 +173,9 @@ void proto_reg_handoff_inap(void) {
if (!inap_prefs_initialized) {
inap_prefs_initialized = TRUE;
inap_handle = find_dissector("inap");
+ data_handle = find_dissector("data");
oid_add_from_string("Core-INAP-CS1-Codes","0.4.0.1.1.0.3.0");
+ oid_add_from_string("iso(1) identified-organization(3) icd-ecma(12) member-company(2) 1107 oen(3) inap(3) extensions(2)","1.3.12.2.1107.3.3.2");
}
else {
range_foreach(ssn_range, range_delete_callback);