feat: TUI visual improvements (nav bar, flow details) and timestamp support
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user