Format of the ntpcap.ini File

Software Installation for Windows and WinPcap-NT Installation

Platform
Napatech SmartNIC
Content Type
Software Installation Guide
Capture Software Version
Link™ Capture Software 12.7

Description

The configuration file ntpcap.ini uses the INI file format.

The configuration file consists of an optional [Common] section and a section for each WinPcap device. For each device section, a number of optional keys specify additional parameters.

Note: If a device is configured erroneously, it is not created. However, no error message is shown.

Syntax

The syntax for defining one device is as shown below.

['[Common]']
{'Ntpl'<n> '=' '"'<NTPL command>'"'}
'['<device name>']'
{'RX'<n> '=' '"'<NTPL command>'"'}
['StreamId' '=' <ID>]
['HBAllowance' '=' <percentage>]
['TX' '=' <port No.>]
['TXNumaNode' '=' <node No.>]
['TXMinHostBuffer' '=' <minimum buffer size>]
['NanoSec' '=' 'TRUE' | 'FALSE']
['NTInterface' '=' 'Segment' | 'Packet']
['WithCRC' '=' 'TRUE' | 'FALSE']

Semantics

The semantics of ntpcap.ini is described below.

Key Description
[Common]

Optional. A section which may hold NTPL commands for common use, for example NTPL macros and NTPL setup commands. If the [Common] section is present, then "Delete=All" is executed implicitly on entry. WinPcap makes sure this is only executed once when multiple devices are opened. After all devices have been closed, opening any device will re-initiate the execution of the NTPL commands in the [Common] section.

Ntpl<n>

Optional. Must be specified in the [Common] section.

<n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence.

<device name>

A user-defined WinPcap device name. If the name clashes with an existing device name, this section of ntpcap.ini is ignored.

Note: Streams that are already created on the SmartNIC, for instance by using the ntpl tool, are automatically available for WinPcap. They are named nt3g<x>, where <x> is the stream ID. To avoid naming clashes, do not use these device names in ntpcap.ini.
Rx<n>

Optional. NTPL commands for setting up this WinPcap device.

<n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence. A break in the sequence stops loading commands.

If at least Rx1, and optionally more NTPL commands, assigns or refers to the same single stream ID (not a range), the WinPcap device is assigned to this stream ID. Make sure to use the same stream ID in these NTPL commands; otherwise this section of ntpcap.ini is ignored, and the WinPcap device is not created.

If a stream with this stream ID has already been created on a SmartNIC, for instance by a previous section in ntpcap.ini or by using the ntpl tool, the NTPL commands are not loaded. Make sure to use a stream ID that is not already in use.

If no NTPL command assigns or refers to a single stream ID, use the key StreamID to assign an existing stream, created for instance in a previous section of ntpcap.ini or by using the ntpl tool.

StreamId

Optional. Assigns the WinPcap device to a stream ID. The stream must already have been created.

If set, Rx<n> NTPL commands are not searched for a stream ID.

Use the StreamID key if no NTPL commands assign or refer to a specific stream ID (see the load-balancing example in Examples of ntpcap.ini Files).

Use the StreamID key to assign the WinPcap device to a stream created in a previous section of ntpcap.ini or, for instance, by using the ntpl tool (see the host buffer allowance example in Examples of ntpcap.ini Files).

HBAllowance

Optional. Specifies the host buffer allowance in percent for this device. Range: 1..100. Default: 100.

All applications opening this WinPcap device will have the same host buffer allowance value. Create more devices assigned to the same stream ID if different host buffer allowance values are needed.

See the host buffer allowance example in Examples of ntpcap.ini Files

TX

Optional. If specified, determines the port used to transmit on. Default: No TX port is assigned.

TXNumaNode

Optional. Specifies from which NUMA node pool of host buffers the TX buffer is taken. Only relevant if a TX port is specified. Default: 0.

TXMinHostBuffer

Optional. Specifies the minimum size in MB of the TX host buffer needed.

NanoSec

Optional. If set to TRUE, the tv_usec field in the pcap timeval structure is in ns instead of μs. Default is FALSE.

Note: Do not set this parameter if TimestampFormat in ntservice.ini (see DN-0449) is set to PCAP or PCAP_NS.
NTInterface

Optional. Selects between segment-based interface and packet-based interface. Default: Segment.

Segment-based interface is faster and supports the PCAP descriptor (PacketDescriptor=PCAP in ntservice.ini). However, segment-based interface does not support merging of packets between SmartNICs.

Packet-based interface supports merging of packets between SmartNICs, but does not support the PCAP descriptor.

WithCRC
Optional. Default: False. If PacketDescriptor is set to NT in the ntservice.ini file as shown in the configuration example below, set WithCRC to True to include FCS in a received frame. And set WithCRC to False not to include FCS in a received frame.
PacketDescriptor=NT
TimestampFormat=NATIVE_UNIX (or TimestampFormat=UNIX_NS)
Note: The PacketPcapFcsInclude parameter in the ntservice.ini file does not have any effect if PacketDescriptor is set to NT.
Note: The WithCRC value in ntpcap.ini file does not have any effect if PacketDescriptor in the ntservice.ini file is set to PCAP. See the configuration examples below.
The FCS field will be included in a received frame with the following configuration in the ntservice.ini file regardless of the WithCRC value in the ntpcap.ini file.
PacketDescriptor=PCAP
TimestampFormat=PCAP_NS (or TimestampFormat=PCAP)
PacketPcapFcsInclude=True
The FCS field will not be included in a received frame with the following configuration in the ntservice.ini file regardless of the WithCRC value in the ntpcap.ini file. See DN-0449 for further information about parameters in the ntservice.ini file.
PacketDescriptor=PCAP
TimestampFormat=PCAP_NS (or TimestampFormat=PCAP)
PacketPcapFcsInclude=False