Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/assafmo/joincap
/ functions
Functions
54 in github.com/assafmo/joincap
⨍
Functions
54
◇
Types & classes
2
↓ 46 callers
Function
packetCount
(t *testing.T, pcapPath string)
main_test.go:22
↓ 31 callers
Function
joincap
(args []string)
main.go:52
↓ 21 callers
Function
testIsOrdered
(t *testing.T, pcapPath string)
main_test.go:107
↓ 13 callers
Method
Len
()
minheap/minheap.go:23
↓ 9 callers
Method
Push
Push use pointer receivers because they modify the slice's length, not just its contents.
minheap/minheap.go:29
↓ 8 callers
Method
Pop
Pop use pointer receivers because they modify the slice's length, not just its contents.
minheap/minheap.go:33
↓ 5 callers
Function
ExpandWildcards
ExpandWildcards takes a list of file paths that may contain wildcards and returns a new list with wildcards expanded to matching file paths. If a wild
main.go:206
↓ 4 callers
Function
isTimeOrdered
(pcapPath string)
main_test.go:54
↓ 3 callers
Function
printVersionSloganLink
()
main.go:196
↓ 2 callers
Function
containsWildcard
Helper function to check if a path contains wildcards
main.go:243
↓ 2 callers
Function
readNext
(reader *pcapgo.Reader, inputFile *os.File, verbose bool, isInit bool)
main.go:313
↓ 2 callers
Function
write
(writer *pcapgo.Writer, packetToWrite minheap.Packet, verbose bool)
main.go:365
↓ 1 callers
Function
initHeapWithInputFiles
initHeapWithInputFiles inits minTimeHeap with one packet from each source file. It also returns the output LinkType, which is decided by the LinkTypes
main.go:250
↓ 1 callers
Function
main
()
main.go:45
Function
Benchmark
(b *testing.B)
main_test.go:1107
Method
Less
(i, j int)
minheap/minheap.go:24
Method
Swap
(i, j int)
minheap/minheap.go:25
Function
TestContainsWildcard
(t *testing.T)
wildcard_test.go:9
Function
TestCount
TestCount packet count of merged pcap should be the sum of the packet counts of the input pcaps
main_test.go:120
Function
TestExitOnUnknownFlag
TestExitOnUnknownFlag tests exit on unknown cli flag
main_test.go:822
Function
TestExpandWildcards
(t *testing.T)
wildcard_test.go:30
Function
TestGzippedPcap
TestGzippedPcap gzipped pcap should merge just fine (this kills tcpslice)
main_test.go:447
Function
TestHelperIsTimeOrderedFalse
TestHelperIsTimeOrderedTrue test the helper function isTimeOrdered for negative value
main_test.go:97
Function
TestHelperIsTimeOrderedTrue
TestHelperIsTimeOrderedTrue test the helper function isTimeOrdered for positive value
main_test.go:86
Function
TestHelperPacketCount
TestHelperPacketCount test the helper function packetCount
main_test.go:47
Function
TestIgnoreEmptyPcap
TestIgnoreEmptyPcap pcap without packets should be ignored
main_test.go:266
Function
TestIgnoreGarbageEndingOfPcap
TestIgnoreGarbageEndingOfPcap garbage at end of pcap should be ignored (this kills tcpslice)
main_test.go:416
Function
TestIgnoreInputFileCorruptGlobalHeader
TestIgnoreInputFileCorruptGlobalHeader merging pcap with a corrupt global header should be ignored
main_test.go:177
Function
TestIgnoreInputFileDoesNotExists
TestIgnoreInputFileDoesntExists non existing input files should be ignored
main_test.go:356
Function
TestIgnoreInputFileIsDirectory
TestIgnoreInputFileIsDirectory directory as input file should be ignored
main_test.go:386
Function
TestIgnoreInputFileTruncatedFirstPacketHeader
TestIgnoreInputFileTruncatedFirstPacketHeader pcap without full first packet header (24 < size < 40 bytes) should be ignored
main_test.go:326
Function
TestIgnoreInputFileTruncatedGlobalHeader
TestIgnoreInputFileTruncatedGlobalHeader pcap without full global header (< 24 bytes) should be ignored
main_test.go:296
Function
TestIgnorePacketWithCorruptHeader
TestIgnorePacketWithCorruptHeader packet with corrupt header should be ignored
main_test.go:205
Function
TestIgnorePacketsWithTimeAnHourErlierThanpreviousPacket
TestIgnorePacketsWithTimeAnHourErlierThanpreviousPacket packets with timestamp more than an hour before previous packet should be ignored
main_test.go:687
Function
TestIgnorePacketsWithTimeEarlierThanFirst
TestIgnorePacketsWithTimeEarlierThanFirst packets with timestamp smaller than the first packet should be ignored (Is this test necessary?)
main_test.go:655
Function
TestIgnoreTruncatedPacketEOF
TestIgnoreTruncatedPacket truncated packet (EOF) should be ignored
main_test.go:236
Function
TestInputFilePassingOrderDoesNotMatter
TestInputFilePassingOrderDoesNotMatter input files passing order does not matter, e.g. 'joincap 1.pcap 2.pcap' == 'joincap 2.pcap 1.pcap', even if the
main_test.go:1008
Function
TestLen
(t *testing.T)
minheap/minheap_test.go:8
Function
TestMain
(m *testing.M)
main_test.go:15
Function
TestMainFunc
TestMainFunc main shoud call joincap and print it's returned error (if exists)
main_test.go:834
Function
TestMixDifferentLinkTypes
TestMixDifferentLinkTypes it's ok to mix input linktype output linktype will be "Ethernet"
main_test.go:868
Function
TestMixLittleBigEndian
TestMixLittleBigEndian it's ok to mix input endianess
main_test.go:969
Function
TestNanos
TestNanos timestamp precision of merged pcap
main_test.go:1066
Function
TestNormalOutputSnaplenOnBigInputSnaplen
TestNormalOutputSnaplenOnBigInputSnaplen input snaplen should be ignored and we use our own snaplen
main_test.go:612
Function
TestNormalOutputSnaplenOnNormalInputSnaplen
TestNormalOutputSnaplenOnNormalInputSnaplen input snaplen should be ignored and we use our own snaplen
main_test.go:572
Function
TestNormalOutputSnaplenOnSmallInputSnaplen
TestNormalOutputSnaplenOnSmallInputSnaplen input snaplen should be ignored and we use our own snaplen
main_test.go:531
Function
TestOrder
TestOrder all packets in merged pacap should be ordered by time
main_test.go:149
Function
TestOrder
(t *testing.T)
minheap/minheap_test.go:41
Function
TestOutputLinkTypeForSameInputLinkTypes
TestOutputLinkTypeForSameInputLinkTypes same input linktype shoud stay the same linktype in output file
main_test.go:914
Function
TestPacketLimit
TestPacketLimit merged pcap should be limited to number packets passed with -c argument
main_test.go:477
Function
TestPacketsWithTimeLessThanHourBeforePreviousPacketAreOK
TestPacketsWithTimeLessThanHourBeforePreviousPacketAreOK packets with timestamp less than an hour before previous packet are ok
main_test.go:719
Function
TestPrintHelp
TestPrintHelp tests that the help is printed okay
main_test.go:791
Function
TestPrintVersion
TestPrintVersion tests that the version is printed okay
main_test.go:756
Function
TestWriteToNonExistingDirectory
TestWriteToNonExistingDirectory test writing to file in non existing directory
main_test.go:852