{"modulePath":"github.com/hsqbyte/protospec","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package diffpcap\n\nPackage diffpcap provides PCAP file comparison and protocol audit trail.\n\n## Functions\n\n```go\nfunc FormatDiffResult(r *DiffResult) string\n```\nFormatDiffResult formats a DiffResult as a human-readable string.\n\n## Types\n\n```go\ntype AuditEntry struct {\n\tTimestamp string `json:\"timestamp\"`\n\tUser      string `json:\"user\"`\n\tProtocol  string `json:\"protocol\"`\n\tAction    string `json:\"action\"` // \"created\", \"modified\", \"deleted\"\n\tDetails   string `json:\"details\"`\n}\n```\nAuditEntry represents a protocol change audit entry.\n\n```go\ntype DiffResult struct {\n\tTotalA    int          `json:\"total_a\"`\n\tTotalB    int          `json:\"total_b\"`\n\tIdentical int          `json:\"identical\"`\n\tModified  int          `json:\"modified\"`\n\tOnlyInA   int          `json:\"only_in_a\"`\n\tOnlyInB   int          `json:\"only_in_b\"`\n\tDiffs     []PacketDiff `json:\"diffs,omitempty\"`\n}\n```\nDiffResult holds the result of comparing two packet sets.\n\n```go\nfunc ComparePackets(a, b []map[string]any) *DiffResult\n```\nComparePackets compares two sets of decoded packets.\n\n```go\ntype FieldChange struct {\n\tField    string `json:\"field\"`\n\tOldValue any    `json:\"old_value\"`\n\tNewValue any    `json:\"new_value\"`\n\tType     string `json:\"type\"` // \"modified\", \"added\", \"removed\"\n}\n```\nFieldChange represents a single field-level change.\n\n```go\ntype PacketDiff struct {\n\tIndex   int            `json:\"index\"`\n\tFieldA  map[string]any `json:\"field_a,omitempty\"`\n\tFieldB  map[string]any `json:\"field_b,omitempty\"`\n\tChanges []FieldChange  `json:\"changes\"`\n}\n```\nPacketDiff represents the difference between two packets.\n\n","path":"github.com/hsqbyte/protospec/src/diffpcap","name":"diffpcap","synopsis":"Package diffpcap provides PCAP file comparison and protocol audit trail.","isRedistributable":true}
