diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2013-10-29 13:49:14 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2013-10-29 13:49:14 +0000 |
commit | 66d64c686e57edee73d3c9833acbaa78c2ab89cd (patch) | |
tree | 33b19bd55aec96160a970945e5eabb0fb6e991e3 /asn1/lte-rrc | |
parent | 6d3988ffd378867ef0c2d8e398d275ccef1a0de1 (diff) | |
download | wireshark-66d64c686e57edee73d3c9833acbaa78c2ab89cd.tar.gz |
Pass security command details (integrity and ciphering algorithms) to PDCP (which doesn't yet do much with them)
svn path=/trunk/; revision=52946
Diffstat (limited to 'asn1/lte-rrc')
-rw-r--r-- | asn1/lte-rrc/lte-rrc.cnf | 28 | ||||
-rw-r--r-- | asn1/lte-rrc/packet-lte-rrc-template.c | 13 |
2 files changed, 41 insertions, 0 deletions
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf index 48c929e7a9..4abe251ce5 100644 --- a/asn1/lte-rrc/lte-rrc.cnf +++ b/asn1/lte-rrc/lte-rrc.cnf @@ -1510,3 +1510,31 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(<e_rrc_duration_val) set_mac_lte_drx_config_release(p_mac_lte_info->ueid, actx->pinfo); } %(DEFAULT_BODY)s + + +#.FN_BODY SecurityAlgorithmConfig + pdcp_lte_info *p_pdcp_lte_info; + pdcp_security_info_t *p_security_algorithms; +%(DEFAULT_BODY)s + p_security_algorithms = private_data_pdcp_security_algorithms(actx); + p_security_algorithms->configuration_frame = actx->pinfo->fd->num; + /* Look for UE identifier */ + p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_pdcp_lte, 0); + if (p_pdcp_lte_info != NULL) { + /* Configure algorithms */ + set_pdcp_lte_security_algorithms(p_pdcp_lte_info->ueid, p_security_algorithms); + } + +#.FN_BODY SecurityAlgorithmConfig/cipheringAlgorithm VAL_PTR=&value + guint32 value; + pdcp_security_info_t *p_security_algorithms; +%(DEFAULT_BODY)s + p_security_algorithms = private_data_pdcp_security_algorithms(actx); + p_security_algorithms->ciphering = (enum security_ciphering_algorithm_e)value; + +#.FN_BODY SecurityAlgorithmConfig/integrityProtAlgorithm VAL_PTR=&value + guint32 value; + pdcp_security_info_t *p_security_algorithms; +%(DEFAULT_BODY)s + p_security_algorithms = private_data_pdcp_security_algorithms(actx); + p_security_algorithms->integrity = (enum security_integrity_algorithm_e)value; diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c index 5154b081b8..2a74af858b 100644 --- a/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/asn1/lte-rrc/packet-lte-rrc-template.c @@ -43,6 +43,7 @@ #include "packet-cell_broadcast.h" #include "packet-mac-lte.h" #include "packet-rlc-lte.h" +#include "packet-pdcp-lte.h" #define PNAME "LTE Radio Resource Control (RRC) protocol" #define PSNAME "LTE RRC" @@ -63,6 +64,7 @@ static gboolean system_info_value_current_set; extern int proto_mac_lte; +extern int proto_pdcp_lte; /* Include constants */ @@ -1804,6 +1806,7 @@ typedef struct lte_rrc_private_data_t guint16 message_identifier; drb_mapping_t drb_mapping; drx_config_t drx_config; + pdcp_security_info_t pdcp_security; } lte_rrc_private_data_t; /* Helper function to get or create a struct that will be actx->private_data */ @@ -1904,6 +1907,16 @@ static void private_data_set_ra_preambles(asn1_ctx_t *actx, guint8 ra_preambles) lte_rrc_private_data_t *private_data = (lte_rrc_private_data_t*)lte_rrc_get_private_data(actx); private_data->ra_preambles = ra_preambles; } + + +/* PDCP Security info */ +static pdcp_security_info_t* private_data_pdcp_security_algorithms(asn1_ctx_t *actx) +{ + lte_rrc_private_data_t *private_data = (lte_rrc_private_data_t*)lte_rrc_get_private_data(actx); + return &private_data->pdcp_security; +} + + /*****************************************************************************/ |