diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-05-09 12:01:16 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-05-09 12:01:16 +0000 |
commit | 41ae73c57dd22271c346a0b6427dcadfe29775e3 (patch) | |
tree | 5902b669d8e04b072f2f0e38ed6ba844fb05d5b2 /asn1/nbap | |
parent | bdeea8408e858ff1b51e4a2227ec1169d239a420 (diff) |
Collect and use more information in converstion data to be able to dissect FP flows.
svn path=/trunk/; revision=42518
Diffstat (limited to 'asn1/nbap')
-rw-r--r-- | asn1/nbap/nbap.cnf | 70 | ||||
-rw-r--r-- | asn1/nbap/packet-nbap-template.c | 15 |
2 files changed, 78 insertions, 7 deletions
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf index 2ebccc8537..580dc5db73 100644 --- a/asn1/nbap/nbap.cnf +++ b/asn1/nbap/nbap.cnf @@ -195,15 +195,27 @@ actx->pinfo->link_dir=P2P_DIR_UL; # RadioLinkSetupRequestFDD #.FN_HDR RadioLinkSetupRequestFDD -col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkSetupRequest(FDD) "); -/* CRNC -> Node B */ -actx->pinfo->link_dir=P2P_DIR_DL; + + g_nbap_msg_info_for_fp.ProcedureCode = ProcedureCode; + g_nbap_msg_info_for_fp.ddMode = ddMode; + g_nbap_msg_info_for_fp.is_uplink = TRUE; + g_nbap_msg_info_for_fp.dch_crc_present = 2; /* unknown */ + + col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkSetupRequest(FDD) "); + /* CRNC -> Node B */ + actx->pinfo->link_dir=P2P_DIR_DL; # RadioLinkSetupResponseFDD #.FN_HDR RadioLinkSetupResponseFDD -col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkSetupResponse(FDD) "); -/* Node B -> CRNC */ -actx->pinfo->link_dir=P2P_DIR_UL; + + g_nbap_msg_info_for_fp.ProcedureCode = ProcedureCode; + g_nbap_msg_info_for_fp.ddMode = ddMode; + g_nbap_msg_info_for_fp.is_uplink = FALSE; + g_nbap_msg_info_for_fp.dch_crc_present = 2; /* unknown */ + + col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkSetupResponse(FDD) "); + /* Node B -> CRNC */ + actx->pinfo->link_dir=P2P_DIR_UL; # RadioLinkSetupFailureFDD #.FN_HDR RadioLinkSetupFailureFDD @@ -467,22 +479,45 @@ actx->pinfo->link_dir=P2P_DIR_UL; dissect_nsap(parameter_tvb, 0, 20, nsap_tree); } + +#.FN_BODY PayloadCRC-PresenceIndicator VAL_PTR = &payload_crc_value +guint32 payload_crc_value; + +%(DEFAULT_BODY)s + + if(payload_crc_value == 0){ + g_nbap_msg_info_for_fp.dch_crc_present = TRUE; + }else{ + g_nbap_msg_info_for_fp.dch_crc_present = FALSE; + } + +#.FN_BODY DCH-ID VAL_PTR = &dch_id + +%(DEFAULT_BODY)s + #.FN_BODY BindingID VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb=NULL; + %(DEFAULT_BODY)s + if (!parameter_tvb) return offset; # BindingID ::= OCTET STRING (SIZE (1..4, ...)) # -- If the Binding ID includes a UDP port, the UDP port is included in octet 1 and 2.The first octet of # -- the UDP port field is included in the first octet of the Binding ID. BindingID_port = tvb_get_ntohs(parameter_tvb,0); + if(tvb_length(parameter_tvb)==2){ + proto_item_append_text(actx->created_item, " (%%u)",BindingID_port); + } #.FN_BODY RL-Specific-DCH-Info-Item address dst_addr, null_addr; conversation_t *conversation; +fp_info *nbap_fp_info_ul = NULL, *nbap_fp_info_dl = NULL; transportLayerAddress_ipv4 = 0; BindingID_port = 0; +dch_id = 0xFFFFFFFF; %(DEFAULT_BODY)s @@ -509,8 +544,29 @@ BindingID_port = 0; /* Set dissector */ conversation_set_dissector(conversation, fp_handle); } + nbap_fp_info_ul = se_new0(fp_info); + nbap_fp_info_ul->iface_type = IuB_Interface; + nbap_fp_info_ul->division = Division_FDD; + nbap_fp_info_ul->release = 7; /* Set values greater then the checks performed */ + nbap_fp_info_ul->release_year = 2006; + nbap_fp_info_ul->release_month = 12; + nbap_fp_info_ul->is_uplink = g_nbap_msg_info_for_fp.is_uplink; + nbap_fp_info_ul->channel = CHANNEL_DCH; + nbap_fp_info_ul->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; + + nbap_fp_info_dl = se_new0(fp_info); + nbap_fp_info_dl->iface_type = IuB_Interface; + nbap_fp_info_dl->division = Division_FDD; + nbap_fp_info_dl->release = 7; /* Set values greater then the checks performed */ + nbap_fp_info_dl->release_year = 2006; + nbap_fp_info_dl->release_month = 12; + nbap_fp_info_dl->is_uplink = FALSE; + nbap_fp_info_dl->channel = CHANNEL_DCH; + nbap_fp_info_dl->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; + if(actx->pinfo->link_dir==P2P_DIR_DL){ - set_umts_fp_dl_conv_data(conversation, actx->pinfo->fd->num); + /* For now have on fp_info_ul and on fp_info_dl, may not be needed */ + set_umts_fp_ul_conv_data(conversation, actx->pinfo->fd->num, &dst_addr, BindingID_port, dch_id, nbap_fp_info_ul, nbap_fp_info_dl); } #.REGISTER_NEW diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c index d25b37367b..60afb3d302 100644 --- a/asn1/nbap/packet-nbap-template.c +++ b/asn1/nbap/packet-nbap-template.c @@ -72,11 +72,26 @@ static int ett_nbap_TransportLayerAddress_nsap = -1; #include "packet-nbap-ett.c" +/* + * Structure to build information needed to dissect the FP flow beeing set up. + */ +struct _nbap_msg_info_for_fp +{ + guint32 ProcedureCode; + guint32 ddMode; + gboolean is_uplink; + gint channel; /* see definitions in packet-umts_fp.h Channel types */ + guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */ +}; + +struct _nbap_msg_info_for_fp g_nbap_msg_info_for_fp; + /* Global variables */ static guint32 ProcedureCode; static guint32 ProtocolIE_ID; static guint32 ddMode; static const gchar *ProcedureID; +static guint32 dch_id; /* Dissector tables */ static dissector_table_t nbap_ies_dissector_table; |