Documentation ¶
Overview ¶
Package muxer helps solve the problem that captures take place only on a per-interface basis, but tcp-info collects flow information with no reference to the underlying interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustCaptureTCPOnInterfaces ¶
func MustCaptureTCPOnInterfaces(ctx context.Context, interfaces []net.Interface, packets chan<- gopacket.Packet, pcapOpenLive PcapHandleOpener, maxHeaderSize int32)
MustCaptureTCPOnInterfaces fires off a packet capture on every one of the passed-in list of interfaces, and then muxes the resulting packet streams to all be sent to the passed-in packets channel.
Types ¶
type PcapHandleOpener ¶
type PcapHandleOpener func(device string, snaplen int32, promisc bool, timeout time.Duration) (handle *pcap.Handle, _ error)
PcapHandleOpener is a type to allow injection of fake packet captures to aid in testing. It is exactly the type of pcap.OpenLive, and in production code every variable of this type should be set to pcap.OpenLive.
Click to show internal directories.
Click to hide internal directories.