MCPcopy
hub / github.com/google/gopacket / NewPacketSource

Function NewPacketSource

packet.go:791–796  ·  view source on GitHub ↗

NewPacketSource creates a packet data source.

(source PacketDataSource, decoder Decoder)

Source from the content-addressed store, hash-verified

789
790// NewPacketSource creates a packet data source.
791func NewPacketSource(source PacketDataSource, decoder Decoder) *PacketSource {
792 return &PacketSource{
793 source: source,
794 decoder: decoder,
795 }
796}
797
798// NextPacket returns the next decoded packet from the PacketSource. On error,
799// it returns a nil packet and a non-nil error.

Callers 10

RunFunction · 0.92
TestPcapFileReadFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
Example_captureEthernetFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
readARPFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestPcapFileReadFunction · 0.74
Example_captureEthernetFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…