Browse Source

Add condition for CMAC

priyadharsan 2 months ago
parent
commit
661f3b1317
1 changed files with 17 additions and 4 deletions
  1. 17 4
      Dissector/tc_tm_protocols.lua

+ 17 - 4
Dissector/tc_tm_protocols.lua

@@ -297,6 +297,10 @@ end
                   require("eps_wr_stored_param")
                   eps_tc_wr_stored_param_dissector(buffer, pinfo, tree, TC_TM_PROTOCOL, offset)
                   offset = offset + tc_len
+              elseif tc_id == 211 then
+                  require("tc_eps_set_cntrl_chnl_state")
+                  tc_eps_set_cntrl_chnl_state(buffer, pinfo, tree, TC_TM_PROTOCOL, offset)
+                  offset = offset + tc_len
                  else
 	              for i=0,tc_len - 1 do
         	      subtree:add(f_tc_data, buffer(offset, 1))
@@ -558,7 +562,8 @@ function TM_dissector(buffer, pinfo, tree)  -- OBC to GS
       if tm_id == 621 or  tm_id == 815 or  tm_id == 104 or  tm_id == 107 or  tm_id == 101 or  tm_id == 106  or tm_id == 200 or tm_id == 201 or tm_id == 202 or 
       tm_id == 129 or tm_id == 241 or tm_id == 130 or tm_id == 133 or tm_id == 134 or tm_id == 135 or tm_id == 137 or tm_id == 195 or tm_id == 196 or 
       tm_id == 184 or tm_id == 855 or tm_id == 857 or tm_id == 800 or tm_id == 819 or tm_id == 823 or tm_id == 398 or tm_id == 413 or tm_id == 461 or
-      tm_id == 463 or tm_id == 464 or tm_id == 468 or tm_id == 474 or tm_id == 475 or tm_id == 412 or tm_id == 253 or tm_id == 411 then
+      tm_id == 463 or tm_id == 464 or tm_id == 468 or tm_id == 474 or tm_id == 475 or tm_id == 412 or tm_id == 253 or tm_id == 411 or tm_id == 211 or
+      tm_id == 212 then
       			if tm_id == 621  then
       				require("hm_dissector")
         			array = HM_TM_dissector(buffer, pinfo, tree, TC_TM_PROTOCOL, add, tm_len)
@@ -701,6 +706,14 @@ function TM_dissector(buffer, pinfo, tree)  -- OBC to GS
 	            require("tm_comms_beacon_tx");
 	            tm_comms_beacon_tx(buffer, pinfo, tree, TC_TM_PROTOCOL, add)
 	            add = add + tm_len
+            elseif tm_id == 211 then 
+	            require("tm_eps_set_cntrl_chnl_state");
+	            tm_eps_set_cntrl_chnl_state(buffer, pinfo, tree, TC_TM_PROTOCOL, add)
+	            add = add + tm_len
+            elseif tm_id == 212 then 
+	            require("tm_get_eps_dev_hw_sts");
+	            tm_get_eps_dev_hw_sts(buffer, pinfo, tree, TC_TM_PROTOCOL, add)
+	            add = add + tm_len
 
 
 	end
@@ -731,8 +744,8 @@ function TM_dissector(buffer, pinfo, tree)  -- OBC to GS
 	add=add+1
 
     -- C MAC in HEX
-	magic = buffer(6, 1):le_uint() -- tm control
-    if bit.band(magic, 0x10) == 0x10   then
+	--magic = buffer(, 1):le_uint() -- tm control
+    if bit.band(tm_ctrl, 0x10) == 0x10   then
 	for i=1,32 do
     		subtree:add(f_c_mac, buffer(add, 1):uint())
 		add=add+1    
@@ -830,7 +843,7 @@ function TC_TM_PROTOCOL.dissector(buffer, pinfo, tree)
     
     
 
-	local direction = buffer(offset1, 1):uint()  -- taking tM or tc control byte
+	local direction = buffer(offset1, 1):le_uint()  -- taking tM or tc control byte
  
     if direction & 0x40 == 0x40 then      -- if 6th bit is set then it is TM   
 	    TM_dissector(buffer, pinfo, tree)  -- OBC to GS