Browse Source

ftm_dissector

vishnuprasath 3 months ago
parent
commit
66a2fd60b2

+ 158 - 0
Dissector/ftci_dissector.lua

@@ -0,0 +1,158 @@
+function ftci_dissector(buffer, pinfo, tree, FTCI_protocol, offset)
+
+    -- Define ProtoFields for each of the fields in the structure
+
+    -- Control Field 1 (1 byte)
+    local f_session_id = ProtoField.uint8("FileTransfer.session_id", "File Transfer Session ID", base.DEC)
+    local f_resume_context_mode = ProtoField.uint8("FileTransfer.resume_context_mode", "Resume Context Mode", base.DEC)
+    local f_seq_loss_detection_mode = ProtoField.string("FileTransfer.seq_loss_detection_mode", "Seq Loss Detection Mode")
+    local f_file_id = ProtoField.uint8("FileTransfer.file_id", "File ID", base.DEC)
+ 
+
+    -- Control Field 2 (1 byte)
+    local f_transfer_mode = ProtoField.uint8("FileTransfer.transfer_mode", "Transfer Mode (TXM)", base.DEC)
+    local f_file_format = ProtoField.uint8("FileTransfer.file_format", "File Format", base.HEX)
+    local f_unit_size = ProtoField.uint8("FileTransfer.unit_size", "Unit Size", base.DEC)
+    local f_size_field_type = ProtoField.uint8("FileTransfer.size_field_type", "Size Field Type", base.HEX)
+
+    -- Other fields
+    local f_checksum = ProtoField.uint32("FileTransfer.checksum", "Checksum",base.HEX)
+    local f_mtu_size = ProtoField.uint16("FileTransfer.mtu_size", "MTU Size", base.DEC)
+    local f_rx_con_fail_timeout = ProtoField.uint16("FileTransfer.rx_con_fail_timeout", "Receiver Connection Fail Timeout", base.DEC)
+    local f_major_version = ProtoField.uint8("FileTransfer.major_version", "Major Version", base.DEC)
+    local f_minor_version = ProtoField.uint8("FileTransfer.minor_version", "Minor Version", base.DEC)
+    local f_sct_instance_key = ProtoField.uint32("FileTransfer.sct_instance_key", "SCT Instance Key", base.DEC)
+    local f_file_mem_size = ProtoField.bytes("FileTransfer.file_mem_size", "File/Mem Size")
+    local f_dest_storage = ProtoField.uint8("FileTransfer.dest_storage", "Destination Storage", base.DEC)
+    local f_dest_mem_address = ProtoField.uint32("FileTransfer.dest_mem_address", "Destination Memory Address", base.HEX)
+    local f_file_path_len = ProtoField.uint8("FileTransfer.file_path_len", "File /Name Length", base.DEC)
+    local f_file_path = ProtoField.string("FileTransfer.file_path", "File /Name")
+
+    -- Add fields to protocol
+    FTCI_protocol.fields = {
+        f_session_id, f_resume_context_mode, f_seq_loss_detection_mode, f_file_id,
+        f_transfer_mode, f_file_format, f_unit_size, f_size_field_type,
+        f_checksum, f_mtu_size, f_rx_con_fail_timeout, f_major_version, f_minor_version, 
+        f_sct_instance_key, f_file_mem_size, f_dest_storage, f_dest_mem_address, 
+        f_file_path_len, f_file_path
+    }
+
+    -- Loop through the data instances
+   -- for i = 1, num_of_instance do
+        -- Add the new structure data as a subtree
+        local subtree = tree:add( FTCI_protocol, buffer(), "File Transfer Protocol")
+
+        -- dissect CONTROL FIELD 1 (1 byte)
+	local w=0
+        local control_field1 = buffer(offset, 1):le_uint()
+        local session_id = control_field1 & 0x07
+        local resume_context_mode = (control_field1 >>3) & 0x01
+        local seq_loss_detection_mode = (control_field1 >> 4) & 0x01
+        local file_id = (control_field1 >>5) & 0x07
+        subtree:add(f_session_id, session_id)
+        subtree:add(f_resume_context_mode, resume_context_mode)
+	if seq_loss_detection_mode == 0 then
+        	subtree:add(f_seq_loss_detection_mode, "UNACK")
+	else
+		subtree:add(f_seq_loss_detection_mode, "ACK")
+	end
+        subtree:add(f_file_id, file_id)
+        offset = offset + 1
+
+        -- dissect CONTROL FIELD 2 (1 byte)
+        local control_field2 = buffer(offset, 1):le_uint()
+        local transfer_mode = (control_field2 >>0) & 0x01 --txm
+        local file_format = (control_field2 >>1) & 0x07
+        local unit_size = (control_field2 >>4) & 0x03
+        local size_field_type = (control_field2 >>6) & 0x03
+	if size_field_type == 0x01 then
+		w=0
+	elseif size_field_type == 0x02 then
+		w=1
+	elseif size_field_type > 0x02 then
+		w=2
+	end
+        subtree:add(f_transfer_mode, transfer_mode)
+        subtree:add(f_file_format, file_format)
+        subtree:add(f_unit_size, unit_size)
+        subtree:add(f_size_field_type, size_field_type)
+        
+	offset = offset + 1
+	-- dissect MTU Size (2 bytes)
+        local mtu_size = buffer(offset, 2):le_uint()
+        subtree:add(f_mtu_size, mtu_size)
+        offset = offset + 2
+
+        -- dissect Checksum (4 bytes)
+        local checksum = buffer(offset, 4):le_uint()
+        subtree:add(f_checksum, checksum)
+        offset = offset + 4
+
+        
+
+        -- dissect RX Connection Fail Timeout (2 bytes)
+        local rx_con_fail_timeout = buffer(offset, 2):le_uint()
+        subtree:add(f_rx_con_fail_timeout, rx_con_fail_timeout)
+        offset = offset + 2
+
+        -- dissect Major Version (1 byte)
+        local major_version = buffer(offset, 1):le_uint()
+        subtree:add(f_major_version, major_version)
+        offset = offset + 1
+
+        -- dissect Minor Version (1 byte)
+        local minor_version = buffer(offset, 1):le_uint()
+        subtree:add(f_minor_version, minor_version)
+        offset = offset + 1
+
+        -- dissect SCT Instance Key (4 bytes)
+        local sct_instance_key = buffer(offset, 4):le_uint()
+        subtree:add(f_sct_instance_key, sct_instance_key)
+        offset = offset + 4
+
+        -- dissect File/Mem Size (1-5 bytes, variable size)
+	--if unit_size then
+        	local file_mem_size_len = unit_size
+        	local file_mem_size = buffer(offset , file_mem_size_len)
+        	subtree:add(f_file_mem_size, file_mem_size)
+        	offset = offset + file_mem_size_len
+	--end
+
+        -- dissect Destination Storage (1 byte)
+	if transfer_mode == 0x01 then
+        	local dest_storage = buffer(offset, 1):le_uint()
+        	subtree:add(f_dest_storage, dest_storage)
+        	offset = offset + 1
+	
+        	-- dissect Destination Memory Address (4 bytes)
+        	local dest_mem_address = buffer(offset, 4):le_uint()
+        	subtree:add(f_dest_mem_address, dest_mem_address)
+        	offset = offset + 4
+	end
+
+        -- dissect File Path Length (1 byte)
+        local file_path_len = buffer(offset + w, 1):le_uint()
+        subtree:add(f_file_path_len, file_path_len)
+	--file_path_len=200
+	offset = offset + 1
+
+        -- dissect File Path/Name (variable length)
+	local substring_start = 0
+	local count = 0
+        local file_path = buffer(offset, file_path_len):string()
+	for i = file_path_len-1, 1, -1 do
+    		local char=string.sub(file_path, i, i) 
+		 if char:match("\\.") then
+        		substring_start = i
+			if count == 1 then 
+       			 break  -- Exit the loop once we find a special character
+			end
+		count = count +1
+    		end
+        end
+	
+	local new_string = string.sub(file_path, substring_start + 1)
+        subtree:add(f_file_path, new_string)
+        offset = offset + file_path_len
+   -- end
+end

+ 86 - 0
Dissector/ftds_dissector.lua

@@ -0,0 +1,86 @@
+function ftds_dissector(buffer, pinfo, tree, ftds_protocol, offset)
+
+local f_control_field = ProtoField.uint8("ftds_protocol.control_field", "Control Field", base.DEC)
+local f_session_id = ProtoField.uint8("ftds_protocol.session_id", "File Transfer Session ID", base.DEC)
+local f_segment_type = ProtoField.uint8("ftds_protocol.segment_type", "Segment Type", base.DEC)
+local f_sequence_num_size = ProtoField.uint8("ftds_protocol.sequence_num_size", "Sequence Number Size", base.DEC)
+local f_data_length_size = ProtoField.uint8("ftds_protocol.data_length_size", "Data Length Size", base.DEC)
+local f_sequence_num = ProtoField.uint32("ftds_protocol.sequence_num", "Sequence Number", base.DEC)
+local f_data_length = ProtoField.uint16("ftds_protocol.data_length", "Data Segment Length", base.DEC)
+local f_data_bytes = ProtoField.bytes("ftds_protocol.data_bytes", "Data Bytes", base.SPACE)
+
+-- Add the fields to the protocol
+ftds_protocol.fields = {
+    f_control_field,
+    f_session_id,
+    f_segment_type,
+    f_sequence_num_size,
+    f_data_length_size,
+    f_sequence_num,
+    f_data_length,
+    f_data_bytes
+}
+
+local subtree = tree:add(ftds_protocol, buffer(),"FTDS_PROTOCOL")
+
+local control_field = buffer(offset, 1):le_uint()
+    subtree:add(f_control_field, control_field)
+    offset = offset + 1
+
+
+    -- Extract bits from Control Field
+    local session_id = (control_field & 0x07)  -- Bits 0-2
+    local segment_type = ((control_field >> 3) & 0x03)  -- Bits 3-4
+    local seq_num_size = ((control_field >> 5) & 0x03)  -- Bits 5-6
+    local data_length_size = ((control_field >> 7) & 0x01)  -- Bit 7
+
+    -- Add the extracted fields to the tree
+    local subtree1 = subtree:add(ftds_protocol, buffer(), "CONTROL FIELD DATA")
+    subtree1:add(f_session_id, session_id)
+    subtree1:add(f_segment_type, segment_type)
+    subtree1:add(f_sequence_num_size, seq_num_size)
+    subtree1:add(f_data_length_size, data_length_size)
+
+    -- Sequence Number (1 to 4 bytes)
+    local seq_num_length
+    if seq_num_size == 0 then
+      seq_num_length = 1
+    elseif seq_num_size == 1 then
+      seq_num_length = 2
+    elseif seq_num_size == 2 then
+      seq_num_length = 4
+    end
+    
+    local sequence_num = buffer(offset, seq_num_length):le_uint()
+    subtree:add(f_sequence_num, sequence_num)
+    offset = offset + seq_num_length
+
+    -- Data Segment Length (1 or 2 bytes)
+    local data_length_length 
+    if data_length_size == 0 then
+      data_length_length = 1
+    elseif data_length_size == 1 then
+      data_length_length = 2
+    end
+    local data_length = buffer(offset, data_length_length):le_uint()
+    subtree:add(f_data_length, data_length)
+    offset = offset + data_length_length
+    
+    
+    local chunk_size = 16  -- You can adjust this value for your display preferences
+
+    -- Iterate through the buffer and add chunks to the protocol tree
+    while offset < data_length do
+        -- Get the chunk data
+        local chunk = buffer(offset, chunk_size)
+
+        -- Format the label with the byte range, e.g., "Data bytes [0001-0016]:"
+        local label = string.format("Data bytes [%.4d-%.4d]:", offset , offset + chunk_size)
+
+        -- Add the chunk to the tree, using the label
+        local data_field = subtree:add(f_data_bytes, chunk)
+
+        -- Update the offset for the next chunk
+        offset = offset + chunk_size
+     end
+end

+ 86 - 0
Dissector/ftfci_dissector.lua

@@ -0,0 +1,86 @@
+function ftfci_dissector(buffer, pinfo, tree, FTFCI_protocol, offset)
+    -- Define ProtoFields for each of the fields in the structure
+
+    -- Control Field 1 (1 byte)
+    local f_session_id = ProtoField.uint8("FileTransfer.session_id", "File Transfer Session ID", base.DEC)
+    local f_data_segment_exchange_info = ProtoField.string("FileTransfer.data_segment_exchange_info", "Data Segment Exchange Info")
+	local f_data_segment_exchange_info1 = ProtoField.string("FileTransfer.data_segment_exchange_info", "Data Segment Exchange Info")
+    
+    local f_reserved_byte = ProtoField.uint8("FileTransfer.reserved_byte", "Reserved Byte", base.HEX)
+
+    -- Reserved (3 bytes)
+    local f_reserved_3bytes = ProtoField.bytes("FileTransfer.reserved_3bytes", "Reserved (3 bytes)")
+
+    -- Suspend Waiting Time or SCT Database (4 bytes)
+    local f_suspend_waiting_time = ProtoField.uint32("FileTransfer.suspend_waiting_time", "Suspend Waiting Time", base.DEC)
+
+    -- Add fields to protocol
+    FTFCI_protocol.fields = {
+        f_session_id,
+        f_data_segment_exchange_info,
+       -- f_reserved_bit7,
+        f_reserved_byte,
+        f_reserved_3bytes,
+        f_suspend_waiting_time
+    }
+
+    -- Add the new structure data as a subtree
+    local subtree = tree:add(FTFCI_protocol, buffer(), "File Transfer Control Information (FTFCI)")
+
+    -- dissect CONTROL FIELD 1 (1 byte)
+    local control_field1 = buffer(offset, 1):le_uint()
+    local session_id = control_field1 & 0x07  -- Bits 0-2
+    local data_segment_exchange_info = (control_field1 >> 3) & 0x1F  -- Bits 3-7
+   --logic
+	if data_segment_exchange_info == 0 then 
+		f_data_segment_exchange_info1 ="ftfci_na"
+	elseif data_segment_exchange_info == 1 then 
+		f_data_segment_exchange_info1 ="ftfci_cancelled_by_app"
+	elseif data_segment_exchange_info == 2 then 
+		f_data_segment_exchange_info1 ="ftfci_cancelled_by_seqloss"
+	elseif data_segment_exchange_info == 3 then 
+		f_data_segment_exchange_info1 ="ftfci_suspend"
+	elseif data_segment_exchange_info == 4 then 
+		f_data_segment_exchange_info1 ="ftfci_resume"
+	                                                    --elseif data_segment_exchange_info == 5 then 
+									--f_data_segment_exchange_info1 ="ftsr_stop_transfer"
+	elseif data_segment_exchange_info == 6 then 
+		f_data_segment_exchange_info1 ="ftfci_suspend_savecontext"
+	elseif data_segment_exchange_info == 7 then 
+		f_data_segment_exchange_info1 ="ftfci_resume_savecontext"
+	elseif data_segment_exchange_info == 8 then 
+		f_data_segment_exchange_info1 ="ftfci_cancelled_by_susp_timeoout"
+	elseif data_segment_exchange_info == 9 then 
+		f_data_segment_exchange_info1 ="ftfci_cancelled_by_txnode"
+	elseif data_segment_exchange_info == 10 then 
+		f_data_segment_exchange_info1 ="ftfci_ack"
+	elseif data_segment_exchange_info == 11 then 
+		f_data_segment_exchange_info1 ="ftfci_nak"
+	elseif data_segment_exchange_info == 12 then 
+		f_data_segment_exchange_info1 ="ftfci_ping"
+	end
+    -- Add Control Field 1 data to subtree
+    subtree:add(f_session_id, session_id)
+    subtree:add(f_data_segment_exchange_info, f_data_segment_exchange_info1)
+    
+    offset = offset + 1
+
+    -- dissect Reserved Byte (1 byte)
+    local reserved_byte = buffer(offset, 1):le_uint()
+    subtree:add(f_reserved_byte, reserved_byte)
+    offset = offset + 1
+
+    -- dissect Reserved 3 bytes (2 bytes)
+    local reserved_3bytes = buffer(offset, 2)
+    subtree:add(f_reserved_3bytes, reserved_3bytes)
+    offset = offset + 2
+
+    -- dissect Suspend Waiting Time or SCT Database (4 bytes)
+    local suspend_waiting_time = 0
+    -- If Data Segment Exchange Info is "Request FT Suspend" or "Suspend with savecontext" or "Resume with savecontext"
+   -- if data_segment_exchange_info == 0x03 or data_segment_exchange_info == 0x05 or data_segment_exchange_info == 0x06 then
+        suspend_waiting_time = buffer(offset, 4):le_uint()
+        subtree:add(f_suspend_waiting_time, suspend_waiting_time)
+        offset = offset + 4
+    --end
+end

+ 105 - 0
Dissector/ftsr_dissector.lua

@@ -0,0 +1,105 @@
+function ftsr_dissector(buffer, pinfo, tree, ftsr_protocol, offset)
+
+-- Define the fields for the protocol
+local f_session_id = ProtoField.uint8("ftsr_protocol.session_id", "Session ID", base.DEC)
+local f_status_code = ProtoField.uint8("ftsr_protocol.status_code", "Response Status Code", base.HEX)
+
+local f_missing_count = ProtoField.uint8("ftsr_protocol.missing_count", "Total Missing Data Segment Count", base.DEC)
+local f_reserved = ProtoField.uint16("ftsr_protocol.reserved1", "Reserved", base.HEX)
+local f_suspend_timeout_or_sct_db = ProtoField.uint32("ftsr_protocol.suspend_timeout_or_sct_db", "Suspend Waiting Timeout or SCT Database", base.HEX)
+local f_missing_segment_seq = ProtoField.bytes("ftsr_protocol.missing_segment_seq", "Missing Segment Sequence Numbers", base.SPACE)
+
+-- Add the fields to the protocol
+ftsr_protocol.fields = { f_session_id, f_status_code, f_reserved, f_missing_count, f_suspend_timeout_or_sct_db, f_missing_segment_seq }
+
+    local subtree = tree:add(ftsr_protocol, buffer(), "FTSR_PROTOCOL")
+
+    -- Parse the CONTROL FIELD (1 byte)
+    local control_field = buffer(offset, 1):le_uint()
+    local session_id = (control_field & 0x07)   -- Bits 0-2 for Session ID (3 bits)
+    local status_code = (control_field >> 3) & 0x1f -- Bits 3-7 for Status Code (5 bits)
+    
+    -- Add fields to the protocol tree
+    subtree:add(f_session_id, session_id)
+    
+    if status_code == 0 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR RECEIVER READY (0x%02X)", status_code))
+    elseif status_code == 1 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR RX API NOT FOUND (0x%02X)", status_code))
+    elseif status_code == 2 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR SUSPEND (0x%02X)", status_code))
+    elseif status_code == 3 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR RESUME (0x%02X)", status_code))
+    elseif status_code == 4 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR STOP TRANSFER (0x%02X)", status_code))
+    elseif status_code == 5 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR MISSING PACKETS (0x%02X)", status_code))
+    elseif status_code == 6 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR CRC FAIL (0x%02X)", status_code))
+    elseif status_code == 7 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR FILE NOT FOUND (0x%02X)", status_code))
+    elseif status_code == 8 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR HEAD CHANGE (0x%02X)", status_code))
+    elseif status_code == 9 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR CANCELLED BY SUSPEND TIMEOUT (0x%02X)", status_code))
+    elseif status_code == 10 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR SUSPEND SAVE CONTEXT (0x%02X)", status_code))
+    elseif status_code == 11 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR RESUME SAVE CONTEXT (0x%02X)", status_code))
+    elseif status_code == 12 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR ACK (0x%02X)", status_code))
+    elseif status_code == 13 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR NAK (0x%02X)", status_code))
+    elseif status_code == 14 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR PING (0x%02X)", status_code))
+    elseif status_code == 15 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR DOWNLOAD COMPLETE (0x%02X)", status_code))
+    elseif status_code == 16 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR TERMINATE RX NODE (0x%02X)", status_code))
+    elseif status_code == 17 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR INVALID SESSION ID (0x%02X)", status_code))
+    elseif status_code == 18 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR DOWNLOAD PTR NULL (0x%02X)", status_code))
+    elseif status_code == 19 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR FTM BUSY (0x%02X)", status_code))
+    elseif status_code == 20 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR INVALID CFG INPUT (0x%02X)", status_code))
+    elseif status_code == 21 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR RX SYSTEM ERROR (0x%02X)", status_code))
+    elseif status_code == 22 then
+    subtree:add(f_status_code, status_code):set_text(string.format("RESPONSE STATUS CODE: FTSR VERSION MISMATCH (0x%02X)", status_code))
+    end
+    
+    offset = offset + 1  -- Move to the next byte
+    
+
+    -- Parse the MISSING DATA SEGMENT COUNT (1 byte)
+    if status_code == 0x05 then
+    local missing_count = buffer(offset, 1):uint()
+    subtree:add(f_missing_count, missing_count)
+    offset = offset + 1
+    end
+
+    -- Parse Reserved bytes (2 bytes)
+    local reserved_bytes = buffer(offset, 2)
+    subtree:add(f_reserved, reserved_bytes)
+    offset = offset + 2
+
+    -- Parse SUSPEND WAITING TIMEOUT OR SCT DATABASE (4 bytes)
+    -- This field is present based on the Response Status Code
+    if status_code == 0x02 or status_code == 0x0A or status_code == 0x0B then
+        local suspend_timeout_or_sct_db = buffer(offset, 4)
+        subtree:add(f_suspend_timeout_or_sct_db, suspend_timeout_or_sct_db)
+        offset = offset + 4
+    end
+
+    -- Parse the MISSING SEGMENT SEQUENCE NUMBERS (variable length)
+    if status_code == 0x05 then
+        -- Missing segment sequence numbers are present when status code is 0x05
+        local missing_seq_start = offset
+        local missing_seq_count = missing_count
+        local missing_segments = buffer(missing_seq_start, missing_seq_count)
+        subtree:add(f_missing_segment_seq, missing_segments)
+    end
+end
+

+ 50 - 17
Dissector/tc_tm_protocols.lua

@@ -231,18 +231,32 @@ end
               subtree:add("TC DATA : NIL")
           else
               if tc_id == 621 then
-              
-                 require("hm_dissector")
-
-                data = HM_TC_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
-                offset = offset + tc_len   
-              else
+                 	require("hm_dissector")
+                	data = HM_TC_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
+                	offset = offset + tc_len  
+		elseif tc_id == 100 then
+                	require("ftci_dissector")
+			ftci_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
+                	offset = offset + tc_len 
+		elseif tc_id == 103 then
+                	require("ftfci_dissector")
+			ftfci_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
+                	offset = offset + tc_len 
+		elseif tc_id == 102 then
+                 	require("ftds_dissector")
+                 	ftds_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
+                 	offset = offset + tc_len
+		elseif tc_id == 105 then
+                 	require("ftsr_dissector")
+          		ftsr_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, offset)
+                 	offset = offset + tc_len
+                 else
 	              for i=0,tc_len - 1 do
         	      subtree:add(f_tc_data, buffer(offset, 1))
-      	        offset = offset + 1
-             end
-          end   
-		  end
+      	        	offset = offset + 1
+             		end
+                 end
+	end
     end
     
 
@@ -294,10 +308,10 @@ end
     info_display= {buffer(11, 2):le_uint(),buffer(7, 4):le_uint() ,tc_id, string} --- for info display in wireshark
     pinfo.cols.info ="seq_no = " ..info_display[1] .." TS = " ..info_display[2].." TC_ID = "..info_display[3].." Module = " ..info_display[4] -- for info display in wireshark
    
-    else
-  
+    --elseif tc_id == 100 then
+  	
   
-              
+    else            
     
     info_display= {buffer(11, 2):le_uint(),buffer(7, 4):le_uint() ,tc_id} --- for info display in wireshark
 
@@ -433,17 +447,36 @@ function TM_dissector(buffer, pinfo, tree)  -- OBC to GS
 	
 	
 
-      if tm_id == 621 or  tm_id == 815 then
+      if tm_id == 621 or  tm_id == 815 or  tm_id == 104 or  tm_id == 107 or  tm_id == 101 or  tm_id == 106 then
       			if tm_id == 621  then
       				require("hm_dissector")
         			array = HM_TM_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add, tm_len)
         			add = add + tm_len
-			      end
- 			      if tm_id == 815  then
+
+ 			      elseif tm_id == 815  then
  				      require("bcon")
         			bcon_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add, tm_len)
         			add = add + tm_len
-			      end      
+
+			       elseif tm_id == 104 then
+                			require("ftci_dissector")
+					ftci_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add)
+                			add = add + tm_len 
+			       elseif tm_id == 107 then
+                			require("ftfci_dissector")
+					ftfci_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add)
+                			add = add + tm_len
+			        elseif tm_id == 101 then 
+          				require("ftsr_dissector")
+          				ftsr_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add)
+        				add = add + tm_len
+				   elseif tm_id == 106 then 
+          				require("ftds_dissector")
+                 			ftds_dissector(buffer, pinfo, subtree, TC_TM_PROTOCOL, add)
+        				add = add + tm_len
+				end
+
+   
       else
         for i=0,magic-1 do
 	        subtree:add(f_tm_data, buffer(add, 1):le_uint())