more log tags
This commit is contained in:
@@ -205,7 +205,7 @@ function comms.scada_packet()
|
||||
|
||||
if (type(max_distance) == "number") and (type(distance) == "number") and (distance > max_distance) then
|
||||
-- outside of maximum allowable transmission distance
|
||||
-- log.debug("comms.scada_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)")
|
||||
-- log.debug("COMMS: comms.scada_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)")
|
||||
else
|
||||
if type(self.raw) == "table" then
|
||||
if #self.raw == 5 then
|
||||
@@ -326,7 +326,7 @@ function comms.authd_packet()
|
||||
|
||||
if (type(max_distance) == "number") and ((type(distance) ~= "number") or (distance > max_distance)) then
|
||||
-- outside of maximum allowable transmission distance
|
||||
-- log.debug("comms.authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)")
|
||||
-- log.debug("COMMS: comms.authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)")
|
||||
else
|
||||
if type(self.raw) == "table" then
|
||||
if #self.raw == 4 then
|
||||
@@ -412,7 +412,7 @@ function comms.modbus_packet()
|
||||
self.raw = { self.txn_id, self.unit_id, self.func_code }
|
||||
for i = 1, self.length do insert(self.raw, data[i]) end
|
||||
else
|
||||
log.error("comms.modbus_packet.make(): data not a table")
|
||||
log.error("COMMS: modbus_packet.make(): data not a table")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -435,11 +435,11 @@ function comms.modbus_packet()
|
||||
|
||||
return size_ok and valid
|
||||
else
|
||||
log.debug("attempted MODBUS_TCP parse of incorrect protocol " .. frame.protocol(), true)
|
||||
log.debug("COMMS: attempted MODBUS_TCP parse of incorrect protocol " .. frame.protocol(), true)
|
||||
return false
|
||||
end
|
||||
else
|
||||
log.debug("nil frame encountered", true)
|
||||
log.debug("COMMS: nil frame encountered", true)
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -498,7 +498,7 @@ function comms.rplc_packet()
|
||||
self.raw = { self.id, self.type }
|
||||
for i = 1, #data do insert(self.raw, data[i]) end
|
||||
else
|
||||
log.error("comms.rplc_packet.make(): data not a table")
|
||||
log.error("COMMS: rplc_packet.make(): data not a table")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -521,11 +521,11 @@ function comms.rplc_packet()
|
||||
|
||||
return ok
|
||||
else
|
||||
log.debug("attempted RPLC parse of incorrect protocol " .. frame.protocol(), true)
|
||||
log.debug("COMMS: attempted RPLC parse of incorrect protocol " .. frame.protocol(), true)
|
||||
return false
|
||||
end
|
||||
else
|
||||
log.debug("nil frame encountered", true)
|
||||
log.debug("COMMS: nil frame encountered", true)
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -580,7 +580,7 @@ function comms.mgmt_packet()
|
||||
self.raw = { self.type }
|
||||
for i = 1, #data do insert(self.raw, data[i]) end
|
||||
else
|
||||
log.error("comms.mgmt_packet.make(): data not a table")
|
||||
log.error("COMMS: mgmt_packet.make(): data not a table")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -601,11 +601,11 @@ function comms.mgmt_packet()
|
||||
|
||||
return ok
|
||||
else
|
||||
log.debug("attempted SCADA_MGMT parse of incorrect protocol " .. frame.protocol(), true)
|
||||
log.debug("COMMS: attempted SCADA_MGMT parse of incorrect protocol " .. frame.protocol(), true)
|
||||
return false
|
||||
end
|
||||
else
|
||||
log.debug("nil frame encountered", true)
|
||||
log.debug("COMMS: nil frame encountered", true)
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -659,7 +659,7 @@ function comms.crdn_packet()
|
||||
self.raw = { self.type }
|
||||
for i = 1, #data do insert(self.raw, data[i]) end
|
||||
else
|
||||
log.error("comms.crdn_packet.make(): data not a table")
|
||||
log.error("COMMS: crdn_packet.make(): data not a table")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -680,11 +680,11 @@ function comms.crdn_packet()
|
||||
|
||||
return ok
|
||||
else
|
||||
log.debug("attempted SCADA_CRDN parse of incorrect protocol " .. frame.protocol(), true)
|
||||
log.debug("COMMS: attempted SCADA_CRDN parse of incorrect protocol " .. frame.protocol(), true)
|
||||
return false
|
||||
end
|
||||
else
|
||||
log.debug("nil frame encountered", true)
|
||||
log.debug("COMMS: nil frame encountered", true)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user