MCPcopy Index your code
hub / github.com/google/gopacket / ReadPacketData

Method ReadPacketData

packet.go:698–698  ·  view source on GitHub ↗

ReadPacketData returns the next packet available from this data source. It returns: data: The bytes of an individual packet. ci: Metadata about the capture err: An error encountered while reading packet data. If err != nil, then data/ci will be ignored.

()

Source from the content-addressed store, hash-verified

696 // err: An error encountered while reading packet data. If err != nil,
697 // then data/ci will be ignored.
698 ReadPacketData() (data []byte, ci CaptureInfo, err error)
699}
700
701// ConcatFinitePacketDataSources returns a PacketDataSource that wraps a set

Callers 15

TestConcatPacketSourcesFunction · 0.65
ReadPacketDataMethod · 0.65
NextPacketMethod · 0.65
TestPCAPGoWriteFunction · 0.65
TestBPFFunction · 0.65
TestBPFInstructionFunction · 0.65
ExampleBPFFunction · 0.65
TestPCAPGoNgWriteFunction · 0.65
NewBufferPacketSourceFunction · 0.65
benchmarkLayerDecodeFunction · 0.65
TestReadPacketFunction · 0.65

Implementers 9

Ringpfring/pfring.go
Handlepcap/pcap.go
BufferPacketSourcepcap/gopacket_benchmark/benchmark.go
SnoopReaderpcapgo/snoop.go
NgReaderpcapgo/ngread.go
EthernetHandlepcapgo/capture.go
Readerpcapgo/read.go
TPacketafpacket/afpacket.go
BPFSnifferbsdbpf/bsd_bpf_sniffer.go

Calls

no outgoing calls

Tested by 11

TestConcatPacketSourcesFunction · 0.52
TestPCAPGoWriteFunction · 0.52
TestBPFFunction · 0.52
TestBPFInstructionFunction · 0.52
ExampleBPFFunction · 0.52
TestPCAPGoNgWriteFunction · 0.52
TestReadPacketFunction · 0.52
TestPacketHeaderFunction · 0.52
TestBadPacketHeaderFunction · 0.52
TestBigPacketDataFunction · 0.52