aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/lte-rrc
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2013-06-18 21:02:00 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2013-06-18 21:02:00 +0000
commitece132a5ce689df9df8ffeb254eb8baf824f40a6 (patch)
tree48f05998d03ceaddef057c29935bf6db89abb775 /asn1/lte-rrc
parentf60dd8578435601d65b33a5eefc50d74d66e3b11 (diff)
Configure MAC LCID -> RLC channel settings from RRC.
svn path=/trunk/; revision=50016
Diffstat (limited to 'asn1/lte-rrc')
-rw-r--r--asn1/lte-rrc/lte-rrc.cnf61
-rw-r--r--asn1/lte-rrc/packet-lte-rrc-template.c16
2 files changed, 71 insertions, 6 deletions
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf
index c003aa6093..31ff398af6 100644
--- a/asn1/lte-rrc/lte-rrc.cnf
+++ b/asn1/lte-rrc/lte-rrc.cnf
@@ -1165,3 +1165,64 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
%(DEFAULT_BODY)s
col_append_str(actx->pinfo->cinfo, COL_INFO, " (CMAS)");
expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_commercial_mobile_alert_sys);
+
+#.FN_BODY DRB-ToAddMod
+ struct mac_lte_info *p_mac_lte_info;
+ /* Clear out the struct */
+ static drb_mapping_t drb_mapping;
+ memset(&drb_mapping, 0, sizeof(drb_mapping));
+ actx->private_data = (void*)&drb_mapping;
+%(DEFAULT_BODY)s
+ /* Need UE identifier */
+ p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
+ if (p_mac_lte_info == NULL) {
+ return offset;
+ }
+ else {
+ drb_mapping.ueid = p_mac_lte_info->ueid;
+ }
+ /* Tell MAC about this mapping */
+ set_mac_lte_channel_mapping(&drb_mapping);
+ /* Clear out struct again, just in case */
+ memset(&drb_mapping, 0, sizeof(drb_mapping));
+
+
+#.FN_BODY DRB-Identity VAL_PTR=&value
+ guint32 value;
+%(DEFAULT_BODY)s
+ if (actx->private_data != NULL) {
+ ((drb_mapping_t*)actx->private_data)->drbid = (guint8)value;
+ }
+
+#.FN_BODY RLC-Config VAL_PTR=&value
+ guint32 value;
+%(DEFAULT_BODY)s
+ if (actx->private_data != NULL) {
+ ((drb_mapping_t*)actx->private_data)->rlcMode = (value==0) ? RLC_AM_MODE : RLC_UM_MODE;
+ ((drb_mapping_t*)actx->private_data)->rlcMode_present = TRUE;
+ }
+
+#.FN_BODY DRB-ToAddMod/logicalChannelIdentity VAL_PTR=&value
+ guint32 value;
+%(DEFAULT_BODY)s
+ if (actx->private_data != NULL) {
+ ((drb_mapping_t*)actx->private_data)->lcid = (guint8)value;
+ ((drb_mapping_t*)actx->private_data)->lcid_present = TRUE;
+ }
+
+#.FN_BODY SN-FieldLength VAL_PTR=&value
+ guint32 value;
+%(DEFAULT_BODY)s
+ if (actx->private_data != NULL) {
+ ((drb_mapping_t*)actx->private_data)->um_sn_length = (value==0) ? 5 : 10;
+ ((drb_mapping_t*)actx->private_data)->um_sn_length_present = TRUE;
+ }
+
+#.FN_BODY LogicalChannelConfig/ul-SpecificParameters/priority VAL_PTR=&value
+ guint32 value;
+%(DEFAULT_BODY)s
+ if (actx->private_data != NULL) {
+ ((drb_mapping_t*)actx->private_data)->ul_priority = value;
+ ((drb_mapping_t*)actx->private_data)->ul_priority_present = TRUE;
+ }
+
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c
index 524c1efbc1..2e826cc3ef 100644
--- a/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -40,6 +40,8 @@
#include "packet-lpp.h"
#include "packet-gsm_map.h"
#include "packet-cell_broadcast.h"
+#include "packet-mac-lte.h"
+#include "packet-rlc-lte.h"
#define PNAME "LTE Radio Resource Control (RRC) protocol"
#define PSNAME "LTE RRC"
@@ -62,6 +64,10 @@ static GHashTable *lte_rrc_system_info_value_changed_hash = NULL;
static guint8 system_info_value_current;
static gboolean system_info_value_current_set;
+
+extern int proto_mac_lte;
+
+
/* Include constants */
#include "packet-lte-rrc-val.h"
@@ -1965,12 +1971,10 @@ dissect_lte_rrc_DL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC DL_DCCH");
col_clear(pinfo->cinfo, COL_INFO);
-
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_DL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_DL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}