feat: TUI visual improvements (nav bar, flow details) and timestamp support

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-19 14:34:43 +01:00
parent efb50ffc8e
commit 063650976b
6 changed files with 229 additions and 13 deletions

View File

@@ -129,16 +129,18 @@ func (r *PcapReader) extractSIPPacket(packet gopacket.Packet, packetNum int) *si
payloadStr := string(payload)
// Log first 200 chars to see full SIP headers
preview := payloadStr
if len(preview) > 200 {
preview = preview[:200]
}
logger.Debug("PcapReader: Packet %d full payload preview: %q", packetNum, preview)
// Log first 200 chars to see full SIP headers (only on trace/debug if needed)
/*
preview := payloadStr
if len(preview) > 200 {
preview = preview[:200]
}
logger.Debug("PcapReader: Packet %d full payload preview: %q", packetNum, preview)
*/
// Check if it looks like SIP
if !isSIPPayload(payloadStr) {
logger.Debug("PcapReader: Packet %d is not SIP", packetNum)
// logger.Debug("PcapReader: Packet %d is not SIP", packetNum)
return nil
}
@@ -160,6 +162,7 @@ func (r *PcapReader) extractSIPPacket(packet gopacket.Packet, packetNum int) *si
sipPacket.SourcePort = srcPort
sipPacket.DestIP = dstIP
sipPacket.DestPort = dstPort
sipPacket.Timestamp = packet.Metadata().Timestamp
return sipPacket
}