Net Protocol Suite Python API User Manual

Introduction

Net Protocol Suite contains a Python module library, TLNetAPI, that provides automation features for the Python language.

Setup Requirements

Windows

Python version: Default python 3 included with supported OSes.

Python module location: The TLNetAPI.py module must be located in the

\API\SDK\Bin directory,

e.g., C:\Users\Public\Documents\LeCroy\Net Protocol Suite\API\SDK\Bin\TLNetAPI.py

Note: In order to use the TLNetAPI.py module in your Python script, use (for example): sys.path.append(' C:\Users\Public\Documents\LeCroy\Net Protocol Suite\API\SDK\Bin') import TLNetAPI

Linux

Linux versions:

  • Ubuntu 24.04 LTS, 64bit and later versions

  • AlmaLinux 10.0 and later versions

  • Debian 13

  • ArchLinux

Python module location: The libTLNetAPI_python.py module must be located in the

/API/SDK/Bin directory,

e.g., /usr/local/LeCroy/NetProtocolSuite/API/SDK/Bin/libTLNetAPI_python.py

In order to use the libTLNetAPI_python.py module in your Python script, use the below statement: sys.path.append('/usr/local/LeCroy/NetProtocolSuite/API/SDK/Bin') import libTLNetAPI_python

The rules listed below must be added to the firewall:

-A OUTPUT -p tcp --match multiport --dport 4000:4003 -j ACCEPT

-A INPUT -p tcp --match multiport --dport 4000:4003 -j ACCEPT

-A OUTPUT -p udp --match multiport --dport 4033:4035 -j ACCEPT

-A INPUT -p udp --match multiport --dport 4033:4035 -j ACCEPT

Note: All required environment variables will be set by the “install.sh” script.

Python Libraries

The enum34 library is required, which might not be installed by default in Python 2.7.x or 3.3.x installations. To install it manually, run python -m pip install enum34.

Connecting to Analyzer over the Network

By default, the SierraNet products use DHCP to obtain an IP address from the network. If needed, static IP settings can be configured through the product’s front panel controls.

The SierraNet products use the following ports to communicate with the TLNetAPI:

  • TCP Ports: 3999 – 4003

  • UDP Ports: 4033 – 4035

If the TLNetAPI is running on a different network subnet than the SierraNet analyzer, then it is recommended to configure the TLNetAPI to automatically discover analyzers on other subnets using the APIDeviceManager.Discovery_AddSubnet function.

Definitions

The following is a list of some terms frequently used in this document. Refer to the Net Protocol Suite User Manual for descriptions of other terms not listed here.

Trace: This is the file that contains the data captured by the analyzer.

Project: This is a configuration file that defines the following parameters of your test setup:

  • One or more analyzer hardware chains (models and serial numbers)

  • Ports configuration

  • Analyzer hardware settings

  • Analyzer recording, triggering, and filtering settings

  • Jammer scenarios

Chain: This is a set of analyzer hardware units. A chain of 1 unit is valid and most common. A chain of multiple units would be linked together with a CATC Sync cable. Refer to the Net Protocol Suite User Manual for details on the hardware's expansion capabilities. Each chain in a Project operates independently from other chains in the Project.

Analyzer: This is the function of the analyzer hardware that captures traffic at line rate and stores it in a dedicated capture buffer.

Jammer: This is the function of the analyzer hardware that injects errors into traffic at line rate.

Scenario: This is the user-defined program that specifies the Jammer behavior.

Contents

This manual includes the following topics:

Contact Teledyne LeCroy

Send email

[email protected]

Contact support

teledynelecroy.com/support/contact

Visit Teledyne LeCroy’s website

teledynelecroy.com

Tell Teledyne LeCroy

Report a problem to Teledyne LeCroy Support via email by selecting Help > Tell Teledyne LeCroy from the application toolbar. This requires that an email client be installed and configured on the host machine.