Documentation
¶
Overview ¶
Package diffpcap provides PCAP file comparison and protocol audit trail.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDiffResult ¶
func FormatDiffResult(r *DiffResult) string
FormatDiffResult formats a DiffResult as a human-readable string.
Types ¶
type AuditEntry ¶
type AuditEntry struct {
Timestamp string `json:"timestamp"`
User string `json:"user"`
Protocol string `json:"protocol"`
Action string `json:"action"` // "created", "modified", "deleted"
Details string `json:"details"`
}
AuditEntry represents a protocol change audit entry.
type DiffResult ¶
type DiffResult struct {
TotalA int `json:"total_a"`
TotalB int `json:"total_b"`
Identical int `json:"identical"`
Modified int `json:"modified"`
OnlyInA int `json:"only_in_a"`
OnlyInB int `json:"only_in_b"`
Diffs []PacketDiff `json:"diffs,omitempty"`
}
DiffResult holds the result of comparing two packet sets.
func ComparePackets ¶
func ComparePackets(a, b []map[string]any) *DiffResult
ComparePackets compares two sets of decoded packets.
type FieldChange ¶
type FieldChange struct {
Field string `json:"field"`
OldValue any `json:"old_value"`
NewValue any `json:"new_value"`
Type string `json:"type"` // "modified", "added", "removed"
}
FieldChange represents a single field-level change.
type PacketDiff ¶
type PacketDiff struct {
Index int `json:"index"`
FieldA map[string]any `json:"field_a,omitempty"`
FieldB map[string]any `json:"field_b,omitempty"`
Changes []FieldChange `json:"changes"`
}
PacketDiff represents the difference between two packets.
Click to show internal directories.
Click to hide internal directories.