DVB-RCS2: Added TIM, TMST, TDT and TBTP2 dissection

Change-Id: Ic53007e4237c9e5f6b3e7b1218d63f5fd9074165
Reviewed-on: https://code.wireshark.org/review/37588
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Paul Chambon 2016-09-23 18:08:11 +02:00 committed by Anders Broman
parent faeefc9d59
commit 0c5b81c641
1 changed files with 442 additions and 30 deletions

View File

@ -38,7 +38,7 @@ void proto_reg_handoff_dvb_s2_table(void);
#define DVB_S2_RCS_TABLE_DECODING 0
#define DVB_S2_RCS2_TABLE_DECODING 1
static gint dvb_s2_rcs_version = 0;
static gint dvb_s2_rcs_version = DVB_S2_RCS2_TABLE_DECODING;
/* Initialize the protocol and registered fields */
static int proto_dvb_s2_table = -1;
@ -63,6 +63,25 @@ static int hf_dvb_s2_table_smt_section_length = -1;
static int hf_dvb_s2_table_smt_esn0 = -1;
static int hf_dvb_s2_table_smt_modcod = -1;
/* DSM-CC header */
static int hf_dvb_s2_section_syntax_indic = -1;
static int hf_dvb_s2_private_indicator = -1;
static int hf_dvb_s2_reserved_1 = -1;
static int hf_dvb_s2_section_length = -1;
static int hf_dvb_s2_mac_addres_6 = -1;
static int hf_dvb_s2_mac_addres_5 = -1;
static int hf_dvb_s2_mac_addres_4 = -1;
static int hf_dvb_s2_mac_addres_3 = -1;
static int hf_dvb_s2_mac_addres_2 = -1;
static int hf_dvb_s2_mac_addres_1 = -1;
static int hf_dvb_s2_reserved_2 = -1;
static int hf_dvb_s2_payload_scrambling_control = -1;
static int hf_dvb_s2_address_scrambling_control = -1;
static int hf_dvb_s2_LLC_SNAP_flag = -1;
static int hf_dvb_s2_current_next_indicator = -1;
static int hf_dvb_s2_section_number = -1;
static int hf_dvb_s2_last_section_number = -1;
/* SCT */
static int hf_dvb_s2_table_superframe_loop_count = -1;
static int hf_dvb_s2_table_superframe = -1;
@ -85,6 +104,21 @@ static int hf_dvb_s2_table_rcst_status = -1;
static int hf_dvb_s2_table_network_status = -1;
static int hf_dvb_s2_table_desc_loop_count = -1;
static int hf_dvb_s2_table_pad_bytes = -1;
/* TBTP */
static int hf_dvb_s2_tbtp_group_id = -1;
static int hf_dvb_s2_tbtp_superframe_count = -1;
static int hf_dvb_s2_tbtp_frame_loop_count = -1;
static int hf_dvb_s2_tbtp_sf_frame = -1;
static int hf_dvb_s2_tbtp_frame_number = -1;
static int hf_dvb_s2_tbtp_btb_loop_count = -1;
static int hf_dvb_s2_tbtp_btp = -1;
static int hf_dvb_s2_tbtp_multiple_channel_flag = -1;
static int hf_dvb_s2_tbtp_assignment_type = -1;
static int hf_dvb_s2_tbtp_frame_vbdc_queue_empty_flag = -1;
static int hf_dvb_s2_tbtp_start_slot = -1;
static int hf_dvb_s2_tbtp_channel_id = -1;
static int hf_dvb_s2_tbtp_logon_id = -1;
static int hf_dvb_s2_tbtp_assignment_count = -1;
/* TBTP2 */
static int hf_dvb_s2_table_group_id = -1;
static int hf_dvb_s2_table_assign_context = -1;
@ -218,6 +252,13 @@ static int hf_dvb_s2_table_multiplex_forward_multiplex = -1;
static int hf_dvb_s2_table_multiplex_reward_multiplex = -1;
static int hf_dvb_s2_table_multiplex_original_network_id = -1;
static int hf_dvb_s2_table_multiplex_transport_descriptors_length = -1;
/* TDT */
static int hf_dvb_s2_reserved_future_use = -1;
static int hf_dvb_s2_reserved_tdt = -1;
static int hf_dvb_s2_tdt_date = -1;
static int hf_dvb_s2_tdt_hour = -1;
static int hf_dvb_s2_tdt_minute = -1;
static int hf_dvb_s2_tdt_second = -1;
/* MMT2 */
static int hf_dvb_s2_table_svn_number = -1;
static int hf_dvb_s2_table_svn_prefix_size = -1;
@ -350,6 +391,8 @@ static gint ett_dvb_s2_hdr_table_multiplex = -1;
static gint ett_dvb_s2_hdr_table_pt = -1;
static gint ett_dvb_s2_hdr_table_pt_ms = -1;
static gint ett_dvb_s2_hdr_table_pt_ms_exclusion = -1;
static gint ett_dvb_s2_hdr_tbtp_frame = -1;
static gint ett_dvb_s2_hdr_tbtp_frame_btp = -1;
static const value_string table_modcods[] = {
{ 0, "DUMMY PLFRAME"},
@ -395,6 +438,15 @@ static const value_string table_modcods[] = {
#define DVB_S2_TABLE_VERSION_NUMBER_MASK 0x3E
#define DVB_S2_TABLE_CURRENT_NEXT_INDICATOR_MASK 0x01
#define DVB_S2_TABLE_SECTION_SYNTAX_INDIC_MASK 0x80
#define DVB_S2_TABLE_PRIVATE_INDICATOR_MASK 0x40
#define DVB_S2_TABLE_RESERVED_ONE_MASK 0x30
#define DVB_S2_TABLE_SECTION_LENGTH_MASK 0x0FFF
#define DVB_S2_TABLE_RESERVED_TWO_MASK 0xC0
#define DVB_S2_TABLE_PAYLOAD_SCRAMBLING_MASK 0x30
#define DVB_S2_TABLE_ADDRESS_SCRAMBLING_MASK 0x0C
#define DVB_S2_TABLE_LLC_SNAP_MASK 0x02
#define DVB_S2_TABLE_SMT_SECTION_INDICATOR_MASK 0x8000
#define DVB_S2_TABLE_SMT_FUTUR_USE_MASK 0x4000
#define DVB_S2_TABLE_SMT_RESERVED_MASK 0x3000
@ -405,6 +457,12 @@ static const value_string table_modcods[] = {
#define DVB_S2_TABLE_SCT_START_TIME_BASE_MASK 0x8000
#define DVB_S2_TABLE_SCT_START_TIME_EXT_MASK 0x01FF
#define DVB_S2_TABLE_SCT_FRAME_LOOP_COUNT_MASK 0x1F
#define DVB_S2_TABLE_TBTP_BTP_LOOP_COUNT_MASK 0x07FF
#define DVB_S2_TABLE_TBTP_FRAME_NUMBER_MASK 0x1F
#define DVB_S2_TABLE_TBTP_MULTIPLE_CHANNEL_FLAG_MASK 0x80
#define DVB_S2_TABLE_TBTP_ASSIGNMENT_TYPE_MASK 0x60
#define DVB_S2_TABLE_TBTP_VBDC_FLAG_MASK 0x10
#define DVB_S2_TABLE_TBTP_START_SLOT_MASK 0x07FF
#define DVB_S2_TABLE_FRAME_TYPE_SECTION_FAM_MASK 0xC
#define DVB_S2_TABLE_FRAME_ID_TOT_TIME_COUNT_MASK 0x07FF
@ -485,7 +543,7 @@ static const value_string table_modcods[] = {
#define DVB_S2_TABLE_NIT 0x40
#define DVB_S2_TABLE_RMT 0x41
#define DVB_S2_TABLE_SDT 0x42
#define DVB_S2_TABLE_DTD 0x70
#define DVB_S2_TABLE_TDT 0x70
#define DVB_S2_TABLE_SCT 0xA0
#define DVB_S2_TABLE_FCT 0xA1
#define DVB_S2_TABLE_TCT 0xA2
@ -512,7 +570,7 @@ static const value_string tabletype[] = {
{DVB_S2_TABLE_NIT, "NIT"}, /**< Network Information Table */
{DVB_S2_TABLE_RMT, "RMT"}, /**< RCS Mapping Table */
{DVB_S2_TABLE_SDT, "SDT"}, /**< Service Description Table */
{DVB_S2_TABLE_DTD, "DTD"}, /**< Time and Date Table */
{DVB_S2_TABLE_TDT, "TDT"}, /**< Time and Date Table */
{DVB_S2_TABLE_SCT, "SCT"}, /**< Superframe Composition Table */
{DVB_S2_TABLE_FCT, "FCT"}, /**< Frame Composition Table */
{DVB_S2_TABLE_TCT, "TCT"}, /**< Timeslot Composition Table*/
@ -978,10 +1036,6 @@ static int dissect_dvb_s2_table_tim(tvbuff_t *tvb, int cur_off, proto_tree *dvb_
int desc_loop_count, new_off = 0;
int pad_bytes_length = 0;
/* compensate private header format for RCS */
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
new_off += 4;
if(isUnicast)
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_rcst_status, tvb, cur_off + new_off, 1, ENC_NA);
else
@ -1000,7 +1054,7 @@ static int dissect_dvb_s2_table_tim(tvbuff_t *tvb, int cur_off, proto_tree *dvb_
if(new_off != (table_len - DVB_S2_TABLE_HEADER_RCS2_LEN))
pad_bytes_length = table_len - DVB_S2_TABLE_HEADER_RCS2_LEN - new_off;
if(pad_bytes_length > 0)
if(pad_bytes_length > 0 && isUnicast)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_pad_bytes, tvb, cur_off + new_off, pad_bytes_length, ENC_NA);
new_off += pad_bytes_length;
@ -1015,6 +1069,65 @@ static int dissect_dvb_s2_table_tim(tvbuff_t *tvb, int cur_off, proto_tree *dvb_
return new_off;
}
static int dissect_dvb_s2_table_tbtp(tvbuff_t *tvb, int cur_off, proto_tree *dvb_s2_hdr_table_tree, guint16 table_len)
{
int frame_loop_count, frame_start_offset, btp_start_offset, cur_frame, btp_loop_count, btp, new_off = 0;
guint8 multiple_channel_flag = 0;
proto_item *ti, *tf;
proto_tree *dvb_s2_hdr_tbtp_frame_tree, *dvb_s2_hdr_tbtp_frame_btp_tree;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tbtp_group_id, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tbtp_superframe_count, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
frame_loop_count = tvb_get_guint8(tvb, cur_off + new_off) & DVB_S2_TABLE_SCT_FRAME_LOOP_COUNT_MASK;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tbtp_frame_loop_count, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
for(cur_frame=0 ; cur_frame<=frame_loop_count ; cur_frame++)
{
frame_start_offset = new_off;
ti = proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tbtp_sf_frame, tvb, cur_off + new_off, -1, ENC_NA);
dvb_s2_hdr_tbtp_frame_tree = proto_item_add_subtree(ti, ett_dvb_s2_hdr_tbtp_frame);
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_tree, hf_dvb_s2_tbtp_frame_number, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
btp_loop_count = tvb_get_ntohs(tvb, cur_off + new_off) & DVB_S2_TABLE_TBTP_BTP_LOOP_COUNT_MASK;
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_tree, hf_dvb_s2_tbtp_btb_loop_count, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
for(btp=0 ; btp<=btp_loop_count ; btp++)
{
btp_start_offset = new_off;
tf = proto_tree_add_item(dvb_s2_hdr_tbtp_frame_tree, hf_dvb_s2_tbtp_btp, tvb, cur_off + new_off, -1, ENC_NA);
dvb_s2_hdr_tbtp_frame_btp_tree = proto_item_add_subtree(tf, ett_dvb_s2_hdr_tbtp_frame_btp);
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_logon_id, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
multiple_channel_flag = tvb_get_guint8(tvb, cur_off + new_off) & 0x80;
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_multiple_channel_flag, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_assignment_type, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_frame_vbdc_queue_empty_flag, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_start_slot, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
if (multiple_channel_flag) {
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_channel_id, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}
proto_tree_add_item(dvb_s2_hdr_tbtp_frame_btp_tree, hf_dvb_s2_tbtp_assignment_count, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_item_set_len(tf, new_off - btp_start_offset);
}
proto_item_set_len(ti, new_off - frame_start_offset);
}
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_crc32, tvb, cur_off + new_off, 4, ENC_NA);
new_off += 4;
}
return (table_len - DVB_S2_TABLE_HEADER_RCS2_LEN);
}
static int dissect_dvb_s2_table_tbtp2(tvbuff_t *tvb, int cur_off, proto_tree *dvb_s2_hdr_table_tree, guint16 table_len)
{
int frame_loop_count, frame_start_offset, assign_start_offset, cur_frame, cur_assign, new_off = 0;
@ -1131,6 +1244,34 @@ static int dissect_dvb_s2_table_cmt(tvbuff_t *tvb, int cur_off, proto_tree *dvb_
return new_off;
}
static int dissect_dvb_s2_table_tmst(tvbuff_t *tvb, int cur_off, proto_tree *dvb_s2_hdr_table_tree)
{
int txmode_count, cur_txmode, new_off = 0;
proto_item *ti;
proto_tree *dvb_s2_hdr_table_txmode_tree;
txmode_count = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_tx_mode_count, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
for(cur_txmode=0 ; cur_txmode<txmode_count ; cur_txmode++)
{
ti = proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_tx_mode, tvb, cur_off + new_off, DVB_S2_TABLE_TX_MODE_SIZE, ENC_NA);
dvb_s2_hdr_table_txmode_tree = proto_item_add_subtree(ti, ett_dvb_s2_hdr_table_txmode);
proto_tree_add_item(dvb_s2_hdr_table_txmode_tree, hf_dvb_s2_table_tx_mode_frame_length, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_txmode_tree, hf_dvb_s2_table_tx_mode_pilot_symbols, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_txmode_tree, hf_dvb_s2_table_tx_mode_modcod, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_crc32, tvb, cur_off + new_off, 4, ENC_NA);
new_off += 4;
}
return new_off;
}
static int dissect_dvb_s2_table_tmst2(tvbuff_t *tvb, int cur_off, proto_tree *dvb_s2_hdr_table_tree)
{
int txmode_count, cur_txmode, new_off = 0;
@ -1655,6 +1796,12 @@ static int dissect_dvb_s2_table(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
int cur_off = 0;
guint16 data_len = 0;
guint8 table_id = 0;
guint8 mac_1 = 0;
guint8 mac_2 = 0;
guint8 mac_3 = 0;
guint8 mac_4 = 0;
guint8 mac_5 = 0;
guint8 mac_6 = 0;
gboolean dvb_s2_isUnicast = TRUE;
proto_item *ti = NULL;
@ -1668,29 +1815,97 @@ static int dissect_dvb_s2_table(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_id, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_section, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_private, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_reserved, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_msb_len, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_lsb_len, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}
/* parse GSE table structure header for all RCS2 tables */
if (dvb_s2_rcs_version == DVB_S2_RCS2_TABLE_DECODING) {
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_network_interactive_id, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_reserved2, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_version_number, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_current_next_indicator, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_section_number, tvb, cur_off + new_off, 1, ENC_NA);
if (table_id == DVB_S2_TABLE_TDT) {
/* parse TDT */
/* parse DSM-CC header only for RCS */
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING) {
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_section_syntax_indic, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_reserved_future_use, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_reserved_tdt, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_section_length, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 2;
}
/* parse the TDT table itself for both RCS and RCS2 */
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tdt_date, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tdt_hour, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_last_section_number, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tdt_minute, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_tdt_second, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}else if (table_id == DVB_S2_TABLE_TIM && dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING) {
/* parse TIMu with DSM-CC header only for RCS */
/* parse DSM-CC header */
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_section_syntax_indic, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_private_indicator, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_reserved_1, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_section_length , tvb, cur_off + new_off, 2, ENC_NA);
new_off +=2;
mac_6 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_6 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
mac_5 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_5 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_reserved_2, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_payload_scrambling_control, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_address_scrambling_control, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_LLC_SNAP_flag, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_current_next_indicator, tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_section_number , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_last_section_number , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
mac_4 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_4 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
mac_3 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_3 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
mac_2 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_2 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
mac_1 = tvb_get_guint8(tvb, cur_off + new_off);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_mac_addres_1 , tvb, cur_off + new_off, 1, ENC_NA);
new_off +=1;
if ((mac_1 == 0xff) && (mac_2 == 0xff) && (mac_3 == 0xff) && (mac_4 == 0xff) && (mac_5 == 0xff) && (mac_6 == 0xff)) {
table_id = DVB_S2_TABLE_TIMB;
}
} else {
/* parse SI section header only for RCS tables
* (except TIMu and TDT that use DSM-CC instead) */
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
{
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_section, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_private, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_reserved, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_msb_len, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_lsb_len, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_network_interactive_id, tvb, cur_off + new_off, 2, ENC_NA);
new_off += 2;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_reserved2, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_version_number, tvb, cur_off + new_off, 1, ENC_NA);
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_current_next_indicator, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_section_number, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
proto_tree_add_item(dvb_s2_hdr_table_tree, hf_dvb_s2_table_last_section_number, tvb, cur_off + new_off, 1, ENC_NA);
new_off += 1;
}
}
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
@ -1705,12 +1920,18 @@ static int dissect_dvb_s2_table(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
case DVB_S2_TABLE_SCT:
dissect_dvb_s2_table_sct(tvb, cur_off + new_off, dvb_s2_hdr_table_tree);
break;
case DVB_S2_TABLE_TIMB:
dissect_dvb_s2_table_tim(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, data_len, !dvb_s2_isUnicast);
break;
case DVB_S2_TABLE_TIM:
dissect_dvb_s2_table_tim(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, data_len, dvb_s2_isUnicast);
break;
case DVB_S2_TABLE_TBTP2:
dissect_dvb_s2_table_tbtp2(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, data_len);
break;
case DVB_S2_TABLE_TBTP:
dissect_dvb_s2_table_tbtp(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, data_len);
break;
case DVB_S2_TABLE_CMT:
dissect_dvb_s2_table_cmt(tvb, cur_off + new_off, dvb_s2_hdr_table_tree);
break;
@ -1723,6 +1944,9 @@ static int dissect_dvb_s2_table(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
case DVB_S2_TABLE_TMST2:
dissect_dvb_s2_table_tmst2(tvb, cur_off + new_off, dvb_s2_hdr_table_tree);
break;
case DVB_S2_TABLE_TMST:
dissect_dvb_s2_table_tmst(tvb, cur_off + new_off, dvb_s2_hdr_table_tree);
break;
case DVB_S2_TABLE_TCTE:
if (dvb_s2_rcs_version == DVB_S2_RCS2_TABLE_DECODING)
{
@ -1737,25 +1961,21 @@ static int dissect_dvb_s2_table(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
break;
case DVB_S2_TABLE_NIT:
case DVB_S2_TABLE_RMT:
if (dvb_s2_rcs_version == DVB_S2_RCS2_TABLE_DECODING)
{
dissect_dvb_s2_table_nit_rmt(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, table_id);
}
dissect_dvb_s2_table_nit_rmt(tvb, cur_off + new_off, dvb_s2_hdr_table_tree, table_id);
break;
case DVB_S2_TABLE_MMT2:
dissect_dvb_s2_table_mmt2(tvb, cur_off + new_off, dvb_s2_hdr_table_tree);
break;
case DVB_S2_TABLE_TDT:
/* already parsed above */
break;
case DVB_S2_TABLE_PAT:
case DVB_S2_TABLE_CAT:
case DVB_S2_TABLE_PMT:
case DVB_S2_TABLE_SDT:
case DVB_S2_TABLE_DTD:
case DVB_S2_TABLE_TCT:
case DVB_S2_TABLE_TBTP:
case DVB_S2_TABLE_PCR:
case DVB_S2_TABLE_TMST:
case DVB_S2_TABLE_MMT:
case DVB_S2_TABLE_TIMB:
break;
}
if (dvb_s2_rcs_version == DVB_S2_RCS_TABLE_DECODING)
@ -1868,6 +2088,94 @@ void proto_register_dvb_s2_table(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
/* DSM-CC */
{&hf_dvb_s2_section_syntax_indic, {
"Table section syntax indicator", "dvb-s2_table.section_syntax_indic",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_SECTION_SYNTAX_INDIC_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_private_indicator, {
"Table private indicator", "dvb-s2_table.private_indicator",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_PRIVATE_INDICATOR_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_reserved_1, {
"Table reserved field 1", "dvb-s2_table.reserved_1",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_RESERVED_ONE_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_section_length, {
"Table section length", "dvb-s2_table.section_length",
FT_UINT16, BASE_DEC, NULL, DVB_S2_TABLE_SECTION_LENGTH_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_6, {
"Table mac adress 6", "dvb-s2_table.mac_address_6",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_5, {
"Table mac adress 5", "dvb-s2_table.mac_address_5",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_4, {
"Table mac adress 4", "dvb-s2_table.mac_address_4",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_3, {
"Table mac adress 3", "dvb-s2_table.mac_address_3",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_2, {
"Table mac adress 2", "dvb-s2_table.mac_address_2",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_mac_addres_1, {
"Table mac adress 1", "dvb-s2_table.mac_address_1",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_reserved_2, {
"Table reserved field 2", "dvb-s2_table.reserved_2",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_RESERVED_TWO_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_payload_scrambling_control, {
"Table payload scrambling control", "dvb-s2_table.payload_scrambling_control",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_PAYLOAD_SCRAMBLING_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_address_scrambling_control, {
"Table address scrambling control", "dvb-s2_table.address_scrambling_control",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_ADDRESS_SCRAMBLING_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_LLC_SNAP_flag, {
"Table LLC SNAP flag", "dvb-s2_table.LLC_SNAP_flag",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_LLC_SNAP_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_current_next_indicator, {
"Table current next indicator", "dvb-s2_table.current_next_indicator",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_CURRENT_NEXT_INDICATOR_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_section_number, {
"Table section number", "dvb-s2_table.section_number",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_last_section_number, {
"Table last section number", "dvb-s2_table.last_section_number",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
/* SCT */
{&hf_dvb_s2_table_superframe_loop_count, {
"Table superframe loop count", "dvb-s2_table.superframe_loop_count",
@ -1970,6 +2278,77 @@ void proto_register_dvb_s2_table(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
/* TBTP */
{&hf_dvb_s2_tbtp_group_id, {
"Group ID", "dvb-s2_table.group_id",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_superframe_count, {
"Superframe count", "dvb-s2_table.superframe_count",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_frame_loop_count, {
"Frame loop count", "dvb-s2_table.frame_loop_count",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_SCT_FRAME_LOOP_COUNT_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_sf_frame, {
"Frame", "dvb-s2_table.frame_branch",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_frame_number, {
"Frame number", "dvb-s2_table.frame.number",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_FRAME_NUMBER_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_btb_loop_count, {
"Btp loop count", "dvb-s2_table.frame.btp_loop_count",
FT_UINT16, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_BTP_LOOP_COUNT_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_assignment_count, {
"Assignment count", "dvb-s2_table.frame.btp.assignment_count",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_btp, {
"BTP", "dvb-s2_table.frame.btp_branch",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_logon_id, {
"Logon Id", "dvb-s2_table.frame.btp.logon_id",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_multiple_channel_flag, {
"Multiple channel flag", "dvb-s2_table.frame.btp.multiple_channel_flag",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_MULTIPLE_CHANNEL_FLAG_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_assignment_type, {
"Assignment type", "dvb-s2_table.frame.btp.assignment_type",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_ASSIGNMENT_TYPE_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_frame_vbdc_queue_empty_flag, {
"VBDC queue empty flag", "dvb-s2_table.frame.btp.vbdc_queue_empty_flag",
FT_UINT8, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_VBDC_FLAG_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_start_slot, {
"Start slot", "dvb-s2_table.frame.btp.start_slot",
FT_UINT16, BASE_DEC, NULL, DVB_S2_TABLE_TBTP_START_SLOT_MASK,
NULL, HFILL}
},
{&hf_dvb_s2_tbtp_channel_id, {
"Channel id", "dvb-s2_table.frame.btp.channel_id",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
/* TBTP2 */
{&hf_dvb_s2_table_group_id, {
"Table Group ID", "dvb-s2_table.group_id",
@ -2591,6 +2970,37 @@ void proto_register_dvb_s2_table(void)
FT_UINT16, BASE_DEC, NULL, DVB_S2_TABLE_MULTIPLEX_TRANSPORT_DESC_LENGTH_MASK,
NULL, HFILL}
},
/* TDT */
{&hf_dvb_s2_reserved_future_use, {
"Reserved for future use", "dvb-s2_table.reserved_future_use",
FT_UINT8, BASE_HEX, NULL, 0x40,
NULL, HFILL}
},
{&hf_dvb_s2_reserved_tdt, {
"Reserved", "dvb-s2_table.reserved",
FT_UINT8, BASE_HEX, NULL, 0x30,
NULL, HFILL}
},
{&hf_dvb_s2_tdt_date, {
"Date", "dvb-s2_table.date",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tdt_hour, {
"Hour", "dvb-s2_table.hour",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tdt_minute, {
"Minute", "dvb-s2_table.minute",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{&hf_dvb_s2_tdt_second, {
"Second", "dvb-s2_table.second",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
/* MMT2 */
{&hf_dvb_s2_table_svn_number, {
"Table svn number", "dvb-s2_table.svn_number",
@ -3061,6 +3471,8 @@ void proto_register_dvb_s2_table(void)
&ett_dvb_s2_hdr_table_sf,
&ett_dvb_s2_hdr_table_sf_frame,
&ett_dvb_s2_hdr_table_desc,
&ett_dvb_s2_hdr_tbtp_frame,
&ett_dvb_s2_hdr_tbtp_frame_btp,
&ett_dvb_s2_hdr_table_frame,
&ett_dvb_s2_hdr_table_frame_assign,
&ett_dvb_s2_hdr_table_entry,