Hello Daniel,
Thanks for your interest in SmartInspect.
Writing a tool for splitting the log file should indeed be the best way to handle this. Such a tool should normally require less than 100 lines of code. Please note that there's no need to fully read and extract all properties of the individual packets. It is sufficient to read the packet header, look at the packet size, read the packet body and then write the entire packet to an output file. In pseudo code this could look like:
MAXIMUM_SIZE = 50 * 1024 * 1024 { 50 MB }
OpenInput()
try
if (!ReadSILF()) then { Read log file header }
begin
Error("Not a SmartInspect log file");
end
OpenOutput()
try
WriteSILF() { Write log file header }
currentSize = 0
while ReadHeader(out header) do
begin
if currentSize + header.Size > MAXIMUM_SIZE then
begin
SwitchOutput() { Open the next output file }
currentSize = 0
end
currentSize += header.Size
if ReadBody(header, out body) then
begin
WritePacket(header, body)
end
end
finally
CloseOutput()
end
finally
CloseInput()
end
Please let me know if you have any questions. You can also contact me via email (simply click on the my name below).