fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29193 )
Change subject: rlcmac: split gprs_rlcmac.c onto ts_44_{060,018}.c ......................................................................
rlcmac: split gprs_rlcmac.c onto ts_44_{060,018}.c
Change-Id: I2b941f06a70a25e92ba3fd2638f87360a5aa5435 --- M .checkpatch.conf M configure.ac M src/rlcmac/Makefile.am A src/rlcmac/ts_44_018.c R src/rlcmac/ts_44_060.c M tests/Makefile.am M tests/testsuite.at R tests/ts_44_060/Makefile.am R tests/ts_44_060/ts_44_060_test.c R tests/ts_44_060/ts_44_060_test.err R tests/ts_44_060/ts_44_060_test.ok 11 files changed, 627 insertions(+), 599 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve neels: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/.checkpatch.conf b/.checkpatch.conf index 701455e..a7876ae 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -1,5 +1,6 @@ --exclude ^src/csn1/csn1.c$ --exclude ^src/csn1/csn1_(enc|dec).c$ --exclude ^include/osmocom/csn1/csn1.h$ ---exclude ^src/rlcmac/gprs_rlcmac.c$ +--exclude ^src/rlcmac/ts_44_018.c$ +--exclude ^src/rlcmac/ts_44_060.c$ --exclude ^include/osmocom/gprs/rlcmac/gprs_rlcmac.h$ diff --git a/configure.ac b/configure.ac index 1e3e896..0606cf5 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ src/csn1/Makefile src/rlcmac/Makefile tests/Makefile - tests/rlcmac/Makefile + tests/ts_44_060/Makefile Makefile contrib/libosmo-gprs.spec]) AC_OUTPUT diff --git a/src/rlcmac/Makefile.am b/src/rlcmac/Makefile.am index d484a6f..dabfa02 100644 --- a/src/rlcmac/Makefile.am +++ b/src/rlcmac/Makefile.am @@ -22,7 +22,8 @@ $(NULL)
libosmo_gprs_rlcmac_la_SOURCES = \ - gprs_rlcmac.c \ + ts_44_018.c \ + ts_44_060.c \ misc.c \ $(NULL)
diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c new file mode 100644 index 0000000..10ff872 --- /dev/null +++ b/src/rlcmac/ts_44_018.c @@ -0,0 +1,609 @@ +/* + * CSN.1 definitions from 3GPP TS 44.018. + * + * By Vincent Helfre, based on original code by Jari Sassi + * with the gracious authorization of STE + * Copyright (c) 2011 ST-Ericsson + * + * Wireshark - Network traffic analyzer + * By Gerald Combs gerald@wireshark.org + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <assert.h> +#include <arpa/inet.h> + +#include <osmocom/core/utils.h> +#include <osmocom/core/bitvec.h> +#include <osmocom/core/logging.h> + +#include <osmocom/csn1/csn1.h> +#include <osmocom/gprs/rlcmac/gprs_rlcmac.h> + +/*<P1 Rest Octets>*/ +/*<P2 Rest Octets>*/ +#if 0 +static const +CSN_DESCR_BEGIN(MobileAllocationIE_t) + M_UINT (MobileAllocationIE_t, Length, 8), + M_VAR_ARRAY (MobileAllocationIE_t, MA, Length, 0), +CSN_DESCR_END (MobileAllocationIE_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(SingleRFChannel_t) + M_UINT (SingleRFChannel_t, spare, 2), + M_UINT (SingleRFChannel_t, ARFCN, 10), +CSN_DESCR_END (SingleRFChannel_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(RFHoppingChannel_t) + M_UINT (RFHoppingChannel_t, MAIO, 6), + M_UINT (RFHoppingChannel_t, HSN, 6), +CSN_DESCR_END (RFHoppingChannel_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(MobileAllocation_or_Frequency_Short_List_t) + M_UNION (MobileAllocation_or_Frequency_Short_List_t, 2), + M_BITMAP (MobileAllocation_or_Frequency_Short_List_t, u.Frequency_Short_List, 64), + M_TYPE (MobileAllocation_or_Frequency_Short_List_t, u.MA, MobileAllocationIE_t), +CSN_DESCR_END (MobileAllocation_or_Frequency_Short_List_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(Channel_Description_t) + M_UINT (Channel_Description_t, Channel_type_and_TDMA_offset, 5), + M_UINT (Channel_Description_t, TN, 3), + M_UINT (Channel_Description_t, TSC, 3), + + M_UNION (Channel_Description_t, 2), + M_TYPE (Channel_Description_t, u.SingleRFChannel, SingleRFChannel_t), + M_TYPE (Channel_Description_t, u.RFHoppingChannel, RFHoppingChannel_t), +CSN_DESCR_END(Channel_Description_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(Group_Channel_Description_t) + M_TYPE (Group_Channel_Description_t, Channel_Description, Channel_Description_t), + + M_NEXT_EXIST (Group_Channel_Description_t, Exist_Hopping, 1), + M_TYPE (Group_Channel_Description_t, MA_or_Frequency_Short_List, MobileAllocation_or_Frequency_Short_List_t), +CSN_DESCR_END (Group_Channel_Description_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(Group_Call_Reference_t) + M_UINT (Group_Call_Reference_t, value, 27), + M_UINT (Group_Call_Reference_t, SF, 1), + M_UINT (Group_Call_Reference_t, AF, 1), + M_UINT (Group_Call_Reference_t, call_priority, 3), + M_UINT (Group_Call_Reference_t, Ciphering_information, 4), +CSN_DESCR_END (Group_Call_Reference_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(Group_Call_information_t) + M_TYPE (Group_Call_information_t, Group_Call_Reference, Group_Call_Reference_t), + + M_NEXT_EXIST (Group_Call_information_t, Exist_Group_Channel_Description, 1), + M_TYPE (Group_Call_information_t, Group_Channel_Description, Group_Channel_Description_t), +CSN_DESCR_END (Group_Call_information_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (P1_Rest_Octets_t) + M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_NLN_PCH_and_NLN_status, 2), + M_UINT (P1_Rest_Octets_t, NLN_PCH, 2), + M_UINT (P1_Rest_Octets_t, NLN_status, 1), + + M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Priority1, 1), + M_UINT (P1_Rest_Octets_t, Priority1, 3), + + M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Priority2, 1), + M_UINT (P1_Rest_Octets_t, Priority2, 3), + + M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Group_Call_information, 1), + M_TYPE (P1_Rest_Octets_t, Group_Call_information, Group_Call_information_t), + + M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_1, 1), + M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_2, 1), +CSN_DESCR_END (P1_Rest_Octets_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (P2_Rest_Octets_t) + M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_CN3, 1), + M_UINT (P2_Rest_Octets_t, CN3, 2), + + M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_NLN_and_status, 2), + M_UINT (P2_Rest_Octets_t, NLN, 2), + M_UINT (P2_Rest_Octets_t, NLN_status, 1), + + M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority1, 1), + M_UINT (P2_Rest_Octets_t, Priority1, 3), + + M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority2, 1), + M_UINT (P2_Rest_Octets_t, Priority2, 3), + + M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority3, 1), + M_UINT (P2_Rest_Octets_t, Priority3, 3), + + M_UINT_LH (P2_Rest_Octets_t, Packet_Page_Indication_3, 1), +CSN_DESCR_END (P2_Rest_Octets_t) +#endif + +/* <IA Rest Octets> + * Note!! + * - first two bits skipped and frequencyparameters skipped + * - additions for R99 and EGPRS added + */ +#if 0 +static const +CSN_DESCR_BEGIN(DynamicAllocation_t) + M_UINT (DynamicAllocation_t, USF, 3), + M_UINT (DynamicAllocation_t, USF_GRANULARITY, 1), + + M_NEXT_EXIST (DynamicAllocation_t, Exist_P0_PR_MODE, 2), + M_UINT (DynamicAllocation_t, P0, 4), + M_UINT (DynamicAllocation_t, PR_MODE, 1), +CSN_DESCR_END (DynamicAllocation_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(EGPRS_TwoPhaseAccess_t) + M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_ALPHA, 1), + M_UINT (EGPRS_TwoPhaseAccess_t, ALPHA, 4), + + M_UINT (EGPRS_TwoPhaseAccess_t, GAMMA, 5), + M_TYPE (EGPRS_TwoPhaseAccess_t, TBF_STARTING_TIME, StartingTime_t), + M_UINT (EGPRS_TwoPhaseAccess_t, NR_OF_RADIO_BLOCKS_ALLOCATED, 2), + + M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), + M_UINT (EGPRS_TwoPhaseAccess_t, P0, 4), + M_UINT (EGPRS_TwoPhaseAccess_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (EGPRS_TwoPhaseAccess_t, PR_MODE, 1), +CSN_DESCR_END (EGPRS_TwoPhaseAccess_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(EGPRS_OnePhaseAccess_t) + M_UINT (EGPRS_OnePhaseAccess_t, TFI_ASSIGNMENT, 5), + M_UINT (EGPRS_OnePhaseAccess_t, POLLING, 1), + + M_UNION (EGPRS_OnePhaseAccess_t, 2), + M_TYPE (EGPRS_OnePhaseAccess_t, Allocation.DynamicAllocation, DynamicAllocation_t), + CSN_ERROR (EGPRS_OnePhaseAccess_t, "1 <Fixed Allocation>", CSN_ERROR_STREAM_NOT_SUPPORTED), + + M_UINT (EGPRS_OnePhaseAccess_t, EGPRS_CHANNEL_CODING_COMMAND, 4), + M_UINT (EGPRS_OnePhaseAccess_t, TLLI_BLOCK_CHANNEL_CODING, 1), + + M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_BEP_PERIOD2, 1), + M_UINT (EGPRS_OnePhaseAccess_t, BEP_PERIOD2, 4), + + M_UINT (EGPRS_OnePhaseAccess_t, RESEGMENT, 1), + M_UINT (EGPRS_OnePhaseAccess_t, EGPRS_WindowSize, 5), + + M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_ALPHA, 1), + M_UINT (EGPRS_OnePhaseAccess_t, ALPHA, 4), + + M_UINT (EGPRS_OnePhaseAccess_t, GAMMA, 5), + + M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_TIMING_ADVANCE_INDEX, 1), + M_UINT (EGPRS_OnePhaseAccess_t, TIMING_ADVANCE_INDEX, 4), + + M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_TBF_STARTING_TIME, 1), + M_TYPE (EGPRS_OnePhaseAccess_t, TBF_STARTING_TIME, StartingTime_t), +CSN_DESCR_END (EGPRS_OnePhaseAccess_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(IA_EGPRS_00_t) + M_UINT (IA_EGPRS_00_t, ExtendedRA, 5), + + M_REC_ARRAY (IA_EGPRS_00_t, AccessTechnologyType, NrOfAccessTechnologies, 4), + + M_UNION (IA_EGPRS_00_t, 2), + M_TYPE (IA_EGPRS_00_t, Access.TwoPhaseAccess, EGPRS_TwoPhaseAccess_t), + M_TYPE (IA_EGPRS_00_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), +CSN_DESCR_END (IA_EGPRS_00_t) +#endif + +#if 0 +static const +CSN_ChoiceElement_t IA_EGPRS_Choice[] = +{ + {2, 0x00, 0, M_TYPE (IA_EGPRS_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t)}, + {2, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "01 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, + {1, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "1 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)} +}; +#endif + +/* Please observe the double usage of UnionType element. + * First, it is used to store the second bit of LL/LH identification of EGPRS contents. + * Thereafter, UnionType will be used to store the index to detected choice. + */ +#if 0 +static const +CSN_DESCR_BEGIN(IA_EGPRS_t) + M_UINT (IA_EGPRS_t, UnionType , 1 ), + M_CHOICE (IA_EGPRS_t, UnionType, IA_EGPRS_Choice, ElementsOf(IA_EGPRS_Choice)), +CSN_DESCR_END (IA_EGPRS_t) + +static const +CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t) + M_UINT (IA_FreqParamsBeforeTime_t, Length, 6), + M_UINT (IA_FreqParamsBeforeTime_t, MAIO, 6), + M_VAR_ARRAY (IA_FreqParamsBeforeTime_t, MobileAllocation, Length, 8), +CSN_DESCR_END (IA_FreqParamsBeforeTime_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (GPRS_SingleBlockAllocation_t) + M_NEXT_EXIST (GPRS_SingleBlockAllocation_t, Exist_ALPHA, 1), + M_UINT (GPRS_SingleBlockAllocation_t, ALPHA, 4), + + M_UINT (GPRS_SingleBlockAllocation_t, GAMMA, 5), + M_FIXED (GPRS_SingleBlockAllocation_t, 2, 0x01), + M_TYPE (GPRS_SingleBlockAllocation_t, TBF_STARTING_TIME, StartingTime_t), /*bit(16)*/ + + M_NEXT_EXIST_LH(GPRS_SingleBlockAllocation_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), + M_UINT (GPRS_SingleBlockAllocation_t, P0, 4), + M_UINT (GPRS_SingleBlockAllocation_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (GPRS_SingleBlockAllocation_t, PR_MODE, 1), +CSN_DESCR_END (GPRS_SingleBlockAllocation_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (GPRS_DynamicOrFixedAllocation_t) + M_UINT (GPRS_DynamicOrFixedAllocation_t, TFI_ASSIGNMENT, 5), + M_UINT (GPRS_DynamicOrFixedAllocation_t, POLLING, 1), + + M_UNION (GPRS_DynamicOrFixedAllocation_t, 2), + M_TYPE (GPRS_DynamicOrFixedAllocation_t, Allocation.DynamicAllocation, DynamicAllocation_t), + CSN_ERROR (GPRS_DynamicOrFixedAllocation_t, "1 <Fixed Allocation>", CSN_ERROR_STREAM_NOT_SUPPORTED), + + M_UINT (GPRS_DynamicOrFixedAllocation_t, CHANNEL_CODING_COMMAND, 2), + M_UINT (GPRS_DynamicOrFixedAllocation_t, TLLI_BLOCK_CHANNEL_CODING, 1), + + M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_ALPHA, 1), + M_UINT (GPRS_DynamicOrFixedAllocation_t, ALPHA, 4), + + M_UINT (GPRS_DynamicOrFixedAllocation_t, GAMMA, 5), + + M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_TIMING_ADVANCE_INDEX, 1), + M_UINT (GPRS_DynamicOrFixedAllocation_t, TIMING_ADVANCE_INDEX, 4), + + M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_TBF_STARTING_TIME, 1), + M_TYPE (GPRS_DynamicOrFixedAllocation_t, TBF_STARTING_TIME, StartingTime_t), +CSN_DESCR_END (GPRS_DynamicOrFixedAllocation_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(PU_IA_AdditionsR99_t) + M_NEXT_EXIST (PU_IA_AdditionsR99_t, Exist_ExtendedRA, 1), + M_UINT (PU_IA_AdditionsR99_t, ExtendedRA, 5), +CSN_DESCR_END (PU_IA_AdditionsR99_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (Packet_Uplink_ImmAssignment_t) + M_UNION (Packet_Uplink_ImmAssignment_t, 2), + M_TYPE (Packet_Uplink_ImmAssignment_t, Access.SingleBlockAllocation, GPRS_SingleBlockAllocation_t), + M_TYPE (Packet_Uplink_ImmAssignment_t, Access.DynamicOrFixedAllocation, GPRS_DynamicOrFixedAllocation_t), + + M_NEXT_EXIST_OR_NULL_LH(Packet_Uplink_ImmAssignment_t, Exist_AdditionsR99, 1), + M_TYPE (Packet_Uplink_ImmAssignment_t, AdditionsR99, PU_IA_AdditionsR99_t), +CSN_DESCR_END (Packet_Uplink_ImmAssignment_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(PD_IA_AdditionsR99_t) + M_UINT (PD_IA_AdditionsR99_t, EGPRS_WindowSize, 5), + M_UINT (PD_IA_AdditionsR99_t, LINK_QUALITY_MEASUREMENT_MODE, 2), + + M_NEXT_EXIST (PD_IA_AdditionsR99_t, Exist_BEP_PERIOD2, 1), + M_UINT (PD_IA_AdditionsR99_t, BEP_PERIOD2, 4), +CSN_DESCR_END (PD_IA_AdditionsR99_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(Packet_Downlink_ImmAssignment_t) + M_UINT (Packet_Downlink_ImmAssignment_t, TLLI, 32), + + M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TFI_to_TA_VALID, 6 + 1), + M_UINT (Packet_Downlink_ImmAssignment_t, TFI_ASSIGNMENT, 5), + M_UINT (Packet_Downlink_ImmAssignment_t, RLC_MODE, 1), + M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_ALPHA, 1), + M_UINT (Packet_Downlink_ImmAssignment_t, ALPHA, 4), + M_UINT (Packet_Downlink_ImmAssignment_t, GAMMA, 5), + M_UINT (Packet_Downlink_ImmAssignment_t, POLLING, 1), + M_UINT (Packet_Downlink_ImmAssignment_t, TA_VALID, 1), + + M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TIMING_ADVANCE_INDEX, 1), + M_UINT (Packet_Downlink_ImmAssignment_t, TIMING_ADVANCE_INDEX, 4), + + M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TBF_STARTING_TIME, 1), + M_TYPE (Packet_Downlink_ImmAssignment_t, TBF_STARTING_TIME, StartingTime_t), + + M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_P0_PR_MODE, 3), + M_UINT (Packet_Downlink_ImmAssignment_t, P0, 4), + M_UINT (Packet_Downlink_ImmAssignment_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (Packet_Downlink_ImmAssignment_t, PR_MODE, 1), + + M_NEXT_EXIST_OR_NULL_LH(Packet_Downlink_ImmAssignment_t, Exist_AdditionsR99, 1), + M_TYPE (Packet_Downlink_ImmAssignment_t, AdditionsR99, PD_IA_AdditionsR99_t), +CSN_DESCR_END (Packet_Downlink_ImmAssignment_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (Second_Part_Packet_Assignment_t) + M_NEXT_EXIST_OR_NULL_LH(Second_Part_Packet_Assignment_t, Exist_SecondPart, 2), + M_NEXT_EXIST (Second_Part_Packet_Assignment_t, Exist_ExtendedRA, 1), + M_UINT (Second_Part_Packet_Assignment_t, ExtendedRA, 5), +CSN_DESCR_END (Second_Part_Packet_Assignment_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(IA_PacketAssignment_UL_DL_t) + M_UNION (IA_PacketAssignment_UL_DL_t, 2), + M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Uplink_ImmAssignment, Packet_Uplink_ImmAssignment_t), + M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Downlink_ImmAssignment, Packet_Downlink_ImmAssignment_t), +CSN_DESCR_END (IA_PacketAssignment_UL_DL_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(IA_PacketAssignment_t) + M_UNION (IA_PacketAssignment_t, 2), + M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, IA_PacketAssignment_UL_DL_t), + M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, Second_Part_Packet_Assignment_t), +CSN_DESCR_END (IA_PacketAssignment_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(SI13_AdditionsR6) + M_NEXT_EXIST (SI13_AdditionsR6, Exist_LB_MS_TXPWR_MAX_CCH, 1), + M_UINT (SI13_AdditionsR6, LB_MS_TXPWR_MAX_CCH, 5), + M_UINT (SI13_AdditionsR6, SI2n_SUPPORT, 2), +CSN_DESCR_END (SI13_AdditionsR6) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(SI13_AdditionsR4) + M_UINT (SI13_AdditionsR4, SI_STATUS_IND, 1), + M_NEXT_EXIST_OR_NULL_LH (SI13_AdditionsR4, Exist_AdditionsR6, 1), + M_TYPE (SI13_AdditionsR4, AdditionsR6, SI13_AdditionsR6), +CSN_DESCR_END (SI13_AdditionsR4) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(SI13_AdditionR99) + M_UINT (SI13_AdditionR99, SGSNR, 1), + M_NEXT_EXIST_OR_NULL_LH (SI13_AdditionR99, Exist_AdditionsR4, 1), + M_TYPE (SI13_AdditionR99, AdditionsR4, SI13_AdditionsR4), +CSN_DESCR_END (SI13_AdditionR99) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (SI_13_t) + M_THIS_EXIST_LH (SI_13_t), + + M_UINT (SI_13_t, BCCH_CHANGE_MARK, 3), + M_UINT (SI_13_t, SI_CHANGE_FIELD, 4), + + M_NEXT_EXIST (SI_13_t, Exist_MA, 2), + M_UINT (SI_13_t, SI13_CHANGE_MARK, 2), + M_TYPE (SI_13_t, GPRS_Mobile_Allocation, GPRS_Mobile_Allocation_t), + + M_UNION (SI_13_t, 2), + M_TYPE (SI_13_t, u.PBCCH_Not_present, PBCCH_Not_present_t), + M_TYPE (SI_13_t, u.PBCCH_present, PBCCH_present_t), + + M_NEXT_EXIST_OR_NULL_LH(SI_13_t, Exist_AdditionsR99, 1), + M_TYPE (SI_13_t, AdditionsR99, SI13_AdditionR99), +CSN_DESCR_END (SI_13_t) +#endif + +/* Enhanced Measurement Report */ +#if 0 +static const +CSN_DESCR_BEGIN (ServingCellData_t) + M_UINT (ServingCellData_t, RXLEV_SERVING_CELL, 6), + M_FIXED (ServingCellData_t, 1, 0), +CSN_DESCR_END (ServingCellData_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (Repeated_Invalid_BSIC_Info_t) + M_UINT (Repeated_Invalid_BSIC_Info_t, BCCH_FREQ_NCELL, 5), + M_UINT (Repeated_Invalid_BSIC_Info_t, BSIC, 6), + M_UINT (Repeated_Invalid_BSIC_Info_t, RXLEV_NCELL, 5), +CSN_DESCR_END (Repeated_Invalid_BSIC_Info_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (REPORTING_QUANTITY_t) + M_NEXT_EXIST (REPORTING_QUANTITY_t, Exist_REPORTING_QUANTITY, 1), + M_UINT (REPORTING_QUANTITY_t, REPORTING_QUANTITY, 6), +CSN_DESCR_END (REPORTING_QUANTITY_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (NC_MeasurementReport_t) + M_UINT (NC_MeasurementReport_t, NC_MODE, 1), + M_UNION (NC_MeasurementReport_t, 2), + M_TYPE (NC_MeasurementReport_t, u.BA_USED, BA_USED_t), + M_UINT (NC_MeasurementReport_t, u.PSI3_CHANGE_MARK, 2), + M_UINT (NC_MeasurementReport_t, PMO_USED, 1), + M_UINT (NC_MeasurementReport_t, SCALE, 1), + + M_NEXT_EXIST (NC_MeasurementReport_t, Exist_ServingCellData, 1), + M_TYPE (NC_MeasurementReport_t, ServingCellData, ServingCellData_t), + + M_REC_TARRAY (NC_MeasurementReport_t, Repeated_Invalid_BSIC_Info, Repeated_Invalid_BSIC_Info_t, Count_Repeated_Invalid_BSIC_Info), + + M_NEXT_EXIST (NC_MeasurementReport_t, Exist_Repeated_REPORTING_QUANTITY, 1), + M_VAR_TARRAY (NC_MeasurementReport_t, Repeated_REPORTING_QUANTITY, REPORTING_QUANTITY_t, Count_Repeated_Reporting_Quantity), +CSN_DESCR_END (NC_MeasurementReport_t) +#endif + +/* SI1_RestOctet_t */ +#if 0 +static const +CSN_DESCR_BEGIN (SI1_RestOctet_t) + M_NEXT_EXIST_LH(SI1_RestOctet_t, Exist_NCH_Position, 1), + M_UINT (SI1_RestOctet_t, NCH_Position, 5), + + M_UINT_LH (SI1_RestOctet_t, BandIndicator, 1), +CSN_DESCR_END (SI1_RestOctet_t) +#endif + +/* SI3_Rest_Octet_t */ +#if 0 +static const +CSN_DESCR_BEGIN(Selection_Parameters_t) + M_UINT (Selection_Parameters_t, CBQ, 1), + M_UINT (Selection_Parameters_t, CELL_RESELECT_OFFSET, 6), + M_UINT (Selection_Parameters_t, TEMPORARY_OFFSET, 3), + M_UINT (Selection_Parameters_t, PENALTY_TIME, 5), +CSN_DESCR_END (Selection_Parameters_t) + +static const +CSN_DESCR_BEGIN (SI3_Rest_Octet_t) + M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_Selection_Parameters, 1), + M_TYPE (SI3_Rest_Octet_t, Selection_Parameters, Selection_Parameters_t), + + M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_Power_Offset, 1), + M_UINT (SI3_Rest_Octet_t, Power_Offset, 2), + + M_UINT_LH (SI3_Rest_Octet_t, System_Information_2ter_Indicator, 1), + M_UINT_LH (SI3_Rest_Octet_t, Early_Classmark_Sending_Control, 1), + + M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_WHERE, 1), + M_UINT (SI3_Rest_Octet_t, WHERE, 3), + + M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_GPRS_Indicator, 2), + M_UINT (SI3_Rest_Octet_t, RA_COLOUR, 3), + M_UINT (SI3_Rest_Octet_t, SI13_POSITION, 1), + + M_UINT_LH (SI3_Rest_Octet_t, ECS_Restriction3G, 1), + + M_NEXT_EXIST_LH(SI3_Rest_Octet_t, ExistSI2quaterIndicator, 1), + M_UINT (SI3_Rest_Octet_t, SI2quaterIndicator, 1), +CSN_DESCR_END (SI3_Rest_Octet_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (SI4_Rest_Octet_t) + M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_Selection_Parameters, 1), + M_TYPE (SI4_Rest_Octet_t, Selection_Parameters, Selection_Parameters_t), + + M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_Power_Offset, 1), + M_UINT (SI4_Rest_Octet_t, Power_Offset, 2), + + M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_GPRS_Indicator, 2), + M_UINT (SI4_Rest_Octet_t, RA_COLOUR, 3), + M_UINT (SI4_Rest_Octet_t, SI13_POSITION, 1), +CSN_DESCR_END (SI4_Rest_Octet_t) +#endif + +/* SI6_RestOctet_t */ + +#if 0 +static const +CSN_DESCR_BEGIN(PCH_and_NCH_Info_t) + M_UINT (PCH_and_NCH_Info_t, PagingChannelRestructuring, 1), + M_UINT (PCH_and_NCH_Info_t, NLN_SACCH, 2), + + M_NEXT_EXIST (PCH_and_NCH_Info_t, Exist_CallPriority, 1), + M_UINT (PCH_and_NCH_Info_t, CallPriority, 3), + + M_UINT (PCH_and_NCH_Info_t, NLN_Status, 1), +CSN_DESCR_END (PCH_and_NCH_Info_t) + +static const +CSN_DESCR_BEGIN (SI6_RestOctet_t) + M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_PCH_and_NCH_Info, 1), + M_TYPE (SI6_RestOctet_t, PCH_and_NCH_Info, PCH_and_NCH_Info_t), + + M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_VBS_VGCS_Options, 1), + M_UINT (SI6_RestOctet_t, VBS_VGCS_Options, 2), + + M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_DTM_Support, 2), + M_UINT (SI6_RestOctet_t, RAC, 8), + M_UINT (SI6_RestOctet_t, MAX_LAPDm, 3), + + M_UINT_LH (SI6_RestOctet_t, BandIndicator, 1), +CSN_DESCR_END (SI6_RestOctet_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN(EMR_ServingCell_t) + /*CSN_MEMBER_BIT (EMR_ServingCell_t, DTX_USED),*/ + M_UINT (EMR_ServingCell_t, DTX_USED, 1), + M_UINT (EMR_ServingCell_t, RXLEV_VAL, 6), + M_UINT (EMR_ServingCell_t, RX_QUAL_FULL, 3), + M_UINT (EMR_ServingCell_t, MEAN_BEP, 5), + M_UINT (EMR_ServingCell_t, CV_BEP, 3), + M_UINT (EMR_ServingCell_t, NBR_RCVD_BLOCKS, 5), +CSN_DESCR_END(EMR_ServingCell_t) +#endif + +#if 0 +static const +CSN_DESCR_BEGIN (EnhancedMeasurementReport_t) + M_UINT (EnhancedMeasurementReport_t, RR_Short_PD, 1), + M_UINT (EnhancedMeasurementReport_t, MESSAGE_TYPE, 5), + M_UINT (EnhancedMeasurementReport_t, ShortLayer2_Header, 2), + M_TYPE (EnhancedMeasurementReport_t, BA_USED, BA_USED_t), + M_UINT (EnhancedMeasurementReport_t, BSIC_Seen, 1), + M_UINT (EnhancedMeasurementReport_t, SCALE, 1), + M_NEXT_EXIST (EnhancedMeasurementReport_t, Exist_ServingCellData, 1), + M_TYPE (EnhancedMeasurementReport_t, ServingCellData, EMR_ServingCell_t), + M_REC_TARRAY (EnhancedMeasurementReport_t, RepeatedInvalid_BSIC_Info, RepeatedInvalid_BSIC_Info_t, + Count_RepeatedInvalid_BSIC_Info), + M_NEXT_EXIST (EnhancedMeasurementReport_t, Exist_ReportBitmap, 1), + M_VAR_TARRAY (EnhancedMeasurementReport_t, REPORTING_QUANTITY_Instances, REPORTING_QUANTITY_Instance_t, Count_REPORTING_QUANTITY_Instances), +CSN_DESCR_END (EnhancedMeasurementReport_t) +#endif diff --git a/src/rlcmac/gprs_rlcmac.c b/src/rlcmac/ts_44_060.c similarity index 91% rename from src/rlcmac/gprs_rlcmac.c rename to src/rlcmac/ts_44_060.c index b0b7ca8..80e182e 100644 --- a/src/rlcmac/gprs_rlcmac.c +++ b/src/rlcmac/ts_44_060.c @@ -1,6 +1,5 @@ -/* gsm_rlcmac.c - * Routines for GSM RLC MAC control plane message dissection in wireshark. - * TS 44.060 and 24.008 +/* + * CSN.1 definitions from 3GPP TS 44.060. * * Copyright (C) 2011 Ivan Klyuchnikov * @@ -8,8 +7,6 @@ * with the gracious authorization of STE * Copyright (c) 2011 ST-Ericsson * - * $Id: packet-gsm_rlcmac.c 39164 2011-09-27 12:05:32Z etxrab $ - * * Wireshark - Network traffic analyzer * By Gerald Combs gerald@wireshark.org * Copyright 1998 Gerald Combs @@ -208,368 +205,6 @@ M_TYPE (EGPRS_AckNack_t, Desc, EGPRS_AckNack_w_len_t), CSN_DESCR_END (EGPRS_AckNack_t)
-/*<P1 Rest Octets>*/ -/*<P2 Rest Octets>*/ -#if 0 -static const -CSN_DESCR_BEGIN(MobileAllocationIE_t) - M_UINT (MobileAllocationIE_t, Length, 8), - M_VAR_ARRAY (MobileAllocationIE_t, MA, Length, 0), -CSN_DESCR_END (MobileAllocationIE_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(SingleRFChannel_t) - M_UINT (SingleRFChannel_t, spare, 2), - M_UINT (SingleRFChannel_t, ARFCN, 10), -CSN_DESCR_END (SingleRFChannel_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(RFHoppingChannel_t) - M_UINT (RFHoppingChannel_t, MAIO, 6), - M_UINT (RFHoppingChannel_t, HSN, 6), -CSN_DESCR_END (RFHoppingChannel_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(MobileAllocation_or_Frequency_Short_List_t) - M_UNION (MobileAllocation_or_Frequency_Short_List_t, 2), - M_BITMAP (MobileAllocation_or_Frequency_Short_List_t, u.Frequency_Short_List, 64), - M_TYPE (MobileAllocation_or_Frequency_Short_List_t, u.MA, MobileAllocationIE_t), -CSN_DESCR_END (MobileAllocation_or_Frequency_Short_List_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(Channel_Description_t) - M_UINT (Channel_Description_t, Channel_type_and_TDMA_offset, 5), - M_UINT (Channel_Description_t, TN, 3), - M_UINT (Channel_Description_t, TSC, 3), - - M_UNION (Channel_Description_t, 2), - M_TYPE (Channel_Description_t, u.SingleRFChannel, SingleRFChannel_t), - M_TYPE (Channel_Description_t, u.RFHoppingChannel, RFHoppingChannel_t), -CSN_DESCR_END(Channel_Description_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(Group_Channel_Description_t) - M_TYPE (Group_Channel_Description_t, Channel_Description, Channel_Description_t), - - M_NEXT_EXIST (Group_Channel_Description_t, Exist_Hopping, 1), - M_TYPE (Group_Channel_Description_t, MA_or_Frequency_Short_List, MobileAllocation_or_Frequency_Short_List_t), -CSN_DESCR_END (Group_Channel_Description_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(Group_Call_Reference_t) - M_UINT (Group_Call_Reference_t, value, 27), - M_UINT (Group_Call_Reference_t, SF, 1), - M_UINT (Group_Call_Reference_t, AF, 1), - M_UINT (Group_Call_Reference_t, call_priority, 3), - M_UINT (Group_Call_Reference_t, Ciphering_information, 4), -CSN_DESCR_END (Group_Call_Reference_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(Group_Call_information_t) - M_TYPE (Group_Call_information_t, Group_Call_Reference, Group_Call_Reference_t), - - M_NEXT_EXIST (Group_Call_information_t, Exist_Group_Channel_Description, 1), - M_TYPE (Group_Call_information_t, Group_Channel_Description, Group_Channel_Description_t), -CSN_DESCR_END (Group_Call_information_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (P1_Rest_Octets_t) - M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_NLN_PCH_and_NLN_status, 2), - M_UINT (P1_Rest_Octets_t, NLN_PCH, 2), - M_UINT (P1_Rest_Octets_t, NLN_status, 1), - - M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Priority1, 1), - M_UINT (P1_Rest_Octets_t, Priority1, 3), - - M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Priority2, 1), - M_UINT (P1_Rest_Octets_t, Priority2, 3), - - M_NEXT_EXIST_LH(P1_Rest_Octets_t, Exist_Group_Call_information, 1), - M_TYPE (P1_Rest_Octets_t, Group_Call_information, Group_Call_information_t), - - M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_1, 1), - M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_2, 1), -CSN_DESCR_END (P1_Rest_Octets_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (P2_Rest_Octets_t) - M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_CN3, 1), - M_UINT (P2_Rest_Octets_t, CN3, 2), - - M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_NLN_and_status, 2), - M_UINT (P2_Rest_Octets_t, NLN, 2), - M_UINT (P2_Rest_Octets_t, NLN_status, 1), - - M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority1, 1), - M_UINT (P2_Rest_Octets_t, Priority1, 3), - - M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority2, 1), - M_UINT (P2_Rest_Octets_t, Priority2, 3), - - M_NEXT_EXIST_LH(P2_Rest_Octets_t, Exist_Priority3, 1), - M_UINT (P2_Rest_Octets_t, Priority3, 3), - - M_UINT_LH (P2_Rest_Octets_t, Packet_Page_Indication_3, 1), -CSN_DESCR_END (P2_Rest_Octets_t) -#endif - -/* <IA Rest Octets> - * Note!! - * - first two bits skipped and frequencyparameters skipped - * - additions for R99 and EGPRS added - */ -#if 0 -static const -CSN_DESCR_BEGIN(DynamicAllocation_t) - M_UINT (DynamicAllocation_t, USF, 3), - M_UINT (DynamicAllocation_t, USF_GRANULARITY, 1), - - M_NEXT_EXIST (DynamicAllocation_t, Exist_P0_PR_MODE, 2), - M_UINT (DynamicAllocation_t, P0, 4), - M_UINT (DynamicAllocation_t, PR_MODE, 1), -CSN_DESCR_END (DynamicAllocation_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(EGPRS_TwoPhaseAccess_t) - M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_ALPHA, 1), - M_UINT (EGPRS_TwoPhaseAccess_t, ALPHA, 4), - - M_UINT (EGPRS_TwoPhaseAccess_t, GAMMA, 5), - M_TYPE (EGPRS_TwoPhaseAccess_t, TBF_STARTING_TIME, StartingTime_t), - M_UINT (EGPRS_TwoPhaseAccess_t, NR_OF_RADIO_BLOCKS_ALLOCATED, 2), - - M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), - M_UINT (EGPRS_TwoPhaseAccess_t, P0, 4), - M_UINT (EGPRS_TwoPhaseAccess_t, BTS_PWR_CTRL_MODE, 1), - M_UINT (EGPRS_TwoPhaseAccess_t, PR_MODE, 1), -CSN_DESCR_END (EGPRS_TwoPhaseAccess_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(EGPRS_OnePhaseAccess_t) - M_UINT (EGPRS_OnePhaseAccess_t, TFI_ASSIGNMENT, 5), - M_UINT (EGPRS_OnePhaseAccess_t, POLLING, 1), - - M_UNION (EGPRS_OnePhaseAccess_t, 2), - M_TYPE (EGPRS_OnePhaseAccess_t, Allocation.DynamicAllocation, DynamicAllocation_t), - CSN_ERROR (EGPRS_OnePhaseAccess_t, "1 <Fixed Allocation>", CSN_ERROR_STREAM_NOT_SUPPORTED), - - M_UINT (EGPRS_OnePhaseAccess_t, EGPRS_CHANNEL_CODING_COMMAND, 4), - M_UINT (EGPRS_OnePhaseAccess_t, TLLI_BLOCK_CHANNEL_CODING, 1), - - M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_BEP_PERIOD2, 1), - M_UINT (EGPRS_OnePhaseAccess_t, BEP_PERIOD2, 4), - - M_UINT (EGPRS_OnePhaseAccess_t, RESEGMENT, 1), - M_UINT (EGPRS_OnePhaseAccess_t, EGPRS_WindowSize, 5), - - M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_ALPHA, 1), - M_UINT (EGPRS_OnePhaseAccess_t, ALPHA, 4), - - M_UINT (EGPRS_OnePhaseAccess_t, GAMMA, 5), - - M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_TIMING_ADVANCE_INDEX, 1), - M_UINT (EGPRS_OnePhaseAccess_t, TIMING_ADVANCE_INDEX, 4), - - M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_TBF_STARTING_TIME, 1), - M_TYPE (EGPRS_OnePhaseAccess_t, TBF_STARTING_TIME, StartingTime_t), -CSN_DESCR_END (EGPRS_OnePhaseAccess_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(IA_EGPRS_00_t) - M_UINT (IA_EGPRS_00_t, ExtendedRA, 5), - - M_REC_ARRAY (IA_EGPRS_00_t, AccessTechnologyType, NrOfAccessTechnologies, 4), - - M_UNION (IA_EGPRS_00_t, 2), - M_TYPE (IA_EGPRS_00_t, Access.TwoPhaseAccess, EGPRS_TwoPhaseAccess_t), - M_TYPE (IA_EGPRS_00_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), -CSN_DESCR_END (IA_EGPRS_00_t) -#endif - -#if 0 -static const -CSN_ChoiceElement_t IA_EGPRS_Choice[] = -{ - {2, 0x00, 0, M_TYPE (IA_EGPRS_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t)}, - {2, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "01 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, - {1, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "1 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)} -}; -#endif - -/* Please observe the double usage of UnionType element. - * First, it is used to store the second bit of LL/LH identification of EGPRS contents. - * Thereafter, UnionType will be used to store the index to detected choice. - */ -#if 0 -static const -CSN_DESCR_BEGIN(IA_EGPRS_t) - M_UINT (IA_EGPRS_t, UnionType , 1 ), - M_CHOICE (IA_EGPRS_t, UnionType, IA_EGPRS_Choice, ElementsOf(IA_EGPRS_Choice)), -CSN_DESCR_END (IA_EGPRS_t) - -static const -CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t) - M_UINT (IA_FreqParamsBeforeTime_t, Length, 6), - M_UINT (IA_FreqParamsBeforeTime_t, MAIO, 6), - M_VAR_ARRAY (IA_FreqParamsBeforeTime_t, MobileAllocation, Length, 8), -CSN_DESCR_END (IA_FreqParamsBeforeTime_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (GPRS_SingleBlockAllocation_t) - M_NEXT_EXIST (GPRS_SingleBlockAllocation_t, Exist_ALPHA, 1), - M_UINT (GPRS_SingleBlockAllocation_t, ALPHA, 4), - - M_UINT (GPRS_SingleBlockAllocation_t, GAMMA, 5), - M_FIXED (GPRS_SingleBlockAllocation_t, 2, 0x01), - M_TYPE (GPRS_SingleBlockAllocation_t, TBF_STARTING_TIME, StartingTime_t), /*bit(16)*/ - - M_NEXT_EXIST_LH(GPRS_SingleBlockAllocation_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), - M_UINT (GPRS_SingleBlockAllocation_t, P0, 4), - M_UINT (GPRS_SingleBlockAllocation_t, BTS_PWR_CTRL_MODE, 1), - M_UINT (GPRS_SingleBlockAllocation_t, PR_MODE, 1), -CSN_DESCR_END (GPRS_SingleBlockAllocation_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (GPRS_DynamicOrFixedAllocation_t) - M_UINT (GPRS_DynamicOrFixedAllocation_t, TFI_ASSIGNMENT, 5), - M_UINT (GPRS_DynamicOrFixedAllocation_t, POLLING, 1), - - M_UNION (GPRS_DynamicOrFixedAllocation_t, 2), - M_TYPE (GPRS_DynamicOrFixedAllocation_t, Allocation.DynamicAllocation, DynamicAllocation_t), - CSN_ERROR (GPRS_DynamicOrFixedAllocation_t, "1 <Fixed Allocation>", CSN_ERROR_STREAM_NOT_SUPPORTED), - - M_UINT (GPRS_DynamicOrFixedAllocation_t, CHANNEL_CODING_COMMAND, 2), - M_UINT (GPRS_DynamicOrFixedAllocation_t, TLLI_BLOCK_CHANNEL_CODING, 1), - - M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_ALPHA, 1), - M_UINT (GPRS_DynamicOrFixedAllocation_t, ALPHA, 4), - - M_UINT (GPRS_DynamicOrFixedAllocation_t, GAMMA, 5), - - M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_TIMING_ADVANCE_INDEX, 1), - M_UINT (GPRS_DynamicOrFixedAllocation_t, TIMING_ADVANCE_INDEX, 4), - - M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_TBF_STARTING_TIME, 1), - M_TYPE (GPRS_DynamicOrFixedAllocation_t, TBF_STARTING_TIME, StartingTime_t), -CSN_DESCR_END (GPRS_DynamicOrFixedAllocation_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(PU_IA_AdditionsR99_t) - M_NEXT_EXIST (PU_IA_AdditionsR99_t, Exist_ExtendedRA, 1), - M_UINT (PU_IA_AdditionsR99_t, ExtendedRA, 5), -CSN_DESCR_END (PU_IA_AdditionsR99_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (Packet_Uplink_ImmAssignment_t) - M_UNION (Packet_Uplink_ImmAssignment_t, 2), - M_TYPE (Packet_Uplink_ImmAssignment_t, Access.SingleBlockAllocation, GPRS_SingleBlockAllocation_t), - M_TYPE (Packet_Uplink_ImmAssignment_t, Access.DynamicOrFixedAllocation, GPRS_DynamicOrFixedAllocation_t), - - M_NEXT_EXIST_OR_NULL_LH(Packet_Uplink_ImmAssignment_t, Exist_AdditionsR99, 1), - M_TYPE (Packet_Uplink_ImmAssignment_t, AdditionsR99, PU_IA_AdditionsR99_t), -CSN_DESCR_END (Packet_Uplink_ImmAssignment_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(PD_IA_AdditionsR99_t) - M_UINT (PD_IA_AdditionsR99_t, EGPRS_WindowSize, 5), - M_UINT (PD_IA_AdditionsR99_t, LINK_QUALITY_MEASUREMENT_MODE, 2), - - M_NEXT_EXIST (PD_IA_AdditionsR99_t, Exist_BEP_PERIOD2, 1), - M_UINT (PD_IA_AdditionsR99_t, BEP_PERIOD2, 4), -CSN_DESCR_END (PD_IA_AdditionsR99_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(Packet_Downlink_ImmAssignment_t) - M_UINT (Packet_Downlink_ImmAssignment_t, TLLI, 32), - - M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TFI_to_TA_VALID, 6 + 1), - M_UINT (Packet_Downlink_ImmAssignment_t, TFI_ASSIGNMENT, 5), - M_UINT (Packet_Downlink_ImmAssignment_t, RLC_MODE, 1), - M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_ALPHA, 1), - M_UINT (Packet_Downlink_ImmAssignment_t, ALPHA, 4), - M_UINT (Packet_Downlink_ImmAssignment_t, GAMMA, 5), - M_UINT (Packet_Downlink_ImmAssignment_t, POLLING, 1), - M_UINT (Packet_Downlink_ImmAssignment_t, TA_VALID, 1), - - M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TIMING_ADVANCE_INDEX, 1), - M_UINT (Packet_Downlink_ImmAssignment_t, TIMING_ADVANCE_INDEX, 4), - - M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_TBF_STARTING_TIME, 1), - M_TYPE (Packet_Downlink_ImmAssignment_t, TBF_STARTING_TIME, StartingTime_t), - - M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_P0_PR_MODE, 3), - M_UINT (Packet_Downlink_ImmAssignment_t, P0, 4), - M_UINT (Packet_Downlink_ImmAssignment_t, BTS_PWR_CTRL_MODE, 1), - M_UINT (Packet_Downlink_ImmAssignment_t, PR_MODE, 1), - - M_NEXT_EXIST_OR_NULL_LH(Packet_Downlink_ImmAssignment_t, Exist_AdditionsR99, 1), - M_TYPE (Packet_Downlink_ImmAssignment_t, AdditionsR99, PD_IA_AdditionsR99_t), -CSN_DESCR_END (Packet_Downlink_ImmAssignment_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (Second_Part_Packet_Assignment_t) - M_NEXT_EXIST_OR_NULL_LH(Second_Part_Packet_Assignment_t, Exist_SecondPart, 2), - M_NEXT_EXIST (Second_Part_Packet_Assignment_t, Exist_ExtendedRA, 1), - M_UINT (Second_Part_Packet_Assignment_t, ExtendedRA, 5), -CSN_DESCR_END (Second_Part_Packet_Assignment_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(IA_PacketAssignment_UL_DL_t) - M_UNION (IA_PacketAssignment_UL_DL_t, 2), - M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Uplink_ImmAssignment, Packet_Uplink_ImmAssignment_t), - M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Downlink_ImmAssignment, Packet_Downlink_ImmAssignment_t), -CSN_DESCR_END (IA_PacketAssignment_UL_DL_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(IA_PacketAssignment_t) - M_UNION (IA_PacketAssignment_t, 2), - M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, IA_PacketAssignment_UL_DL_t), - M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, Second_Part_Packet_Assignment_t), -CSN_DESCR_END (IA_PacketAssignment_t) -#endif - /* <Packet Polling Request> */ static const CSN_ChoiceElement_t PacketPollingID[] = @@ -673,53 +308,6 @@ M_TYPE (PBCCH_present_t, PBCCH_Description, PBCCH_Description_t), CSN_DESCR_END (PBCCH_present_t)
-#if 0 -static const -CSN_DESCR_BEGIN(SI13_AdditionsR6) - M_NEXT_EXIST (SI13_AdditionsR6, Exist_LB_MS_TXPWR_MAX_CCH, 1), - M_UINT (SI13_AdditionsR6, LB_MS_TXPWR_MAX_CCH, 5), - M_UINT (SI13_AdditionsR6, SI2n_SUPPORT, 2), -CSN_DESCR_END (SI13_AdditionsR6) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(SI13_AdditionsR4) - M_UINT (SI13_AdditionsR4, SI_STATUS_IND, 1), - M_NEXT_EXIST_OR_NULL_LH (SI13_AdditionsR4, Exist_AdditionsR6, 1), - M_TYPE (SI13_AdditionsR4, AdditionsR6, SI13_AdditionsR6), -CSN_DESCR_END (SI13_AdditionsR4) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN(SI13_AdditionR99) - M_UINT (SI13_AdditionR99, SGSNR, 1), - M_NEXT_EXIST_OR_NULL_LH (SI13_AdditionR99, Exist_AdditionsR4, 1), - M_TYPE (SI13_AdditionR99, AdditionsR4, SI13_AdditionsR4), -CSN_DESCR_END (SI13_AdditionR99) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (SI_13_t) - M_THIS_EXIST_LH (SI_13_t), - - M_UINT (SI_13_t, BCCH_CHANGE_MARK, 3), - M_UINT (SI_13_t, SI_CHANGE_FIELD, 4), - - M_NEXT_EXIST (SI_13_t, Exist_MA, 2), - M_UINT (SI_13_t, SI13_CHANGE_MARK, 2), - M_TYPE (SI_13_t, GPRS_Mobile_Allocation, GPRS_Mobile_Allocation_t), - - M_UNION (SI_13_t, 2), - M_TYPE (SI_13_t, u.PBCCH_Not_present, PBCCH_Not_present_t), - M_TYPE (SI_13_t, u.PBCCH_present, PBCCH_present_t), - - M_NEXT_EXIST_OR_NULL_LH(SI_13_t, Exist_AdditionsR99, 1), - M_TYPE (SI_13_t, AdditionsR99, SI13_AdditionR99), -CSN_DESCR_END (SI_13_t) -#endif /************************************************************/ /* TS 44.060 messages */ /************************************************************/ @@ -4021,37 +3609,6 @@ M_TYPE (PMR_AdditionsR99_t, AdditionsR5, PMR_AdditionsR5_t), CSN_DESCR_END (PMR_AdditionsR99_t)
-#if 0 -static const -CSN_DESCR_BEGIN(EMR_ServingCell_t) - /*CSN_MEMBER_BIT (EMR_ServingCell_t, DTX_USED),*/ - M_UINT (EMR_ServingCell_t, DTX_USED, 1), - M_UINT (EMR_ServingCell_t, RXLEV_VAL, 6), - M_UINT (EMR_ServingCell_t, RX_QUAL_FULL, 3), - M_UINT (EMR_ServingCell_t, MEAN_BEP, 5), - M_UINT (EMR_ServingCell_t, CV_BEP, 3), - M_UINT (EMR_ServingCell_t, NBR_RCVD_BLOCKS, 5), -CSN_DESCR_END(EMR_ServingCell_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (EnhancedMeasurementReport_t) - M_UINT (EnhancedMeasurementReport_t, RR_Short_PD, 1), - M_UINT (EnhancedMeasurementReport_t, MESSAGE_TYPE, 5), - M_UINT (EnhancedMeasurementReport_t, ShortLayer2_Header, 2), - M_TYPE (EnhancedMeasurementReport_t, BA_USED, BA_USED_t), - M_UINT (EnhancedMeasurementReport_t, BSIC_Seen, 1), - M_UINT (EnhancedMeasurementReport_t, SCALE, 1), - M_NEXT_EXIST (EnhancedMeasurementReport_t, Exist_ServingCellData, 1), - M_TYPE (EnhancedMeasurementReport_t, ServingCellData, EMR_ServingCell_t), - M_REC_TARRAY (EnhancedMeasurementReport_t, RepeatedInvalid_BSIC_Info, RepeatedInvalid_BSIC_Info_t, - Count_RepeatedInvalid_BSIC_Info), - M_NEXT_EXIST (EnhancedMeasurementReport_t, Exist_ReportBitmap, 1), - M_VAR_TARRAY (EnhancedMeasurementReport_t, REPORTING_QUANTITY_Instances, REPORTING_QUANTITY_Instance_t, Count_REPORTING_QUANTITY_Instances), -CSN_DESCR_END (EnhancedMeasurementReport_t) -#endif - static const CSN_DESCR_BEGIN (Packet_Measurement_Report_t) /* Mac header */ @@ -4382,54 +3939,6 @@ M_PADDING_BITS(Packet_Serving_Cell_Data_t), CSN_DESCR_END (Packet_Serving_Cell_Data_t)
- -/* Enhanced Measurement Report */ -#if 0 -static const -CSN_DESCR_BEGIN (ServingCellData_t) - M_UINT (ServingCellData_t, RXLEV_SERVING_CELL, 6), - M_FIXED (ServingCellData_t, 1, 0), -CSN_DESCR_END (ServingCellData_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (Repeated_Invalid_BSIC_Info_t) - M_UINT (Repeated_Invalid_BSIC_Info_t, BCCH_FREQ_NCELL, 5), - M_UINT (Repeated_Invalid_BSIC_Info_t, BSIC, 6), - M_UINT (Repeated_Invalid_BSIC_Info_t, RXLEV_NCELL, 5), -CSN_DESCR_END (Repeated_Invalid_BSIC_Info_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (REPORTING_QUANTITY_t) - M_NEXT_EXIST (REPORTING_QUANTITY_t, Exist_REPORTING_QUANTITY, 1), - M_UINT (REPORTING_QUANTITY_t, REPORTING_QUANTITY, 6), -CSN_DESCR_END (REPORTING_QUANTITY_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (NC_MeasurementReport_t) - M_UINT (NC_MeasurementReport_t, NC_MODE, 1), - M_UNION (NC_MeasurementReport_t, 2), - M_TYPE (NC_MeasurementReport_t, u.BA_USED, BA_USED_t), - M_UINT (NC_MeasurementReport_t, u.PSI3_CHANGE_MARK, 2), - M_UINT (NC_MeasurementReport_t, PMO_USED, 1), - M_UINT (NC_MeasurementReport_t, SCALE, 1), - - M_NEXT_EXIST (NC_MeasurementReport_t, Exist_ServingCellData, 1), - M_TYPE (NC_MeasurementReport_t, ServingCellData, ServingCellData_t), - - M_REC_TARRAY (NC_MeasurementReport_t, Repeated_Invalid_BSIC_Info, Repeated_Invalid_BSIC_Info_t, Count_Repeated_Invalid_BSIC_Info), - - M_NEXT_EXIST (NC_MeasurementReport_t, Exist_Repeated_REPORTING_QUANTITY, 1), - M_VAR_TARRAY (NC_MeasurementReport_t, Repeated_REPORTING_QUANTITY, REPORTING_QUANTITY_t, Count_Repeated_Reporting_Quantity), -CSN_DESCR_END (NC_MeasurementReport_t) -#endif - - /*< Packet Handover Command message content > */ static const CSN_DESCR_BEGIN (GlobalTimeslotDescription_t) @@ -5159,98 +4668,6 @@ CSN_DESCR_END (PSI13_t) /*< End Packet System Information Type 13 message content >*/
-/* SI1_RestOctet_t */ - -#if 0 -static const -CSN_DESCR_BEGIN (SI1_RestOctet_t) - M_NEXT_EXIST_LH(SI1_RestOctet_t, Exist_NCH_Position, 1), - M_UINT (SI1_RestOctet_t, NCH_Position, 5), - - M_UINT_LH (SI1_RestOctet_t, BandIndicator, 1), -CSN_DESCR_END (SI1_RestOctet_t) -#endif - -/* SI3_Rest_Octet_t */ -#if 0 -static const -CSN_DESCR_BEGIN(Selection_Parameters_t) - M_UINT (Selection_Parameters_t, CBQ, 1), - M_UINT (Selection_Parameters_t, CELL_RESELECT_OFFSET, 6), - M_UINT (Selection_Parameters_t, TEMPORARY_OFFSET, 3), - M_UINT (Selection_Parameters_t, PENALTY_TIME, 5), -CSN_DESCR_END (Selection_Parameters_t) - -static const -CSN_DESCR_BEGIN (SI3_Rest_Octet_t) - M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_Selection_Parameters, 1), - M_TYPE (SI3_Rest_Octet_t, Selection_Parameters, Selection_Parameters_t), - - M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_Power_Offset, 1), - M_UINT (SI3_Rest_Octet_t, Power_Offset, 2), - - M_UINT_LH (SI3_Rest_Octet_t, System_Information_2ter_Indicator, 1), - M_UINT_LH (SI3_Rest_Octet_t, Early_Classmark_Sending_Control, 1), - - M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_WHERE, 1), - M_UINT (SI3_Rest_Octet_t, WHERE, 3), - - M_NEXT_EXIST_LH(SI3_Rest_Octet_t, Exist_GPRS_Indicator, 2), - M_UINT (SI3_Rest_Octet_t, RA_COLOUR, 3), - M_UINT (SI3_Rest_Octet_t, SI13_POSITION, 1), - - M_UINT_LH (SI3_Rest_Octet_t, ECS_Restriction3G, 1), - - M_NEXT_EXIST_LH(SI3_Rest_Octet_t, ExistSI2quaterIndicator, 1), - M_UINT (SI3_Rest_Octet_t, SI2quaterIndicator, 1), -CSN_DESCR_END (SI3_Rest_Octet_t) -#endif - -#if 0 -static const -CSN_DESCR_BEGIN (SI4_Rest_Octet_t) - M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_Selection_Parameters, 1), - M_TYPE (SI4_Rest_Octet_t, Selection_Parameters, Selection_Parameters_t), - - M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_Power_Offset, 1), - M_UINT (SI4_Rest_Octet_t, Power_Offset, 2), - - M_NEXT_EXIST_LH(SI4_Rest_Octet_t, Exist_GPRS_Indicator, 2), - M_UINT (SI4_Rest_Octet_t, RA_COLOUR, 3), - M_UINT (SI4_Rest_Octet_t, SI13_POSITION, 1), -CSN_DESCR_END (SI4_Rest_Octet_t) -#endif - -/* SI6_RestOctet_t */ - -#if 0 -static const -CSN_DESCR_BEGIN(PCH_and_NCH_Info_t) - M_UINT (PCH_and_NCH_Info_t, PagingChannelRestructuring, 1), - M_UINT (PCH_and_NCH_Info_t, NLN_SACCH, 2), - - M_NEXT_EXIST (PCH_and_NCH_Info_t, Exist_CallPriority, 1), - M_UINT (PCH_and_NCH_Info_t, CallPriority, 3), - - M_UINT (PCH_and_NCH_Info_t, NLN_Status, 1), -CSN_DESCR_END (PCH_and_NCH_Info_t) - -static const -CSN_DESCR_BEGIN (SI6_RestOctet_t) - M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_PCH_and_NCH_Info, 1), - M_TYPE (SI6_RestOctet_t, PCH_and_NCH_Info, PCH_and_NCH_Info_t), - - M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_VBS_VGCS_Options, 1), - M_UINT (SI6_RestOctet_t, VBS_VGCS_Options, 2), - - M_NEXT_EXIST_LH(SI6_RestOctet_t, Exist_DTM_Support, 2), - M_UINT (SI6_RestOctet_t, RAC, 8), - M_UINT (SI6_RestOctet_t, MAX_LAPDm, 3), - - M_UINT_LH (SI6_RestOctet_t, BandIndicator, 1), -CSN_DESCR_END (SI6_RestOctet_t) -#endif - /* EGPRS Packet Channel Request (see 3GPP TS 44.060, table 11.2.5a.2) */ static const CSN_DESCR_BEGIN(PacketChannelRequest_MC5P2RB3_t) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8096ca5..bcde16f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = \ - rlcmac \ + ts_44_060 \ $(NULL)
# The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/testsuite.at b/tests/testsuite.at index 4669a00..1aee874 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -1,9 +1,9 @@ AT_INIT AT_BANNER([Regression tests])
-AT_SETUP([rlcmac]) -AT_KEYWORDS([rlcmac]) -cat $abs_srcdir/rlcmac/RLCMACTest.ok > expout -cat $abs_srcdir/rlcmac/RLCMACTest.err > experr -AT_CHECK([$abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [experr]) +AT_SETUP([rlcmac/ts_44_060]) +AT_KEYWORDS([rlcmac ts_44_060]) +cat $abs_srcdir/ts_44_060/ts_44_060_test.ok > expout +cat $abs_srcdir/ts_44_060/ts_44_060_test.err > experr +AT_CHECK([$abs_top_builddir/tests/ts_44_060/ts_44_060_test], [0], [expout], [experr]) AT_CLEANUP diff --git a/tests/rlcmac/Makefile.am b/tests/ts_44_060/Makefile.am similarity index 70% rename from tests/rlcmac/Makefile.am rename to tests/ts_44_060/Makefile.am index 633f090..fb953e3 100644 --- a/tests/rlcmac/Makefile.am +++ b/tests/ts_44_060/Makefile.am @@ -9,16 +9,16 @@ $(NULL)
check_PROGRAMS = \ - RLCMACTest \ + ts_44_060_test \ $(NULL)
EXTRA_DIST = \ - RLCMACTest.ok \ - RLCMACTest.err \ + ts_44_060_test.ok \ + ts_44_060_test.err \ $(NULL)
-RLCMACTest_SOURCES = RLCMACTest.c -RLCMACTest_LDADD = \ +ts_44_060_test_SOURCES = ts_44_060_test.c +ts_44_060_test_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(top_builddir)/src/csn1/libosmo-csn1.la \ $(top_builddir)/src/rlcmac/libosmo-gprs-rlcmac.la \ diff --git a/tests/rlcmac/RLCMACTest.c b/tests/ts_44_060/ts_44_060_test.c similarity index 100% rename from tests/rlcmac/RLCMACTest.c rename to tests/ts_44_060/ts_44_060_test.c diff --git a/tests/rlcmac/RLCMACTest.err b/tests/ts_44_060/ts_44_060_test.err similarity index 100% rename from tests/rlcmac/RLCMACTest.err rename to tests/ts_44_060/ts_44_060_test.err diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/ts_44_060/ts_44_060_test.ok similarity index 100% rename from tests/rlcmac/RLCMACTest.ok rename to tests/ts_44_060/ts_44_060_test.ok