if (!p_fp_info || length < 22)
return;
- p_fp_info->interface = IuB_Interface;
+ p_fp_info->iface_type = IuB_Interface;
p_fp_info->release = 0; /* dummy */
p_fp_info->release_year = 0; /* dummy */
p_fp_info->channel = CHANNEL_DCH;
break;
}
-
+
p_fp_info->dch_crc_present = 1; /* dummy */
if (info_type == 0x30) { /* data frame */
(guint)pinfo->pseudo_header->k12.input_info.atm.vp,
(guint)pinfo->pseudo_header->k12.input_info.atm.vc,
(guint)pinfo->pseudo_header->k12.input_info.atm.cid);
-
+
/*
* XXX: this is prone to collisions!
* we need an uniform way to manage circuits between dissectors
*/
pinfo->circuit_id = g_str_hash(circuit_str);
-
+
proto_tree_add_uint(k12_tree, hf_k12_atm_vp, tvb, 0,0,pinfo->pseudo_header->k12.input_info.atm.vp);
proto_tree_add_uint(k12_tree, hf_k12_atm_vc, tvb, 0,0,pinfo->pseudo_header->k12.input_info.atm.vc);
- if (pinfo->pseudo_header->k12.input_info.atm.cid)
+ if (pinfo->pseudo_header->k12.input_info.atm.cid)
proto_tree_add_uint(k12_tree, hf_k12_atm_cid, tvb, 0,0,pinfo->pseudo_header->k12.input_info.atm.cid);
break;
}
}
handles = se_tree_lookup32(port_handles, pinfo->pseudo_header->k12.input);
-
+
if (! handles ) {
for (i=0 ; i < nk12_handles; i++) {
if ( epan_strcasestr(pinfo->pseudo_header->k12.stack_file, k12_handles[i].match) ) {
break;
}
}
-
+
if (!handles) {
data_handles[0] = data_handle;
handles = data_handles;
}
-
+
se_tree_insert32(port_handles, pinfo->pseudo_header->k12.input, handles);
-
+
}
-
+
if (handles == data_handles) {
proto_tree* stack_tree = proto_item_add_subtree(stack_item,ett_stack_item);
proto_item* item;
-
+
item = proto_tree_add_text(stack_tree,tvb,0,0,
"Warning: stk file not matched in the 'K12 Protocols' table");
PROTO_ITEM_SET_GENERATED(item);
expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "unmatched stk file");
-
+
item = proto_tree_add_text(stack_tree,tvb,0,0,
"Info: You can edit the 'K12 Protocols' table from Preferences->Protocols->k12xx");
PROTO_ITEM_SET_GENERATED(item);
}
-
+
/* Setup subdissector information */
-
+
for (i = 0; handles[i] && handles[i+1]; ++i) {
if (handles[i] == sscop_handle) {
sscop_payload_info *p_sscop_info = p_get_proto_data(pinfo->fd, proto_sscop);
k12_handles_t* h = r;
gchar** protos;
guint num_protos, i;
-
+
protos = ep_strsplit(h->protos,":",0);
-
+
for (num_protos = 0; protos[num_protos]; num_protos++) g_strstrip(protos[num_protos]);
-
+
if (h->handles) g_free(h->handles);
-
+
h->handles = g_malloc(sizeof(dissector_handle_t)*num_protos);
-
+
for (i = 0; i < num_protos; i++) {
if ( ! (h->handles[i] = find_dissector(protos[i])) ) {
h->handles[i] = data_handle;
return;
}
}
-
+
*err = NULL;
}
const k12_handles_t* o = orig;
gchar** protos = ep_strsplit(d->protos,":",0);
guint num_protos;
-
+
for (num_protos = 0; protos[num_protos]; num_protos++) g_strstrip(protos[num_protos]);
-
+
d->match = g_strdup(o->match);
d->protos = g_strdup(o->protos);
d->handles = g_memdup(o->handles,sizeof(dissector_handle_t)*(num_protos+1));
-
+
return dest;
}
gchar** protos;
gchar* line = ep_strndup(p,len);
guint num_protos, i;
-
+
g_strstrip(line);
g_strdown(line);
protos = ep_strsplit(line,":",0);
for (num_protos = 0; protos[num_protos]; num_protos++) g_strstrip(protos[num_protos]);
-
+
if (!num_protos) {
*err = ep_strdup_printf("No protocols given");
- return FALSE;
+ return FALSE;
}
-
+
for (i = 0; i < num_protos; i++) {
if (!find_dissector(protos[i])) {
*err = ep_strdup_printf("Could not find dissector for: '%s'",protos[i]);
return FALSE;
}
}
-
+
return TRUE;
}
"Use (sscop:sscf-nni) for sscf-nni (MTP3b) with sscop"),
UAT_END_FIELDS
};
-
+
module_t *k12_module;
-
+
proto_k12 = proto_register_protocol("K12xx", "K12xx", "k12");
proto_register_field_array(proto_k12, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
k12_update_cb,
k12_free_cb,
uat_k12_flds );
-
+
k12_module = prefs_register_protocol(proto_k12, NULL);
prefs_register_obsolete_preference(k12_module, "config");
"K12 Protocols",
"A table of matches vs stack filenames and relative protocols",
k12_uat);
-
+
port_handles = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "k12_port_handles");
}
/* PDSCH Set Id */
proto_tree_add_item(tree, hf_fp_pdsch_set_id, tvb, offset, 1, FALSE);
offset++;
-
+
/* Transmit power level */
proto_tree_add_float(tree, hf_fp_transmit_power_level, tvb, offset, 1,
(float)(int)(tvb_get_guint8(tvb, offset)) / 10);
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_str(pinfo->cinfo, COL_INFO,
- is_control_frame ? " [Control] " :
+ is_control_frame ? " [Control] " :
((p_fp_info->is_uplink) ? " [ULData] " :
" [DLData] " ));
}
{
/* Tree should cover entire subframe */
proto_item_set_len(subframe_ti, bit_offset/8);
-
+
/* Append summary info to subframe label */
proto_item_append_text(subframe_ti, " (%u bits in %u MAC-d PDUs)",
bits_in_subframe, mac_d_pdus_in_subframe);
/* Don't currently handle IuR-specific formats, but its useful to even see
the channel type and direction */
- if (p_fp_info->interface == IuR_Interface)
+ if (p_fp_info->iface_type == IuR_Interface)
{
return;
}