diff options
author | sswsdev <sswsdev@gmail.com> | 2017-05-19 12:28:36 +0300 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-05-20 16:32:00 +0000 |
commit | 6abff3174bb1b62744a91e18d28c95d877a44aa0 (patch) | |
tree | eb506908e71fedf57c5dda4c85061993308bff39 /epan/dissectors/packet-umts_fp.h | |
parent | d061a7d50e2750011ff1ccc0fd297f5bae606ef1 (diff) |
UMTS FP: Refactored FP Conversation Info struct
Moved some fields which are only relevant to HS-DSCH / E-DCH channel into appropriate 'channel specific' structs.
Also renamed "dchs_in_flow_list" to "dch_ids_in_flow_list"
Change-Id: I7bdeb74c7b1eda0872c0243f0e5f229df2691866
Reviewed-on: https://code.wireshark.org/review/21707
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-umts_fp.h')
-rw-r--r-- | epan/dissectors/packet-umts_fp.h | 187 |
1 files changed, 110 insertions, 77 deletions
diff --git a/epan/dissectors/packet-umts_fp.h b/epan/dissectors/packet-umts_fp.h index 551234da10..bd7b6f4e76 100644 --- a/epan/dissectors/packet-umts_fp.h +++ b/epan/dissectors/packet-umts_fp.h @@ -46,6 +46,13 @@ #define CHANNEL_HSDSCH_COMMON_T3 20 #define CHANNEL_EDCH_COMMON 21 + +/* Constants */ +#define MAX_FP_CHANS 64 +#define MAX_EDCH_DDIS 16 +#define MAX_NUM_HSDHSCH_MACDFLOW 8 +#define FP_maxNrOfTFs 32 /* From NBAC-Constants.asn */ + enum fp_interface_type { IuB_Interface, @@ -82,63 +89,6 @@ enum fp_rlc_mode { }; -/* Information about the Paging Indication Bitmap seen in a specific PCH frame*/ -typedef struct paging_indications_info_t -{ - guint32 frame_number; - guint8* paging_indications_bitmap; -} paging_indications_info_t; - -/* Info attached to each FP packet */ -typedef struct fp_info -{ - enum fp_interface_type iface_type; - enum division_type division; - guint8 release; /* e.g. 99, 4, 5, 6, 7 */ - guint16 release_year; /* e.g. 2001 */ - guint8 release_month; /* e.g. 12 for December */ - gboolean is_uplink; - gint channel; /* see Channel types definitions above */ - guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */ - gint num_chans; -#define MAX_FP_CHANS 64 - gint chan_tf_size[MAX_FP_CHANS]; - gint chan_num_tbs[MAX_FP_CHANS]; - -#define MAX_EDCH_DDIS 16 - gint no_ddi_entries; - guint8 edch_ddi[MAX_EDCH_DDIS]; - guint edch_macd_pdu_size[MAX_EDCH_DDIS]; - - guint edch_lchId[MAX_EDCH_DDIS]; /* Logical Channel Id for E-DCH*/ - - guint8 edch_type; /* 1 means T2 */ - - gint cur_tb; /* current transport block (required for dissecting of single TBs */ - gint cur_chan; /* current channel, required to retrieve the correct channel configuration for UMTS MAC */ - gint com_context_id; /* Identifies a single UE in the network */ - guint16 srcport, destport; - - /* PCH Related data*/ - gint paging_indications; - paging_indications_info_t* relevant_paging_indications; /* Info from previous frame */ - /* Info from the current frame. Used to carry information from this frame to the converstaion info */ - paging_indications_info_t* current_paging_indications; - - /* HSDSCH Related data */ - enum fp_hsdsch_entity hsdsch_entity; - gint hsdsch_macflowd_id; -#define MAX_NUM_HSDHSCH_MACDFLOW 8 - gboolean hsdhsch_macfdlow_is_mux[MAX_NUM_HSDHSCH_MACDFLOW]; - enum fp_link_type link_type; - guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/ - - gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ -} fp_info; - -/* From NBAC-Constants.asn */ -#define FP_maxNrOfTFs 32 - typedef struct { gint num_ul_chans; @@ -150,6 +100,13 @@ typedef struct } fp_dch_channel_info_t; + +/****************************************/ +/* Channel Specific Information Structs */ + +/****************/ +/* FACH Structs */ + typedef struct fp_crnti_allocation_info_t { guint32 alloc_frame_number; /* Frame where C-RNTI was allocated */ @@ -164,6 +121,10 @@ typedef struct fp_fach_channel_info_t wmem_tree_t* crnti_to_urnti_map; /* Mapping between C-RNTIs and U-RNTIs using them in this FACH */ } fp_fach_channel_info_t; + +/****************/ +/* RACH Structs */ + /* Used in the 'channel_specific_info' field for RACH channels */ typedef struct fp_rach_channel_info_t { @@ -172,6 +133,17 @@ typedef struct fp_rach_channel_info_t wmem_tree_t* crnti_to_urnti_map; /* Mapping between C-RNTIs and U-RNTIs using them in this RACH */ } fp_rach_channel_info_t; + +/****************/ +/* PCH Structs */ + +/* Information about the Paging Indication Bitmap seen in a specific PCH frame*/ +typedef struct paging_indications_info_t +{ + guint32 frame_number; + guint8* paging_indications_bitmap; +} paging_indications_info_t; + /* Used in the 'channel_specific_info' field for PCH channels */ typedef struct fp_pch_channel_info_t { @@ -181,15 +153,49 @@ typedef struct fp_pch_channel_info_t paging_indications_info_t* last_paging_indication_info; } fp_pch_channel_info_t; + +/*****************/ +/* E-DCH Structs */ + +/* Used in the 'channel_specific_info' field for E-DCH channels */ +typedef struct fp_edch_channel_info_t +{ + gint no_ddi_entries; + guint8 edch_ddi[MAX_EDCH_DDIS]; + guint edch_macd_pdu_size[MAX_EDCH_DDIS]; + guint8 edch_lchId[MAX_EDCH_DDIS]; + guint8 edch_type; /* 1 means T2 */ +} fp_edch_channel_info_t; + + +/*******************/ +/* HS-DSCH Structs */ + +/* Used in the 'channel_specific_info' field for HS-DSCH channels */ +typedef struct fp_hsdsch_channel_info_t +{ + enum fp_hsdsch_entity hsdsch_entity; + guint8 common_macdflow_id; + guint8 hsdsch_macdflow_id; + guint hrnti; /*Used for tracking a HS-DSCH flow*/ +} fp_hsdsch_channel_info_t; + + +/************************/ +/* FP Conversation Data */ + typedef struct { enum fp_interface_type iface_type; enum division_type division; gint channel; /* see Channel types definitions above */ + enum fp_rlc_mode rlc_mode; guint32 dl_frame_number; /* the frame where this conversation is started from CRNC */ guint32 ul_frame_number; /* the frame where this conversation is started from Node B */ address crnc_address; guint16 crnc_port; + + guint urnti; /* Identifies a single UE in the UTRAN. Used for tracking it's RLC session across different transport channels */ gint com_context_id; /* Identifies a single UE in all NBAP messages */ guint32 scrambling_code; /* Identifies a single UE's radio transmissions in the UTRAN */ @@ -197,36 +203,63 @@ typedef struct /* DCH's in this flow */ gint num_dch_in_flow; - gint dchs_in_flow_list[FP_maxNrOfTFs]; - - guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */ - enum fp_rlc_mode rlc_mode; - + gint dch_ids_in_flow_list[FP_maxNrOfTFs]; /* DCH type channel data */ fp_dch_channel_info_t fp_dch_channel_info[FP_maxNrOfTFs]; + guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */ + + gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ + guint32 cfn; + guint32 cfn_index; + +} umts_fp_conversation_info_t; + + +/********************************/ +/* FP Packet Data */ +/* (attached to each FP packet) */ +typedef struct fp_info +{ + enum fp_interface_type iface_type; + enum division_type division; + guint8 release; /* e.g. 99, 4, 5, 6, 7 */ + guint16 release_year; /* e.g. 2001 */ + guint8 release_month; /* e.g. 12 for December */ + gboolean is_uplink; + gint channel; /* see Channel types definitions above */ + guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */ + gint num_chans; + gint chan_tf_size[MAX_FP_CHANS]; + gint chan_num_tbs[MAX_FP_CHANS]; - /* E-DCH related data */ gint no_ddi_entries; guint8 edch_ddi[MAX_EDCH_DDIS]; guint edch_macd_pdu_size[MAX_EDCH_DDIS]; - guint8 edch_lchId[MAX_EDCH_DDIS]; - guint8 edch_type; /* 1 means T2 */ - /* HSDSCH Related data */ - enum fp_hsdsch_entity hsdsch_entity; - guint8 hsdsch_macdflow_id; + guint edch_lchId[MAX_EDCH_DDIS]; /* Logical Channel Id for E-DCH*/ - guint8 hsdsch_num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; + guint8 edch_type; /* 1 means T2 */ - /*HSDSCH Common related data*/ - guint8 common_macdflow_id; + gint cur_tb; /* current transport block (required for dissecting of single TBs */ + gint cur_chan; /* current channel, required to retrieve the correct channel configuration for UMTS MAC */ + gint com_context_id; /* Identifies a single UE in the network */ + guint16 srcport, destport; - guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/ - guint hrnti; /*Used for tracking a HS-DSCH flow*/ - gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ - guint32 cfn; - guint32 cfn_index; -} umts_fp_conversation_info_t; + /* PCH Related data*/ + gint paging_indications; + paging_indications_info_t* relevant_paging_indications; /* Info from previous frame */ + /* Info from the current frame. Used to carry information from this frame to the converstaion info */ + paging_indications_info_t* current_paging_indications; + + /* HSDSCH Related data */ + enum fp_hsdsch_entity hsdsch_entity; + gint hsdsch_macflowd_id; + gboolean hsdhsch_macfdlow_is_mux[MAX_NUM_HSDHSCH_MACDFLOW]; + enum fp_link_type link_type; + guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/ + + gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/ +} fp_info; void set_umts_fp_conv_data(conversation_t *conversation, umts_fp_conversation_info_t *umts_fp_conversation_info); |