NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Get-Packet Configuration

The cmdlet accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the cmdlet, access to these internal properties is provided through the Config method.

IPMonitor Configuration Settings

ReceiveAllMode:   Enables a socket to receive all IPv4 or IPv6 packets on the network.

Available modes:

ValueDescription
0Do not receive all network traffic.
1 (default)Receive all network traffic. This enables promiscuous mode on the network interface card (NIC). On a LAN segment with a network hub, a NIC that supports promiscuous mode will capture all IPv4 or IPv6 traffic on the LAN, including traffic between other computers on the same LAN segment.
2Receive only socket-level network traffic (Feature may not be implemented by your Windows installation).
3Receive only IP level network traffic. This option does not enable promiscuous mode on the network interface card. This option only affects packet processing at the IP level. The NIC still receives only packets directed to its configured unicast and multicast addresses. However, a socket with this option enabled will receive not only packets directed to specific IP addresses, but will receive all the IPv4 or IPv6 packets the NIC receives.

ReceiveAllMode captures only IPv4 and IPv6 packets. It will not capture other packets (ARP, IPX, NetBEUI packets, for example) on the interface.

Timestamp:   MicroSeconds from UNIX Epoch (1977-01-01).

When calling ParsePcapFile this configuration setting can be queried inside the IPPacket event to return the timestamp from the file.


ipmonitor.OnIPPacket += (obj, ev) => {
  Console.WriteLine(ipmonitor.Config("Timestamp"));
};

The returned value is the number of microseconds from the UNIX Epoch (1977-01-01).

Socket Configuration Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

Note: This option is not valid for UDP ports.

FirewallData:   Used to send extra data to the firewall.

When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).

InBufferSize:   The size in bytes of the incoming queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize:   The size in bytes of the outgoing queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

UseBackgroundThread:   Whether threads created by the cmdlet are background threads.

If set to True, when the cmdlet creates a thread the thread's IsBackground property will be explicitly set to True. By default this setting is False.

UseInternalSecurityAPI:   Tells the cmdlet whether or not to use the system security libraries or an internal implementation.

By default the cmdlet will use the system security libraries to perform cryptographic functions. When set to False calls to unmanaged code will be made. In certain environments this is not desirable. To use a completely managed security implementation set this setting to True. Setting this to True tells the cmdlet to use the internal implementation instead of using the system's security API.

Note: This setting is static. The value set is applicable to all cmdlets used in the application.

When this value is set the product's system DLL is no longer required as a reference, as all unmanaged code is stored in that file.

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 7240]