Interfaces for capture devices
[read-only] | Description | string . Documentation for this section has not yet been entered. |
|
Filter | string . Kernel level filtering expression associated with this device. For more info on filter expression syntax, see: http://www.winpcap.org/docs/docs31/html/group__language.html |
[read-only] | LastError | string . The last pcap error associated with this pcap device |
[read-only] | LinkType | PacketDotNet.LinkLayers . Return the pcap link layer value of an adapter. |
[read-only] | MacAddress | System.Net.NetworkInformation.PhysicalAddress . Mac address of the physical device |
[read-only] | Name | string . Gets the name of the device |
[read-only] | Started | bool . Return a value indicating if the capturing process of this adapter is started |
[read-only] | Statistics | ICaptureStatistics . Retrieves pcap statistics |
|
StopCaptureTimeout | TimeSpan . Maximum time within which the capture thread must join the main thread (on ICaptureDevice.StopCapture) or else the thread is aborted and an exception thrown. |
|
Capture
()Synchronously capture packets on this device. Method blocks forever. |
|
|
Close
()Closes this adapter |
|
|
GetNextPacket
()Retrieves the next packet from a device |
|
|
GetNextPacketPointers
(ref IntPtr, ref IntPtr)Gets pointers to the next PCAP header and packet data. Data is only valid until next call to GetNextPacketNative. Advanced use only. Intended to allow unmanaged code to avoid the overhead of marshalling PcapHeader and packet contents to allocated memory. |
|
|
Open
()Opens the adapter |
|
|
Open
(DeviceMode)Open the device. To start capturing call the 'StartCapture' function |
|
|
Open
(DeviceMode, int)Open the device. To start capturing call the 'StartCapture' function |
|
|
SendPacket
(PacketDotNet.Packet)Sends a raw packet throgh this device |
|
|
SendPacket
(byte[])Sends a raw packet throgh this device |
|
|
SendPacket
(PacketDotNet.Packet, int)Sends a raw packet throgh this device |
|
|
SendPacket
(byte[], int)Sends a raw packet throgh this device |
|
|
StartCapture
()Start the capture |
|
|
StopCapture
()Stop the capture |
|
OnCaptureStopped | Fired when the capture process of this pcap device is stopped |
|
OnPacketArrival | Fires whenever a new packet is processed, either when the packet arrives from the network device or when the packet is read from the on-disk file. For network captured packets this event is invoked only when working in "PcapMode.Capture" mode. |
Synchronously capture packets on this device. Method blocks forever.
Syntax
public void Capture ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Closes this adapter
Syntax
public void Close ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Documentation for this section has not yet been entered.
Syntax
public string Description { get; }Value
Description of the deviceRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Kernel level filtering expression associated with this device. For more info on filter expression syntax, see: http://www.winpcap.org/docs/docs31/html/group__language.html
Syntax
public string Filter { get; set; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Retrieves the next packet from a device
Syntax
public RawCapture GetNextPacket ()Returns
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Gets pointers to the next PCAP header and packet data. Data is only valid until next call to GetNextPacketNative. Advanced use only. Intended to allow unmanaged code to avoid the overhead of marshalling PcapHeader and packet contents to allocated memory.
Syntax
Parameters
- header
- Documentation for this section has not yet been entered.
- data
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
The last pcap error associated with this pcap device
Syntax
public string LastError { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Return the pcap link layer value of an adapter.
Syntax
public PacketDotNet.LinkLayers LinkType { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Mac address of the physical device
Syntax
public System.Net.NetworkInformation.PhysicalAddress MacAddress { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Gets the name of the device
Syntax
public string Name { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Fired when the capture process of this pcap device is stopped
Syntax
public event CaptureStoppedEventHandler OnCaptureStoppedRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Fires whenever a new packet is processed, either when the packet arrives from the network device or when the packet is read from the on-disk file. For network captured packets this event is invoked only when working in "PcapMode.Capture" mode.
Syntax
public event PacketArrivalEventHandler OnPacketArrivalRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Opens the adapter
Syntax
public void Open ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Open the device. To start capturing call the 'StartCapture' function
Syntax
public void Open (DeviceMode mode)Parameters
- mode
- A SharpPcap.DeviceMode
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Open the device. To start capturing call the 'StartCapture' function
Syntax
Parameters
- mode
- A SharpPcap.DeviceMode
- read_timeout
- A int
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Sends a raw packet throgh this device
Syntax
public void SendPacket (PacketDotNet.Packet p)Parameters
- p
- The packet to send
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Sends a raw packet throgh this device
Syntax
Parameters
- p
- The packet bytes to send
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Sends a raw packet throgh this device
Syntax
Parameters
- p
- The packet to send
- size
- The number of bytes to send
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Sends a raw packet throgh this device
Syntax
Parameters
- p
- The packet bytes to send
- size
- The number of bytes to send
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Start the capture
Syntax
public void StartCapture ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Return a value indicating if the capturing process of this adapter is started
Syntax
public bool Started { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Retrieves pcap statistics
Syntax
public ICaptureStatistics Statistics { get; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Stop the capture
Syntax
public void StopCapture ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0
Maximum time within which the capture thread must join the main thread (on ICaptureDevice.StopCapture) or else the thread is aborted and an exception thrown.
Syntax
public TimeSpan StopCaptureTimeout { get; set; }Value
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: SharpPcap
Assembly: SharpPcap (in SharpPcap.dll)
Assembly Versions: 4.0.1.0