Skip to content

PCAP.BeginCapture

Andrew Lambert edited this page Nov 26, 2022 · 8 revisions

PCAP.BeginCapture

Method signature

 Protected Function BeginCapture(CaptureDevice As PCAP.Adaptor, PromiscuousMode As Boolean = False, SnapLength As Integer = 65536, TimeOut As Integer = 1000, BufferSize As Integer = -1) As PCAP.Capture

Parameters

Name Type Comment
CaptureDevice Adaptor A local network adaptor
PromiscuousMode Boolean Optional. If specified, whether to capture in promiscuous mode (default is False)
SnapLength Integer Optional. If specified, the maximum number of bytes to read of each packet (default is MAX_SNAP_LENGTH)
Timeout Integer Optional. If specified, the maximum number of milliseconds to wait for a packet to arrive (default is 1000)
BufferSize Integer Optional. If specified, the size of the kernel packet buffer in bytes (default is 2MB)

Return value

A reference to a Capture object, or Nil on error.

Remarks

Opens a local network adaptor for packet capture.

See also

Clone this wiki locally