byteblowerll package

Submodules

byteblowerll.byteblower module

class byteblowerll.byteblower.AbstractModifier(*args, **kwargs)

Bases: AbstractObject

Base class for most ByteBlower Modifiers

property thisown

The membership flag

class byteblowerll.byteblower.AbstractObject(*args, **kwargs)

Bases: object

Base class for most of the ByteBlower Objects

DescriptionGet(*args)

Gets a textual description for the current object

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
print(server.DescriptionGet())

Gets a textual description for the current object

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
print(server.DescriptionGet())
Refresh()

Retrieves the latest data from the server.

When the method is called on a History object, the method will transfer the samples from the server-side buffer to this API instance. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

property thisown

The membership flag

class byteblowerll.byteblower.AbstractObjectList(*args)

Bases: object

This is a List of multiple AbstractObject objects.

It can be iterated just like a normal Python list.

append(x)
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.AbstractRefreshableResult(*args, **kwargs)

Bases: AbstractObject

Base class for Results which are refreshable.

property thisown

The membership flag

class byteblowerll.byteblower.AbstractRefreshableResultList(*args)

Bases: object

This is a List of multiple AbstractRefreshableResult objects.

It can be iterated just like a normal Python list.

append(x)
iterator()
property thisown

The membership flag

exception byteblowerll.byteblower.AddressResolutionFailed(*args)

Bases: InitializationError

property thisown

The membership flag

byteblowerll.byteblower.BB()
class byteblowerll.byteblower.Buffer(*args)

Bases: object

This is a List of multiple string objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlower(*args, **kwargs)

Bases: AbstractObject

Singleton class that is the entry point to start using the ByteBlower API.

Typically, this is the first class you will use when writing a ByteBlower test script. Use this class to connect to ByteBlower servers, to start or stop all configured ByteBlower ports across those servers, and to control the logging behavior.

Retrieve the singleton ByteBlower object using the static method InstanceGet().

This class contains some static convenience methods. They are wrappers around the corresponding non-static methods of the singleton object.

APIVersionGet()

Returns the version of the API.

New in version 2.6.0.

Return type:

str

Example

from byteblowerll import byteblower as api
print(api.ByteBlower.APIVersionGet())
# returns 2.10.0
DefaultTimeout = 10000000000
static DestroyInstance()

Destroy the ByteBlower API Instance

Warning

This will destroy all created API objects.

This will cause all handles to created ByteBlower objects to render invalid.

Bug: accessing invalid handles will most likely crash your pplication

static InstanceGet()

Creates or returns the ByteBlower API singleton instance.

Returns:

ByteBlower singleton instance.

Return type:

ByteBlower

This object is the entry point to start working with the ByteBlower Python API.

If no ByteBlower instance is created yet, this method creates one and returns the object. If the instance exists already, it is simply returned. Any other static call will implicitly instantiate this singleton object.

Example

from byteblowerll import byteblower as api
instance = api.ByteBlower.InstanceGet()
MeetingPointAdd(*args)

Opens a connection to a MeetingPoint and adds it to the current API instance.

New in version 2.6.0.

Parameters:
  • server – IP address or hostname of the MeetingPoint server to connect.

  • port – Remote TCP port on which to connect the MeetingPoint server. Should normally never be overridden. Default: 9101

Returns:

A MeetingPoint object that represents the server connection.

Return type:

MeetingPoint

Raises:
  • MeetingPointUnreachable – When the MeetingPoint server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a MeetingPoint server daemon that is not running (on purpose or due to a software issue).

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple MeetingPoint servers. This allows to use a set of Meeting point servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) MeetingPoint server and will share its resources. See MeetingPoint for more information.

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingpoint = bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')

Opens a connection to a MeetingPoint and adds it to the current API instance.

New in version 2.6.0.

Parameters:
  • server – IP address or hostname of the MeetingPoint server to connect.

  • port – Remote TCP port on which to connect the MeetingPoint server. Should normally never be overridden. Default: 9101

Returns:

A MeetingPoint object that represents the server connection.

Return type:

MeetingPoint

Raises:
  • MeetingPointUnreachable – When the MeetingPoint server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a MeetingPoint server daemon that is not running (on purpose or due to a software issue).

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple MeetingPoint servers. This allows to use a set of Meeting point servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) MeetingPoint server and will share its resources. See MeetingPoint for more information.

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingpoint = bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')

Opens a connection to a MeetingPoint and adds it to the current API instance.

New in version 2.6.0.

Parameters:
  • server – IP address or hostname of the MeetingPoint server to connect.

  • port – Remote TCP port on which to connect the MeetingPoint server. Should normally never be overridden. Default: 9101

Returns:

A MeetingPoint object that represents the server connection.

Return type:

MeetingPoint

Raises:
  • MeetingPointUnreachable – When the MeetingPoint server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a MeetingPoint server daemon that is not running (on purpose or due to a software issue).

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple MeetingPoint servers. This allows to use a set of Meeting point servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) MeetingPoint server and will share its resources. See MeetingPoint for more information.

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingpoint = bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
MeetingPointGet()

Returns all Meeting Point connections within this API instance.

New in version 2.6.0.

Returns:

a list with objects created within this API instance. Can be empty

Return type:

MeetingPointList

See MeetingPointAdd() for more information

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingPoints = bb.MeetingPointGet()
MeetingPointRemove(inMeetingPoint)

Disconnects from the ByteBlower MeetingPoint.

Parameters:

meetingpoint (MeetingPoint) – The MeetingPoint to disconnect from

See MeetingPointAdd() for more information.

Note

This will invalidate all created objects on this ByteBlower

MeetingPoint!

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingpoint = bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
bb.MeetingPointRemove(meetingpoint)
MeetingPointRemoveAll()

Disconnects from all ByteBlower MeetingPoints.

See MeetingPointRemove() for more information.

Note

This will invalidate all created objects on this ByteBlower MeetingPoint!

Example

from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
meetingpoint = bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
# ..
bb.MeetingPointRemoveAll()
PortsStart(inPorts)

Starts all traffic streams and application schedules on the specified ByteBlower ports.

Parameters:

ports (ByteBlowerPortList) – a list of ByteBlowerPort objects to start.

More specifically, for each traffic stream and schedulable object on the specified ports, the configured time to wait kicks off and when this time has passed the corresponding action is performed.

Typical actions include starting a traffic stream or sending out a multicast join message or HTTP request. See Stream and SchedulesStart() for more information.

Streams or schedulable objects that are already scheduled and streams that are already active are ignored. Schedulable objects that are already stopped are scheduled again. See SchedulesStart() for more information.

If a port does not contain any streams or schedules, nothing happens for that port.

Example

bb.PortsStart()
PortsStartAll()

Starts all traffic streams and application schedules on all created ByteBlower Ports.

See PortsStart() for more information.

PortsStop(inPorts)

Stops all traffic streams and application schedules on the specified ByteBlower ports.

Parameters:

args (ByteBlowerPortList) – Zero, one or more ByteBlowerPort objects on which to abort traffic streams and application schedules.

More specifically, all traffic streams and schedulable objects that are currently scheduled are cancelled and all active traffic streams are stopped. Since schedulable objects are only active for an instant, aborting these is not possible.

For more information about schedulable objects, see SchedulesStart().

Streams and schedules that are not running are ignored. This may be because they have not yet started or because they are already finished or stopped.

If a port does not contain any streams or schedules, nothing happens for that port.

Example

bb.PortsStop()
PortsStopAll()

Stops all traffic streams and application schedules on all created ByteBlower Ports.

See PortsStop() for more information.

ResultsRefresh(inResults)

Refreshes multiple result objects.

New in version 2.2.

Parameters:

results (AbstractRefreshableResultList) – A list of refreshable results

Sometimes you want to refresh a lot of results-objects at the same time. You can refresh all those objects in one API call. The results will be batched per server and then refreshed.

Example

bb.ResultsRefresh()
ScheduleGroupCreate()

Create a ScheduleGroup.

Return type:

ScheduleGroup

Example

bb.ScheduleGroupCreate()
ScheduleGroupGet()

Returns all existing ScheduleGroups.

Return type:

ScheduleGroupList

Example

scheduleGroup = bb.ScheduleGroupGet('byteblower-1.lab.byteblower.com')
SchedulesStart(inSchedules)

Starts the specified schedulable objects.

Parameters:

schedules (ScheduleList) – Zero, one or more schedulable objects to start.

More specifically, all specified schedulable objects have their time to wait period kick off simultaneously and when this time has passed the corresponding action is performed.

Typical actions include sending out a multicast join message or an HTTP request. All schedulable objects are listed below.

Schedulable objects that are already scheduled are ignored. Schedulable objects that are already finished or cancelled are scheduled again.

While re-scheduling them will always succeed (and this method will return without error), executing them multiple times may result in error states in other places. For example, a HTTPClient can only manage one HTTP session and will refuse to send out a second HTTP request.

Different kinds of schedulable objects exist throughout the API. They are returned by methods such as Igmpv1MemberSession.ScheduleAdd().

After creating and configuring such schedules, they can be scheduled by either passing them to this method or by passing the port(s) on which they were created to PortsStart().

The following schedulable object types are available in the API:

Note

Bug: HTTP requests are not yet available as a schedulable object and cannot be used with this method.

Example

bb.SchedulesStart()
SchedulesStop(inSchedules)

Stops the specified schedulable objects.

Parameters:

inSchedules (ScheduleList) – Zero, one or more schedulable objects to abort.

More specifically, all specified schedulable objects that are currently scheduled are cancelled. Schedulable objects are only active for an instant, so actually aborting them is not possible.

For more information about schedulable objects, see SchedulesStart().

Schedules that are not running are ignored. This may be because they have not yet started or because they are already finished or cancelled.

Example

bb.SchedulesStop()
ServerAdd(*args)

Opens a connection to a ByteBlower server and adds it to the current API instance.

Returns:

An object that represents the server connection.

Return type:

ByteBlowerServer

Raises:
  • ByteBlowerServerUnreachable – When the ByteBlower server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a ByteBlower server daemon that is not running (on purpose or due to a software issue).

  • ByteBlowerServerIncompatible – When the ByteBlower server daemon is running an incompatible version.

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple ByteBlower servers. This allows to use a set of ByteBlower servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) ByteBlower server and will share its resources. See ByteBlowerServer for more information.

Parameters:
  • server – IP address or hostname of the ByteBlower server to connect.

  • port – Remote TCP port on which to connect the ByteBlower server. Should normally never be overridden. Default: 9002

Example

This example connects to the server ‘byteblower-1.lab.byteblower.com
from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
server = bb.ServerAdd('byteblower-1.lab.byteblower.com')

Opens a connection to a ByteBlower server and adds it to the current API instance.

Returns:

An object that represents the server connection.

Return type:

ByteBlowerServer

Raises:
  • ByteBlowerServerUnreachable – When the ByteBlower server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a ByteBlower server daemon that is not running (on purpose or due to a software issue).

  • ByteBlowerServerIncompatible – When the ByteBlower server daemon is running an incompatible version.

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple ByteBlower servers. This allows to use a set of ByteBlower servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) ByteBlower server and will share its resources. See ByteBlowerServer for more information.

Parameters:
  • server – IP address or hostname of the ByteBlower server to connect.

  • port – Remote TCP port on which to connect the ByteBlower server. Should normally never be overridden. Default: 9002

Example

This example connects to the server ‘byteblower-1.lab.byteblower.com
from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
server = bb.ServerAdd('byteblower-1.lab.byteblower.com')

Opens a connection to a ByteBlower server and adds it to the current API instance.

Returns:

An object that represents the server connection.

Return type:

ByteBlowerServer

Raises:
  • ByteBlowerServerUnreachable – When the ByteBlower server daemon could not be reached. Typical causes are an incorrect or unreachable DNS name or IP address or a ByteBlower server daemon that is not running (on purpose or due to a software issue).

  • ByteBlowerServerIncompatible – When the ByteBlower server daemon is running an incompatible version.

  • ValueError|TypeError – When the <port> parameter is provided and is no integer.

A single client instance may be connected to multiple ByteBlower servers. This allows to use a set of ByteBlower servers as a single system. On the other hand, multiple client instances may be connected to a single (shared) ByteBlower server and will share its resources. See ByteBlowerServer for more information.

Parameters:
  • server – IP address or hostname of the ByteBlower server to connect.

  • port – Remote TCP port on which to connect the ByteBlower server. Should normally never be overridden. Default: 9002

Example

This example connects to the server ‘byteblower-1.lab.byteblower.com
from byteblowerll import byteblower as api
bb = api.ByteBlower.InstanceGet()
server = bb.ServerAdd('byteblower-1.lab.byteblower.com')
ServerCount()

Counts the number of server objects created.

Returns:

the number of ByteBlowerServer objects

Return type:

int

See ServerAdd() for more information.

Example

server = bb.ServerCount()
ServerGet()

Returns all server connections within this API instance.

Returns:

a list of ByteBlowerServer objects

Return type:

ByteBlowerServerList

See ServerAdd() for more information.

Example

server = bb.ServerGet()
ServerRemove(inByteBlowerServer)

Disconnects from the ByteBlower server.

Parameters:

server (ByteBlowerServer) – The server to disconnect from

See ServerAdd() for more information.

Note

This will invalidate all created objects on this ByteBlower Server!

Example

bb.ServerRemove(server)
ServerRemoveAll()

Disconnects from all ByteBlower servers.

See ServerRemove() for more information.

Note

This will invalidate all created objects on this ByteBlower Server!

Example

bb.ServerRemoveAll()
WirelessEndpointsPrepare(inWirelessEndpoints)

Prepares all the specified ByteBlower Endpoints.

Parameters:

endpoints (WirelessEndpointList) – a list with zero, one or more WirelessEndpoint objects to prepare.

Raises:

TechnicalError – When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.

If a ByteBlower Endpoint does not contain any streams or schedules, nothing happens for that ByteBlower Endpoint.

WirelessEndpointsPrepareAsync(inWirelessEndpoints)

Prepares all the specified ByteBlower Endpoints in an asynchronious way.

Parameters:

endpoints (WirelessEndpointList) – a list with zero, one or more WirelessEndpoint objects to prepare.

Raises:

TechnicalError – When the items in <endpoints> are spread across multiple MeetingPoints.

If a ByteBlower endpoint does not contain any streams or schedules, nothing happens for that ByteBlower Endpoint.

Example

bb.WirelessEndpointsPrepareAsync()
WirelessEndpointsStart(inWirelessEndpoints)

Starts all traffic streams and application schedules on the specified ByteBlower Endpoints.

Parameters:

endpoints (WirelessEndpointList) – list with zero, one or more WirelessEndpoint objects on which to start traffic streams and application schedules.

Raises:

TechnicalError – When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.

More specifically, for each traffic stream and trigger object on the specified endpoints, the configured time to wait kicks off and when this time has passed the corresponding action is performed.

Typical actions include starting a traffic stream or HTTP request. See StreamMobile for more information. If a ByteBlower endpoint does not contain any streams or schedules, nothing happens for that ByteBlower Endpoint.

WirelessEndpointsStartAndWait(inWirelessEndpoints)

Starts all traffic streams and application schedules on the specified ByteBlower Endpoints And waits until the devices are started.

Parameters:

endpoints (WirelessEndpointList) – Zero, one or more WirelessEndpont objects on which to start traffic streams and application schedules.

Raises:

TechnicalError – When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.

More specifically, for each traffic stream and trigger object on the specified endpoints, the configured time to wait kicks off and when this time has passed the corresponding action is performed.

Typical actions include starting a traffic stream or HTTP request. See StreamMobile for more information.

If a ByteBlower endpoint does not contain any streams or schedules, nothing happens for that ByteBlower Endpoint.

Example

bb.WirelessEndpointsStartAndWait()
property thisown

The membership flag

exception byteblowerll.byteblower.ByteBlowerAPIException

Bases: Exception

Base class for most of the ByteBlower Exceptions

getInfo()

Gets some additional info of the error

Return type:

str

getMessage()

Get a description of the error

Return type:

str

property thisown

The membership flag

what()

Get a description of the error

Return type:

str

class byteblowerll.byteblower.ByteBlowerInterface(*args, **kwargs)

Bases: AbstractObject

Example

interface = bbServer.InterfaceGetByName('trunk-1-14')
packetDump = interface.PacketDumpCreate()
NameGet()

Returns the name of the ByteBlower Interface

Returns:

Name of the ByteBlower Interface

Return type:

str

Example

print(interface.NameGet())
PacketDumpCreate()

Adds a Packet Dumper to this interface

Returns:

returns a PacketDump object

Return type:

PacketDump

A Packet Dumper can be used to capture all bidirectional traffic coming in on this ByteBlower Interface.

Example

packetDump = interface.PacketDumpCreate()
PacketDumpDestroy(packet_dump)

removes a PacketDump from this interface

Parameters:

dump (PacketDump) – Packet Dumper that you want to destroy from the interface`.

Example

packetDump = interface.PacketDumpCreate()
interface.PacketDumpDestroy(packetDump)
PortCountGet()

Returns the number of created ports on this interface

Returns:

number of ports on this ByteBlowerInterface

Return type:

int

Example

print(interface.PortCountGet())
PortCreate()

Creates a new ByteBlower Port on this ByteBlowerInterface.

Returns:

The created ByteBlower Port object.

Return type:

ByteBlowerPort

Example

port = interface.PortCreate()
PortDestroy(inPort)

Removes a ByteBlower Port from this interface

Parameters:

port (ByteBlowerPort) – Port that you want to destroy from the interface.

Example

interface.PortDestroy(port)
PortGet()

Returns a list of created ByteBlower ports on this ByteBlower Interface

Returns:

A list of ByteBlower ports on this interface

Return type:

ByteBlowerPortList

Example

portList = interface.PortGet()
PortIdGet()

Returns the ID of this interface on the Physical Interface

Returns:

The id of the ByteBlower Interface on the Physical Interface

Return type:

int

Example

print(interface.PortIdGet())
SpeedGet()

Returns the speed of a ByteBlower Interface

Returns:

The speed of this ByteBlower Interface

Return type:

int

Example

print(interface.SpeedGet())
SwitchIdGet()

Returns the ID of the switch where the ByteBlower Interface resides

Returns:

Id of the switch where the ByteBlower Interface is connected

Return type:

int

property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerInterfaceList(*args)

Bases: object

This is a List of multiple ByteBlowerInterface objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerLicense(*args, **kwargs)

Bases: AbstractObject

This class represents the license information of your connected server.

New in version 2.6.0.

Deprecated since version 2.10.0.

The license is defined by the security key hardware on your ByteBlower server.

Example

license = serverServiceInfo.LicenseGet()
print(license.TimeAllowedGet())
NumberOfNonTrunksGet()

The maximum number of non-trunking interfaces allowed by the license

Returns:

number of nontrunks

Return type:

int

Example

print(license.NumberOfNonTrunksGet())
NumberOfTrunkPortsGet(index)

The maximum number of ByteBlower Interfaces that can reside at the given trunk interface.

Parameters:

index (int) – Index of the trunk interface to obtain the value for.

Returns:

Allowed number of ByteBlower Interfaces on the physical interface

Rtype int:

Example

print(license.NumberOfTrunkPortsGet())
NumberOfTrunksGet()

The maximum number of trunking interfaces allowed by the license

Returns:

number of trunking interfaces

Return type:

int

Example

print(license.NumberOfTrunksGet())
SerialGet()

Retrieves the serial number.

This serial number is the serial number of the hardware containing the license. This is handy info when contacting the ByteBlower support department.

Returns:

the serial number of the hardware containing the license

Return type:

str

Example

print(license.SerialGet())
TimeAllowedGet()

The number of minutes the ByteBlower server can run on the license.

If the value is set to 4294967295, the license is permanent and the number should be treated as infinity.

Returns:

Number of minutes the ByteBlower server can run.

Return type:

int

Example

print(license.TimeAllowedGet())
TimeConsumedGet()

The number of minutes the ByteBlower server has run on the license.

This value has only a meaning when the license is a temporary (demo) license.

Returns:

Number of minutes the ByteBlower server has used of the maximum allowed

Return type:

int

Example

print(license.TimeConsumedGet())
VersionGet()

Gets the version of the license.

Returns:

the version of the license

Return type:

int

Example

print(license.VersionGet())
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPort(*args, **kwargs)

Bases: AbstractObject

Logical representation of a network host docked somewhere in the NUT, which can transmit or schedule network traffic, process incoming traffic and run stateful network applications.

A ByteBlowerPort is physically connected (or ‘attached’) to the NUT through the physical ByteBlower interface on which it is created. See ByteBlowerServer.PortCreate() for more information.

Multiple ports may be created on the same physical interface. From a network view, they are just different (simulated) hosts within a shared (datalink or layer 2) subnet. This means traffic to one port created on an interface is seen by all ports on that interface.

Most test scenarios start with one or more ByteBlower ports that are configured to do the following things:

  • become part of the network (layer2, layer3, perform DHCP, join multicast groups, …)

  • schedule network traffic streams for transmission (TX objects)

  • configure incoming packet processors (RX objects) that look for matching packets and e.g. count them

  • start network applications such as HTTP servers

  • schedule network application actions (called ‘schedulable objects’) such an HTTP client application sending out an HTTP request

When such ports are subsequently activated, the scheduled streams and network actions are performed at the configured time.

From that moment, relevant result data may be pulled from those streams (TX statistics), incoming packet processors (RX statistics) and network applications (application and session statistics).

Destroying a port will clean up everything that is configured on that port in a clean way:

  • streams, incoming packet processors and network applications are teared down, their results are gone

  • the port leaves all multicast groups of which it is part (but doesn’t wait for confirmation)

  • the port releases its DHCP lease (but doesn’t wait for confirmation)

CapabilityGetByName(name)

Returns a Capability object by its name.

New in version 2.6.0.

Returns:

An object representing the requested capability

Return type:

Capability

Raises:

ConfigError – UnsupportedConfig error message when the Capability is not supported

Example

capability = port.CapabilityGetByName('IPv4')
print(capability.DescriptionGet())
CapabilityIsSupported(name)

Checks whether a capability is supported.

New in version 2.6.0.

Returns:

True if it is supported, False if not

Return type:

bool

Example

print(port.CapabilityIsSupported('IPv4')
# prints True
CapabilityListGet()

Returns a list of Capability objects.

New in version 2.6.0.

Returns:

An object representing a list of known capabilities

Return type:

CapabilityList

Example

This example shows how to query the capabilities on a ByteBlowerPort
capability_list = port.CapabilityListGet()

for capability in capability_list:
   print(capability.DescriptionGet())
InterfaceNameGet()

Returns physical ByteBlower interface code.

Returns:

String code representing the physical interface name (e.g. trunk-1-4 or nontrunk-1).

Return type:

str

Each ByteBlower port is created on a physical ByteBlower interface of a server. This interface determines where the port will be ‘attached’ to the NUT.

See ByteBlowerServer.PortCreate() for more information and to see how an interface name is structured.

Example

print(port.InterfaceNameGet())
# prints trunk-1-1
InterfaceSpeedGet()

Returns physical ByteBlower interface speed.

Returns:

The maximum speed in bits per second a ByteBlower Interface can transmit. This does not take any VLAN overhead into account!

Return type:

int

See ByteBlowerServer.PortCreate() for more information and to see how an interface name is structured.

Example

print(port.InterfaceSpeedGet())
# prints 1000000000
InterfaceSwitchIdGet()

Returns the ID of the switch where the ByteBlower Port resides

Returns:

Id of the switch where the ByteBlower Interface is connected

Return type:

int

Layer25PPPoEAdd()

Adds a layer 2.5 PPPoE Client to this port.

New in version 2.5.0.

Returns:

an object representing an PPPoE client

Return type:

PPPoEClient

Raises:

ConfigError – When an underlying layer 2 or layer 2.5 configuration is not yet fully configured.

Once a layer 2.5 configuration is added to a port, it cannot be destroyed or removed.

Example

Configure the Port’s network connection as a PPPoE-enabled virtual interface.

# set an PPPoE client
client = port.Layer25PPPoEAdd()
print(client.DescriptionGet())
Layer25PPPoEGet()

Returns the ordered list of layer 2.5 PPPoE objects of this port.

New in version 2.5.0: PPPoE objects can be added by ByteBlowerPort.Layer25PPPoEAdd()

Returns:

A list with all the PPPoE clients created

Return type:

Layer25PPPoEList

Example

layer25PPPoEGet = port.Layer25PPPoEGet()
Layer25VlanAdd()

Adds a layer 2.5 VLAN to this port.

Changed in version 2.3.0: Support for stacking multiple VLAN tags. Adding a second VLAN tag on an older server will throw a technical exception.

Changed in version 2.5.0: Multiple layer 2.5 configurations can be added. They will be stacked on top each other in the the port’s network stack from the bottom up.

Returns:

Created VLAN configuration object.

Return type:

VLANTag

Raises:

ConfigError – When an underlying layer 2 or layer 2.5 configuration is not yet fully configured.

Once a layer 2.5 configuration is added to a port, it cannot be destroyed or removed.

Example

Configure the Port’s network connection as a VLAN-enabled virtual interface.

vlan_tag = port.Layer25VlanAdd()
vlan_tag.IDSet(20)
Layer25VlanGet()

Returns the ordered list of layer 2.5 Vlan objects of this port.

New in version 2.5.0: VLAN objects can be added by Layer25VlanAdd().

Return type:

Layer25VlanList

Example

Reading the number of .VLANTag objects of port Configure the Port’s network connection as a VLAN-enabled virtual interface.

vlan_list = port.Layer25VlanGet()
Layer2EthIIGet()

Returns the layer 2 configuration object of this port.

New in version 2.5.0.

Returns:

The ethernet configuration of the ByteBlower port

Return type:

EthernetConfiguration

Raises:

ConfigError – When the layer 2 configuration is not yet set.

Example

eth_conf = port.Layer2EthIIGet()
Layer2EthIISet()

Sets the layer 2 configuration of this port.

Return type:

EthernetConfiguration

Raises:

ConfigError – When the layer 2 configuration is already set.

Once the layer 2 configuration is set, it cannot be destroyed or overwritten.

Example

Configure the Port’s network connection as an Ethernet interface and add MAC address.

port.Layer2EthIISet().MacSet('00bb1b000001')
Layer3IPv4Get()

Returns the layer 3 IPv4 configuration object of this port.

New in version 2.5.0.

Returns:

A created IPv4 configuration object

Return type:

IPv4Configuration

Raises:

ConfigError – When the layer 3 configuration is not yet set.

Example

ipv4_config = port.Layer3IPv4Get()
print(ipv4_config.DescriptionGet())
Layer3IPv4Set()

Sets the layer 3 IPv4 configuration of this port.

New in version 2.5.0.

Returns:

an object representing the IPv4 configuration for the ByteBlower port

Return type:

IPv4Configuration

Raises:
  • ConfigError – When an underlying layer 2 or layer 2.5 configuration is not yet fully configured.

  • ConfigError – When the layer 3 configuration is already set.

Once a layer 3 configuration is set, it cannot be destroyed or overwritten.

Both IPv4 and IPv6 are supported. Dual stack is not available on a single port, but can be achieved by creating 2 separate ports with identical layer 2 and (possibly) layer 2.5 configurations.

Example

Configure the Port’s network connection as an IPv4 host.

ipv4_config = port.Layer3IPv4Set()
Layer3IPv6Get()

Returns the layer 3 IPv6 configuration object of this port.

New in version 2.5.0.

Returns:

An object with the IPv6 configuration of the ByteBlower Port

Return type:

IPv6Configuration

Raises:

ConfigError – When the layer 3 configuration is not yet set.

Example

l3_config = port.Layer3IPv6Get()
Layer3IPv6Set()

Sets the layer 3 IPv6 configuration of this port.

New in version 2.5.0.

Return type:

IPv6Configuration

Raises:
  • ConfigError – When an underlying layer 2 or layer 2.5 configuration is not yet fully configured.

  • ConfigError – When the layer 3 configuration is already set.

Once a layer 3 configuration is set, it cannot be destroyed or overwritten.

Both IPv4 and IPv6 are supported. Dual stack is not available on a single port, but can be achieved by creating 2 separate ports with identical layer 2 and (possibly) layer 2.5 configurations.

Example

Configure the Port’s network connection as an IPv6 host.

bbPort1_l3 = port1.Layer3IPv6Set().IpManualAdd('3000:3128::24/64')
MDLGet()

Returns the port’s current Maximum Data Length (MDL), the maximum ethernet frame size that can be transmitted.

Returns:

Current MDL value in bytes.

Return type:

int

The MDL is the maximum size (in bytes) for any ethernet packet leaving the port. It includes the ethernet header, but excludes CRC, preamble and interframe gap. To calculate the maximum size of the layer 2 payload, substract the 14 bytes of the ethernet header.

This payload may be a layer 3 IP packet, a layer 2.5 VLAN tag followed by such a layer 3 IP packet or anything else.

The MDL value defaults to 1514, which corresponds with a layer 2 payload of 1500 bytes.

This value is used by the protocol stack. For example, the announced TCP Maximum Segment Size (MSS) is based on this MDL value. This value also limits the number of bytes that can be placed in a Frame when calling Frame.BytesSet().

Note

For ports without layer 2.5 configurations, the default MDL of 1514 will also lead to a maximum layer 3 packet size of 1500. This value is often called the Maximum Transmission Unit or MTU of an interface. When a port has a VLAN configuration however, the MTU will only be 1496 by default! Consider increasing the MDL to 1518 in such cases to simulate typical real-world behavior.

Note

On trunking interfaces the ByteBlower server adds a temporary VLAN automatically, to select an interface (e.g. trunk-1-10) on the ByteBlower switch. This is hidden from the user and has no influence on the MDL value. See ByteBlowerPort::MDLMaximumGet for more information.

Example

Typical values for a trunking and non-trunking port.

print(port1.MDLGet())
MDLMaximumGet()

Returns the port’s highest allowed Maximum Data Length (MDL) value, which is limited by the physical interface.

Returns:

Physical upper bound for the MDL in bytes.

Return type:

int

The MDL of a ByteBlower port places a limit on the size of ethernet frames that may be sent on that port. It can be modified by the user through MDLSet(). The MDL value (in bytes) covers the whole ethernet packet, but excluding CRC, preamble and interframe gap.

The physical ByteBlower interface (e.g. nontrunk-1) on which a port is created places an upper bound on the allowed MDL values. Through this method, this property can be retrieved at runtime.

The typical value of the maximum MDL is 9014 on non-trunking interfaces and 9010 on trunking interfaces.

Note

On trunking interfaces the ByteBlower server adds a temporary VLAN automatically, to select an interface (e.g. trunk-1-10) on the ByteBlower switch. This is hidden from the user. However, it also means that from a user perspective, the maximum MDL value of the same physical interface is 4 bytes less when it’s configured as a trunking interface.

Example

Typical values for a trunking and a non-trunking port.

print(port1.MDLMaximumGet())
MDLSet(mdl)

Sets the port’s Maximum Data Length (MDL), the maximum ethernet frame size that can be transmitted.

Parameters:

mdl (int) – New MDL value in bytes. Should be less then the value returned by MDLMaximumGet().

Raises:
  • TypeError – When the value is is not an integer.

  • ConfigError – When the provided value was larger than the maximum supported MDL.

See MDLGet() for more information.

Example

port.MDLSet(1350)
print(port.MDLGet())
# prints 1350
ProtocolHttpClientAdd()

Creates a HTTP client application to run on this port.

Return type:

HTTPClient

A :HTTPClient application can initiate customized HTTP sessions that are typically used to emulate a TCP connection.

It allows configuring the special HTTP requests to which a running HTTPServer application responds. For example, an HTTP client can ask (GET) for a response of a specified size or time or may send (PUT) a payload of a specified size or time itself.

Besides constructing such special HTTP requests, the HTTP client can interact with any normal webserver by configuring its URL.

Example

httpClient = port.ProtocolHttpClientAdd()
ProtocolHttpClientGet()

Returns the list of all HTTP client applications created on this port.

Returns:

returns a list of created HTTPClient objects

Return type:

HTTPClientList

See ProtocolHttpClientAdd() for more information.

Example

all_clients = port.ProtocolHttpClientGet()
print(all_clients.size())
ProtocolHttpClientRemove(arg2)

Removes the HTTP Client application from this port

Parameters:

client (HTTPClient) – The client to remove

ProtocolHttpMultiClientAdd()

Creates a Multi Client application on this port.

Return type:

HTTPMultiClient

Example

httpClient = port.ProtocolHttpMultiClientAdd()
ProtocolHttpMultiClientGet()

Returns the list of a HTTPMultiClient objects on this port.

Return type:

HTTPMultiClientList

Example

print(port.ProtocolHttpMultiClientGet())
ProtocolHttpMultiClientRemove(arg2)

Removes a HTTP Multiclient application from this port

Parameters:

client (HTTPMultiClient) – The HTTP MultiClient to remove

ProtocolHttpMultiServerAdd()

Creates a HTTP MultiServer application on this port.

Return type:

HTTPMultiServer

Example

# create the HTTP client
httpServer = port.ProtocolHttpMultiServerAdd()
ProtocolHttpMultiServerGet()

Returns the list of HTTPMultiServer objects on this port.

Return type:

HTTPMultiServerList

Example

print(port.ProtocolHttpMultiServerGet())
ProtocolHttpMultiServerRemove(arg2)

Removes a HTTP MultiServer application from this port

Parameters:

server (HTTPMultiServer) – The HTTP MultiServer object to remove

ProtocolHttpServerAdd()

Creates a HTTP server application to run on this port.

Returns:

an object representing an HTTP Server object.

Return type:

HTTPServer

An HTTP Server application is a customized HTTP server that is typically used to emulate a TCP connection.

It listens for special HTTP requests (sent by HTTPClient applications) and responds in the desired way. For example, an HTTP request may ask (GET) for a response of a specified size and the HTTP server will emulate sending such a file back.

Example

http_server = port.ProtocolHttpServerAdd()
ProtocolHttpServerGet()

Returns the list of all HTTP server applications created on this port.

See ProtocolHttpServerAdd() for more information.

Returns:

A list of HTTP Server objects.

Return type:

HTTPServerList

Example

print(port.ProtocolHttpServerGet())
ProtocolHttpServerRemove(arg2)

Removes a HTTP server application to from this port.

Parameters:

server (HTTPServer) – HTTP Server object to remove

ProtocolTelnetClientAdd()

Creates a Telnet client application to run on this port.

New in version API: 2.2.0

Return type:

TelnetClient

A Telnet Client application can contact and interact with an external Telnet server.

Apart from simulating such scenarios for its own sake, this application can be used to contact important nodes within the NUT (e.g. a router) and retrieve relevant statistics from it.

Example

protocolTelnetClient = port.ProtocolTelnetClientAdd()
ProtocolTelnetClientGet()

Returns the list of all Telnet client applications created on this port.

New in version API: 2.2.0

Return type:

TelnetClientList

See ProtocolTelnetClientAdd() for more information.

Example

protocolTelnetClient = port.ProtocolTelnetClientGet()
ProtocolTelnetClientRemove(arg2)

Removes a Telnet client application from this port

Parameters:

client (TelnetClient) – Telnet client to remove

ResultClear()

Clears the counters for the ByteBlower port and empties the ByteBlowerPortResultHistory.

Example

port.ResultClear()
ResultGet()

Returns the result object.

Returns:

A result object which contains the packet count, byte count etc for this ByteBlower port.

Return type:

ByteBlowerPortResultSnapshot

Example

result = port.ResultGet()
print(result.DescriptionGet())
ResultHistoryGet()

Returns the history for the counters for the ByteBlower port.

Returns:

An object representing the history of the counters of the ByteBlower Port

Return type:

ByteBlowerPortResultHistory

Example

historyResult = port.ResultHistoryGet()
print(historyResult.DescriptionGet())
RxCaptureBasicAdd()

Creates a capture tool, which captures the data and metadata of incoming frames (possibly restricted by a filter).

New in version 2.5.0.

Returns:

An object representing the servers implementation of the capture functionality

Return type:

CaptureRawPacket

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

Typically, the filter should limit the matching packets to the interesting traffic, especially since capturing all incoming bytes at high rates may place a heavy load on the server.

Note

Unlike other Rx objects, the capture tool is not activated as soon as it is created. See the class documentation of the returned types for more information.

Warning

Using this tool requires a lot of system resources. Try to avoid capturing at high rates or for a long time. Set the capture filter as strict as possible to avoid unwanted traffic. When too much incoming traffic must be processed, the ByteBlower server may become unstable.

Note

It is also possible to log in to the server and capture there. Note that when capturing a trunking interface (i.e. connected to a switch) you will see an extra VLAN tag that shows to or from which interface the traffic goes. This is currently only possible on the 1x00 series, where the Linux tcpdump tool can sniff the server’s (native) data interfaces.

Note

This functionality is also available with a stand-alone command-line tool. It can be found and downloaded on our support portal.

The returned capture tool is a basic capture tool stores both the frame data and some metadata.

Example

captureTool = port.RxCaptureBasicAdd()
captureTool.Start()
RxCaptureBasicGet()

Returns the list of capture tools created on this port.

Return type:

CaptureRawPacketList

See RxCaptureBasicAdd() for more information.

Example

tools = port.RxCaptureBasicGet()
RxCaptureBasicRemove(inCapture)

Removes a capture

Parameters:

capture (CaptureRawPacket) – The object returned by RxCaptureBasicAdd() or RxCaptureBasicGet()

RxLatencyBasicAdd()

Creates a latency calculator, which computes latency measurements based on timestamps in received frames (possibly restricted by a filter).

New in version 2.5.0.

Return type:

LatencyBasic

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

Typically, the filter should limit the matching traffic to the Tx.Stream whose transmitted frames actually contain the required timestamps!

The latency calculator is activated as soon as it is created, so don’t forget to reset its counters after setting the filter and initializing your test.

See Frame for information on timestamping.

Example

latency = port.RxLatencyBasicAdd()
RxLatencyBasicGet()

Returns the list of latency calculators created on this port.

New in version 2.5.0.

Return type:

LatencyBasicList

See RxLatencyBasicAdd() for more information.

Example

all_latency = port.RxLatencyBasicGet()
print(all_latency.size())
# prints 1
RxLatencyBasicRemove(inLatency)

Removes a Basic Latency Trigger from this port

Parameters:

trigger (LatencyBasic) – Trigger object to remove

RxLatencyDistributionAdd()

Creates a latency calculator, which computes latency measurements based on timestamps in received frames (possibly restricted by a filter).

New in version 2.5.0.

Return type:

LatencyDistribution

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

Typically, the filter should limit the matching traffic to the Tx.Stream whose transmitted frames actually contain the required timestamps!

The latency calculator is activated as soon as it is created, so don’t forget to reset its counters after setting the filter and initializing your test.

See Frame for information on timestamping.

Example

distribution = port.RxLatencyDistributionAdd()
RxLatencyDistributionGet()

Returns the list of latency calculators created on this port.

New in version 2.5.0.

Return type:

LatencyDistributionList

See RxLatencyDistributionAdd() for more information.

Example

all_latency = port.RxLatencyDistributionGet()
RxLatencyDistributionRemove(inLatency)

Removes a Latency Distribution trigger from this port

Parameters:

trigger (LatencyDistribution) – Trigger to remove

RxOutOfSequenceBasicAdd()

Creates an out-of-sequence detector, which counts such cases based on sequence numbers in received frames (possibly restricted by a filter).

New in version 2.5.0.

Returns:

Created out-of-sequence detector object.

Return type:

OutOfSequence

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

Typically, the filter should limit the matching traffic to the Stream whose transmitted frames actually contain the required sequence numbers!

The out-of-sequence detector is activated as soon as it is created, so don’t forget to reset its counters after setting the filter and initializing your test.

Example

out_of_sequence = port.RxOutOfsequenceBasicAdd()
# lets assume traffic is sent to UDP port 9000
out_of_sequence.FilterSet('ip && dst port 9000')
print(out_of_sequence.DescriptionGet())
RxOutOfSequenceBasicGet()

Returns the list of out-of-sequence detectors created on this port.

New in version 2.5.0.

Returns:

A list of created objects

Return type:

OutOfSequenceList

See RxOutOfSequenceBasicAdd() for more information.

Example

all_oos = port.RxOutOfSequenceBasicGet()
print(all_oos.size())
# prints 1
RxOutOfSequenceBasicRemove(inOutOfSequence)

Removes an Out-of-Sequence trigger from the port

Parameters:

trigger (OutOfSequence) – Trigger to remove

RxTriggerBasicAdd()

Creates a basic receive trigger, whose counters are updated for each received frame (possibly restricted by a filter).

New in version 2.5.0.

Returns:

A basic trigger object, which allows to configure the trigger and getting the results

Return type:

TriggerBasic

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

The receive trigger is activated as soon as it is created, so don’t forget to reset its counters after setting the filter and initializing your test.

See the class documentation of the returned types for more information.

Example

trigger = port.RxTriggerBasciAdd()
RxTriggerBasicGet()

Returns the list of receive triggers created on this port.

New in version 2.5.0.

Returns:

an object representing a list of create basic triggers

Return type:

TriggerBasicList

See RxTriggerBasicAdd() for more information.

Example

all_triggers = port.RxTriggerBasicGet()
print(all_triggers.size())
# prints 1  
RxTriggerBasicRemove(arg2)

Removes a created basic trigger

Parameters:

trigger (TriggerBasic) – Trigger to remove

RxTriggerSizeDistributionAdd()

Creates a size distribution receive trigger, whose counters are updated for each received frame (possibly restricted by a filter).

New in version 2.5.0.

Return type:

TriggerSizeDistribution

Like all incoming packet processors (or ‘Rx’ objects), this object listens to incoming traffic matching a configurable BPF filter and performs some action when it arrives.

The receive trigger is activated as soon as it is created, so don’t forget to reset its counters after setting the filter and initializing your test.

See the class documentation of the returned types for more information.

Example

trigger = port.RxTriggerSizeDistributionAdd()
RxTriggerSizeDistributionGet()

Returns the list of receive triggers created on this port.

New in version 2.5.0.

Returns:

A list with all the sizedistribution triggers created

Return type:

TriggerSizeDistributionList

See RxTriggerSizeDistributionAdd() for more information.

Example

all_size_dists = port.RxTriggerSizeDistributionGet()
print(all_size_dists.size())
# prints 1
RxTriggerSizeDistributionRemove(arg2)

Removes a created size distribution trigger

Parameters:

trigger (TriggerSizeDistribution) – Trigger to remove

Start()

Starts all transmit streams and schedulable objects configured on this port.

See ByteBlower.PortsStart, which does the same for a set of ports, for more information.

Example

port.Start()
Stop()

Stops all transmit streams and schedulable objects configured on this port.

Example

port.Stop()
TunnelTcpAdd()

Creates a TCP tunnel object.

Returns:

The created tunnel. This object can be used to configure the tunnel

Return type:

TCPTunnel

A TCP Tunnel can be used to configure TCP port forwarding between the user’s office network and the lab network.

Through the protocol, a client can requesting dynamic changes to the firewall or NAT port forwarding settings of a (PCP-enabled) gateway.

Example

tunnel = port.TunnelTcpAdd()
print(tunnel.DescriptionGet())
TunnelTcpGet()

Returns a list of all TCP Tunnel objects created on this port.

Return type:

TCPTunnelList

See TunnelTcpAdd() for more information.

Example

tunnelTcp = port.TunnelTcpGet()
TunnelTcpRemove(arg2)

Removes the given TCP Tunnel application from this port

Parameters:

tunnel (TCPTunnel) – TCP Tunnel to remove

TxStreamAdd()

Creates a transmit stream, which can be configured to blast layer 2 frames traffic from this port in a stateless way.

Returns:

an object representing a pure frame blasting stream.

Return type:

Stream

Initially, a stream does not contain any traffic. It must still be configured by adding content (in the form of Frame objects) and timing information (especially the interframe gap).

A Stream can be compared to the transmitting part of a frame blasting flow in the GUI.

Example

stream = port.TxStreamAdd()
TxStreamGet()

Returns a list of transmit streams created on this port.

Returns:

A list with all created Stream objects

Return type:

StreamList

Example

streams = port.TxStreamGet()
print(streams.size())
# prints 1
TxStreamRemove(inStream)

Removes a created ByteBlower Stream from a port

Parameters:

stream (Stream) – Stream object to remove

property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortCounterType

Bases: object

RxAll = 2

TODO

RxBroadcast = 0

TODO

RxUnicast = 1

TODO

class byteblowerll.byteblower.ByteBlowerPortList(*args)

Bases: object

A list of ByteBlowerPort objects

This object represents a list of ByteBlowerPort objects.

The list can be accessed using the standard python list syntax

from __future__ import print_function
from byteblowerll.byteblower import ByteBlower
bb = ByteBlower.InstanceGet()
server = bb.ServerAdd('byteblower-1.lab.byteblower.excentis.com')

# create 2 ports
p1 = server.PortCreate('trunk-1-1')
p2 = server.PortCreate('trunk-1-2')

ports = server.PortGet()

print('Number of created ports', str(len(ports)))
# prints 'Number of created ports 2'

for port in ports:
    print(port.InterfaceNameGet())

# prints the following output :
# trunk-1-1
# trunk-1-2
append(x)
clear()
empty()
erase(*args)
iterator()
push_back(x)

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use append().

property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortResultData(*args, **kwargs)

Bases: AbstractObject

ByteBlower port counter result set.

The result set contains three different counters:

  • a Unicast counter, which counts all received unicast Ethernet frames.

  • a Broadcast counter, which counts all received broadcast Ethernet frames.

  • an All counter, which counts all received Ethernet frames.

Note

The ‘all’ counter can be seen as the combination of the unicast and the broadcast counter.

Note

See What’s new in API v2 for more information.

A ByteBlower port result data snapshot object can be created via a ByteBlowerPortResultData or ByteBlowerPort.ResultSnapshot

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

result = port.ResultHistoryGet()
resultData = result.CumulativeLatestGet()
IntervalDurationGet()

Gets the configured duration of this results snapshot.

New in version 2.3.0.

Returns:

The interval duration for this sample in nanoseconds

Return type:

int

Example

This example gets interval duration of this result snapshot

print(resultData.IntervalDurationGet())
RxAllGet()

Gets the received counters for the port.

Returns:

a statistics object which contains all counters from a port

Return type:

ByteBlowerPortResultRxData

Example

print(resultData.RxAllGet().DescriptionGet())
RxBroadcastGet()

Gets the received broadcast counters for the port.

Returns:

A statistics object which contain all counters from a port. This will only contain the broadcast packets received on the port.

Return type:

ByteBlowerPortResultRxData

Example

print(resultData.RxBroadcastGet().DescriptionGet())
RxUnicastGet()

Gets the received unicast counters for the port.

Returns:

a statistics object which contain all unicast counters from a port. This will only contain the broadcast unicast received on the port.

Return type:

ByteBlowerPortResultRxData

Example

print(resultData.RxUnicastGet().DescriptionGet())
TimestampGet()

Gets the snapshot timestamp.

Returns:

the snapshot timestamp in nanoseconds from epoch when this snapshot was created.

Return type:

int

Example

This example gets the snapshot timestamp.

print(resultData.TimestampGet())
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortResultDataList(*args)

Bases: object

This is a List of multiple ByteBlowerPortResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Port counter result history.

The port counter history is - as always - available in two flavors: the cumulative and the interval results

Note

The information is not updated until Refresh is called on this object.

Note

See History result for more information.

A result history object can be created via a ByteBlowerPort, using ByteBlowerPort.ResultHistoryGet()

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

port_resultHistory = port.ResultHistoryGet()
Clear()

Removes the locally stored history snapshots.

This can be used to save memory in long tests where the results are requested at regular intervals.

Warning

Any interval or cumulative result object returned from this history object before calling Clear() will be destroyed and thus become unusable.

CumulativeGet()

Returns a list of available cumulative counters.

Returns:

a list containing the Interval counters

Return type:

ByteBlowerPortResultDataList

Example

This example gets the available cumulative counters

for results in port_resultHistory.CumulativeGet():
     print(results.DescriptionGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – Index of the cumulative snapshot to query

Returns:

cumulative counter object at the specified index

Return type:

ByteBlowerPortResultData

Example

This example gets the available cumulative counters

print(resultHistory.CumulativeGetByIndex(0).DescriptionGet())
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp nanoseconds.

New in version 2.2.

Parameters:

timestamp (int) – timestamp in nanoseconds since epoch identifying the snapshot

Returns:

The queried snapshot

Return type:

ByteBlowerPortResultData

Example

This example gets the available cumulative counters

print(port_resultHistory.CumulativeGetByTime(timestamp).DescriptionGet())
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.

Returns:

The last closed cumulative counter object.

Return type:

ByteBlowerPortResultData

Example

This example gets the available cumulative counters

print(port_resultHistory.CumulativeLatestGet.DescriptionGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(port_resultHistory.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval counters.

Returns:

a list containing the Interval counters

Return type:

ByteBlowerPortResultDataList

Example

This example gets the available interval counters

for i in resultHistory.IntervalGet():
     print(i.DescriptionGet())
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – Index of the interval to query

Returns:

interval counter object at the specified index

Return type:

ByteBlowerPortResultData

Example

This example gets the available interval counters

print(port_resultHistory.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

New in version 2.2.

Return type:

ByteBlowerPortResultRxData

Example

This example gets the available interval counters

interval = port_resultHistory.IntervalGetByTime(timestamp)
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.

Returns:

The last closed interval counter object.

Return type:

ByteBlowerPortResultData

Example

This example gets the available interval counters

print(port_resultHistory.IntervalLatestGet.DescriptionGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

print(port_resultHistory.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history is requested.

Returns:

Timestamp on the server when the current history is requested in nanoseconds since epoch

Return type:

int

Example

print(port_resultHistory.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Returns:

The length of the sample buffer

Return type:

int

Example

print(port_resultHistory.SamplingBufferLengthGet())
SamplingBufferLengthSet(inCount)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Parameters:

length (int) – New number of samples to store.

Example

port_resultHistory.SamplingBufferLengthSet(10)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Return type:

int

Example

print(port_resultHistory.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

duration (int) – New duration for a new snapshot interval expressed in nanoseconds

Warning

This affects all users on the same ByteBlower interface.

Warning

The previously collected history will be invalidated.

Example

print(port1_resultHistory.SamplingIntervalDurationGet())
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortResultRxData(*args, **kwargs)

Bases: AbstractObject

ByteBlower port counter result set.

A ByteBlower port result data snapshot object can be created via a ByteBlowerPortResultData or ByteBlowerPortResultSnapshot

Note

See What’s new in API v2 for more information.

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

rx_result=port_result.RxAllGet()
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(rx_result.ByteCountGet())
ByteCountWithCRCGet()

Gets the current received bytes counter with the CRC.

Return type:

int

Example

This example gets the received bytes counter

print(rx_result.ByteCountWithCRCGet())
CounterType_RxAll = 2
CounterType_RxBroadcast = 0
CounterType_RxUnicast = 1
FramesizeMaximumGet()

Gets the largest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the largest frame size received in this snapshot.

print(rx_result.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the smallest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest frame size received in this snapshot.

print(rx_result.FramesizeMinimumGet())
IntervalDurationGet()

Returns the duration of this sample

Returns:

The duration in nanoseconds

Return type:

int

PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(rx_result.PacketCountGet())
TimestampFirstGet()

Gets the timestamp of the first packet in this snapshot.

Returns:

The timestamp in nanoseconds since epoch when the first packet in this was counted

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp of the first received packet in this snapshot

print(rx_result.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp.

Returns:

The timestamp in nanoseconds since epoch when this sample was created

Return type:

int

Example

This example gets the snapshot timestamp.

print(rx_result.TimestampGet()) 
TimestampLastGet()

Gets the current timestamp of the last packet in this snapshot.

Returns:

The timestamp in nanoseconds of the last packet in this sample

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp of the last received packet in this snapshot.

print(rx_result.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerPortResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

ByteBlower port counter result set.

The result set contains three different counters:

  • a Unicast counter, which counts all received unicast Ethernet frames.

  • a Broadcast counter, which counts all received broadcast Ethernet frames.

  • an All counter, which counts all received Ethernet frames.

Note

The “all” counter can be seen as the combination of the unicast and the broadcast counter.

Note

See What’s new in API v2 for more information.

A ByteBlower port result data snapshot object can be created via a ByteBlowerPortResultData or ByteBlowerPortResultSnapshot

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

port_result = port.ResultGet()
Clear()

Resets all counters back to 0

IntervalDurationGet()

Gets the configured duration of this results snapshot.

New in version 2.3.0.

Returns:

The duration of this sample in nanoseconds

Return type:

int

Example

This example gets interval duration of this result snapshot

print(port_result.IntervalDurationGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current snapshot is requested.

Returns:

Timestamp on the server when the current snapshot is requested in nanoseconds since epoch

Return type:

int

When the snapshot is part of a history, the refresh timestamp will be the same as refresh timestamp of the History object.

Note

This is not the same as TimestampGet()

Example

print(port_result.RefreshTimestampGet())
RxAllGet()

Gets the received counters for the port.

Returns:

a statistics object which contain all counters from a port.

Return type:

ByteBlowerPortResultRxData

Example

print(port_result.RxAllGet.DescriptionGet())
RxBroadcastGet()

Gets the received broadcast counters for the port.

Returns:

A statistics object which contain all counters from a port. This will only contain the broadcast packets received on the port.

Return type:

ByteBlowerPortResultRxData

Example

print(port_result.RxBroadcastGet.DescriptionGet())
RxUnicastGet()

Gets the received unicast counters for the port.

Returns:

a statistics object which contain all unicast counters from a port. This will only contain the broadcast unicast received on the port.

Return type:

ByteBlowerPortResultRxData

Example

print(port_result.RxUnicastGet.DescriptionGet())
TimestampGet()

Gets the snapshot timestamp.

Returns:

Timestamp on the server when the current snapshot is created in nanoseconds since epoch

Return type:

int

Example

This example gets the snapshot timestamp.

print(port_result.TimestampGet())
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerServer(*args, **kwargs)

Bases: AbstractObject

Representation of a client connection to a shared, physical ByteBlower server, which can send and receive network traffic through its interfaces.

Using this class, ByteBlower ports (logical network hosts) can be docked to a NUT at a specific place.

Furthermore, information about a shared ByteBlower Server, such as the available interfaces and the current connections can be retrieved.

InterfaceGetByName(name)

Gets a specific ByteBlower Interface

Parameters:

name (str) – Name of the interface to fetch

Return type:

ByteBlowerInterface

Example

interface = server.InterfaceGetByName('trunk-1-1')
InterfaceNamesGet()

Shows the available physical ByteBlower interfaces on the ByteBlower server.

Returns:

A list of all available physical interfaces on this server.

Return type:

StringList

The available interfaces on a server depend on the static server configuration. Only the presence of USB interfaces can change dynamically (using ::Update).

ByteBlower interfaces are represented by a string code formatted as follows:

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where X is the server interface on which the switch is connected and Y is the interface number on the switch itself.

  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where X is the (server) interface.

This format is used as keys in the key-value pair list returned by UsersGet(). It is also the format that should be passed to PortCreate() method as argument.

Example

Assume server has a single 48-port trunking interface and a single non-trunking interface.

server.InterfaceNamesGet()
# Returns ['trunk-1-1', 'trunk-1-2', 'trunk-1-3', ... , 'trunk-1-48', 'nontrunk-1']
PacketDumpCreate(*args)

Creates a PacketDump object on the specified ByteBlower interface.

New in version 2.9.0.

Parameters:

interface (str) – Interface name of the ByteBlower interface

Return type:

PacketDump

Raises:

ConfigError – UnknownByteBlowerInterface When the specified interface name does not exist on the connected server.

The PacketDump API allows to capture all incoming and outgoing network traffic on a ByteBlower interface.

Example

Create a PacketDump object on trunk-1-1

dump = server.PacketDumpCreate('trunk-1-1')

Creates a PacketDump object on the specified ByteBlower interface.

New in version 2.9.0.

Parameters:

interface (ByteBlowerInterface) – ByteBlower Interface to create a dump on

Return type:

PacketDump

Raises:

ConfigError – UnknownByteBlowerInterface When the specified interface name does not exist on the connected server.

The PacketDump API allows to capture all incoming and outgoing network traffic on a ByteBlower interface.

Example

Create a PacketDump object on trunk-1-1

interface = server.InterfaceGetByName('trunk-1-1')
dump = server.PacketDumpCreate(interface)
PacketDumpDestroy(packet_dump)

Removes a created packetdump

PhysicalInterfacesGet()

Gets a list of Physical Interfaces

Return type:

PhysicalInterfaceList

PhysicalInterfacesGetByType(inPhysicalInterfaceType)

Gets a list of Physical Interfaces for a given type

Parameters:

type (PhysicalInterfaceType) – Type to filter on

Return type:

PhysicalInterfaceList

PortCreate(*args)

Creates a new ByteBlower port on the specified ByteBlower interface.

Parameters:

interface (str) – String code for the ByteBlower interface on which to create the port.

Return type:

ByteBlowerPort

Raises:

ConfigError – UnknownByteBlowerInterface When the specified interface name does not exist on the connected server.

By specifying a physical ByteBlower interface, we can ‘attach’ a ByteBlower port (which represents a network host) to the NUT somewhere. This depends of the physical set-up.

Available ByteBlower interfaces depend on the server type and configuration. Available interfaces on the connected server can be shown using InterfaceNamesGet().

ByteBlower interfaces are represented by a string code formatted as follows:

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where X is the server interface on which the switch is connected and Y is the interface number on the switch itself.

  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where X is the (server) interface.

Example

Create a simulated host and attach it to the NUT. More specifically, locate it within the ethernet subnet connected to the first interface of the first ByteBlower switch.

port = server.PortCreate('trunk-1-1')

Creates a new ByteBlower port on the specified ByteBlower interface.

Parameters:

interface (ByteBlowerInterface) – The ByteBlower interface to create the port on.

Return type:

ByteBlowerPort

By specifying a physical ByteBlower interface, we can ‘attach’ a ByteBlower port (which represents a network host) to the NUT somewhere. This depends of the physical set-up.

Available ByteBlower interfaces depend on the server type and configuration. Available interfaces on the connected server can be shown using InterfaceNamesGet().

ByteBlower interfaces are represented by a string code formatted as follows:

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where X is the server interface on which the switch is connected and Y is the interface number on the switch itself.

  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where X is the (server) interface.

Example

Create a simulated host and attach it to the NUT. More specifically, locate it within the ethernet subnet connected to the first interface of the first ByteBlower switch.

interface = server.InterfaceGetByName('trunk-1-1')
port = server.PortCreate(interface)

Creates a new ByteBlower port on the specified ByteBlower interface.

Parameters:
  • interface (PhysicalInterface) – The ByteBlower Physical interface to create the port on.

  • portId (int) – Number of the interface on which to create the port on

Return type:

ByteBlowerPort

By specifying a physical ByteBlower interface, we can ‘attach’ a ByteBlower port (which represents a network host) to the NUT somewhere. This depends of the physical set-up.

Available ByteBlower interfaces depend on the server type and configuration. Available interfaces on the connected server can be shown using InterfaceNamesGet().

ByteBlower interfaces are represented by a string code formatted as follows:

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where X is the server interface on which the switch is connected and Y is the interface number on the switch itself.

  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where X is the (server) interface.

Example

Create a simulated host and attach it to the NUT. More specifically, locate it within the ethernet subnet connected to the first interface of the first ByteBlower switch.

port = server.PortCreate(physical, 1)
PortDestroy(inPort)

Remmoves a ByteBlower Port from the server.

Parameters:

port (ByteBlowerPort) – ByteBlower Port to remove

This will stop the ByteBlower Port and remove all configured items on this ByteBlower Port

PortGet()

Returns a list of all ByteBlower ports created through this server connection.

Returns:

A list of ByteBlowerPort objects

Return type:

ByteBlowerPortList

Only ports created through the connection represented by this object are returned, not those created by other client instances (either GUI or API) or those created by other server connections within this API instance! See UsersGet() to see the interfaces on which other users have created ports.

port = server.PortGet()
PortsStart(inPorts)

Starts all ByteBlower Port objects on this server.

Parameters:

ports (ByteBlowerPortList) – List of ByteBlowerPort objects to start

See ByteBlowerPort.Start for more information

PortsStartAll()

Starts all ByteBlower Port objects on this server.

See ByteBlowerPort.Start for more information

PortsStop(inPorts)

Stops all ByteBlower Port objects on this server.

Parameters:

ports (ByteBlowerPortList) – List of ByteBlowerPort objects to stop

See ByteBlowerPort.Stop for more information

PortsStopAll()

Stops all ByteBlower Port objects on this server.

See ByteBlowerPort.Stop for more information

ResultsRefreshAll()

Refreshes all result objects created on this ByteBlower Server

ServiceInfoGet()

Returns the service information of the ByteBlower server daemon.

New in version 2.6.0.

Return type:

ByteBlowerServerServiceInfo

server.ServiceInfoGet()
TimestampGet()

Returns the current timestamp on the server.

New in version 2.3.0.

Retrieves the current timestamp of the server in nanoseconds. This can be used to calculate the offset between two servers to compare results.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Assume the client is connected (through this object) to a server:

server.TimestampGet()
# :return: 1432805398000000000 
Update()

Updates dynamic interfaces (e.g. USB) on the connected server.

Deprecated since version 2.0: Since 2.0 are USB interfaces not supported anymore

Raises:

TechnicalError – This method is not implemented anymore at the ByteBlower Server

This methods looks for attached USB interfaces and updates its available interfaces. If USB interfaces are attached, they will be returned by PhysicalInterfacesGet() after this running this method.

UsersGet()

Shows which physical interfaces of the (shared) physical ByteBlower server are currently used by which clients.

Returns:

A list of User objects, one for each physical ByteBlower interface with one or more ports configured on it. The name is the string representation of the interface, the value is a list of the server connections (represented by their client’s hostname) which have created ports on that interface.

Return type:

UserList

This method gives an overview of how a ByteBlower server is currently used. It displays which client connections (whether from GUI scenario runs or API sessions) have created ByteBlowerPort objects on which of the server’s physical ByteBlower interfaces.

Such a client connection to a server is represented by this very ByteBlowerServer type! As soon as some client instance (e.g. a TCL shell, python interpreter or a GUI) on some client computer creates such server object, a connection is established to that shared server.

Multiple client instances can be active on the same host. For example, a single host may be running a GUI scenario, two python scripts and an interactive Tcl session at the same time. Similarly, a single client instance may have multiple parallel connections to the same server, by calling ByteBlower.ServerAdd() multiple times for the same server URL or IP.

The server’s physical interfaces are statically configured on the server machine and can be retrieved using PhysicalInterfacesGet(). They are shared among all connected clients.

Client connections are identified by the client’s hostname. This means that all server connections from all client instances on a single host will all be different ‘users’, but will have the same string representation. If they use the same interfaces, that hostname will simply appear multiple times.

As soon as a specific ByteBlowerServer (representing a client connection) creates a first ByteBlowerPort on some interface, it is ‘using’ that interface. The interface is no longer used when all all ports created by that server on it are destroyed. Ports can be destroyed in the following ways:

  • Explicitly, by calling PortDestroy() on the ByteBlowerServer

  • By destroying the ByteBlowerServer for that port. This is also what happens when a GUI finishes or cancels a scenario.

  • By destroying that client instances root ByteBlower object. This is also what happens when a client process (GUI or API) is killed.

Example

Assume three client instances are currently connected to this server. The first runs on John’s PC, the second runs on Jane’s PC and the last one is a second client instance connecting John’s PC. Note the non-trunking interface is used by multiple client instances!

userList = server.UsersGet()
property thisown

The membership flag

exception byteblowerll.byteblower.ByteBlowerServerIncompatible(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerServerList(*args)

Bases: object

This is a List of multiple ByteBlowerServer objects.

It can be iterated just like a normal Python list.

append(x)
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ByteBlowerServerServiceInfo(*args, **kwargs)

Bases: ServiceInfo

This class contains information on the ByteBlower System.

New in version 2.6.0.

With this object you can get information concerning the Type / version / IP or hostname etc… information.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
service_info = server.ServiceInfoGet()
ConnectionHostGet()

Returns the host (either registered name or IP address) used to connect to the ByteBlower server.

Return type:

str

Example

print(service_info.ConnectionHostGet())
# prints 'bytblower-1.lab.byteblower.com'
ConnectionIPAddressGet()

Returns the IP address used to connect to the ByteBlower server.

Return type:

str

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
server.PortCreate('trunk-1-1')
service_info = server.ServiceInfoGet()
print(service_info.ConnectionIPAddressGet())
# prints ip address
ConnectionPortNumberGet()

Returns the TCP port number of the connected ByteBlower server.

Return type:

int

Example

print(service_info.ConnectionPortNumberGet())
LicenseGet()

Returns the License information for this ByteBlower server.

New in version 2.6.0.

Deprecated since version 2.10.

Return type:

ByteBlowerLicense

Each physical ByteBlower server (represented by this type of object) has a specific ByteBlower License.

ManagementIPAddressGet()

Returns all management IP addresses of the connected ByteBlower server.

New in version 2.6.0.

Returns:

List of management IP addresses

Return type:

StringList

Example

print(service_info.ManagementIPAddressGet())
property thisown

The membership flag

exception byteblowerll.byteblower.ByteBlowerServerUnreachable(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.CHAPProtocol(*args, **kwargs)

Bases: PPPAuthProtocol

Represents the Challenge-Handshake Authentication Protocol

PPP defines an extensible Link Control Protocol, which allows negotiation of an Authentication Protocol for authenticating its peer before allowing Network Layer protocols to transmit over the link.

This class provides the Password Authentication protocol as described per :rfc:1334, section 3

The Challenge-Handshake Authentication Protocol (CHAP) is used to periodically verify the identity of the peer using a 3-way handshake. This is done upon initial link establishment, and MAY be repeated anytime after the link has been established.

After the Link Establishment phase is complete, the authenticator sends a “challenge” message to the peer. The peer responds with a value calculated using a “one-way hash” function. The authenticator checks the response against its own calculation of the expected hash value. If the values match, the authentication is acknowledged, otherwise the connection SHOULD be terminated.

CHAP provides protection against playback attack through the use of an incrementally changing identifier and a variable challenge value. The use of repeated challenges is intended to limit the time of exposure to any single attack. The authenticator is in control of the frequency and timing of the challenges.

This authentication method depends upon a “secret” known only to the authenticator and that peer. The secret is not sent over the link. This method is most likely used where the same secret is easily accessed from both ends of the link.

By default, authentication is not mandatory. If authentication of the link is desired, an implementation MUST specify the Authentication-Protocol Configuration Option during Link Establishment phase.

New in version 2.5.0.

GetPPPProtocol(*args)
SecretGet()

Returns the configured Secret.

Returns:

Secret value

Todo

Real Example

SecretSet(secret)

Configures the Secret on the Challenge Handshake Authentication Protocol (CHAP)

Parameters:

secret – The secret for authenticating to the PPP server.

Todo

Real Example

property thisown

The membership flag

class byteblowerll.byteblower.CHAPProtocolList(*args)

Bases: object

This is a List of multiple CHAPProtocol objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.Capability(*args, **kwargs)

Bases: AbstractObject

Represents a capability, A feature it supports or not.

Using this class, you can check if e.g. a ByteBlower Endpoint supports latency measurements or not

Available Capabilities: - TODO

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
port = server.PortCreate('trunk-1-1')
capability_list = port.CapabilityListGet()
capability = capability_list[0]
# print version
print(capability.VersionAddedGet())
CapabilityDescriptionGet()

Returns a human-readable description of the capability.

Returns:

A human readable description

Return type:

str

Example

print(capability.CapabilityDescriptionGet())
NameGet()

Returns a human-readable name of the capability.

Returns:

The human readable name of the capability.

Rtype str:

Example

print(capability.NameGet())
ValueGet()

Returns a CapabilityValue object.

Returns:

the value of the capability

Return type:

CapabilityValue

Example

capabilityValue = capability.ValueGet()
VersionAddedGet()

Returns the ByteBlower Server/ByteBlower MeetingPoint version since when this capability is added.

Returns:

The server/meetingpoint version the capability was added

Return type:

str

Example

print(capability.VersionAddedGet())
property thisown

The membership flag

class byteblowerll.byteblower.CapabilityList(*args)

Bases: object

This is a List of multiple Capability objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.CapabilityValue(*args, **kwargs)

Bases: AbstractObject

The Capability Value class.

A capability ( Capability ) can have a different type of value (INTEGER, BOOLEAN, STRING). Using TypeGet() you can discover the value-type and then use the corresponding getter to get the real value

BooleanGet()

Returns the value as a boolean.

Returns:

The value of the capability as a boolean (if possible)

Return type:

bool

Example

capabilityType = capabilityValue.TypeGet()
if capabilityType==0:
    print(capabilityValue.BooleanGet())
elif capabilityType==1:
    print(capabilityValue.IntegerGet())
else:
    print(capabilityValue.StringGet())
IntegerGet()

Returns the value as an integer.

Returns:

The value of the capability as an integer

Return type:

int

Example

capabilityType = capabilityValue.TypeGet()
if capabilityType==0:
    print(capabilityValue.BooleanGet())
elif capabilityType==1:
    print(capabilityValue.IntegerGet())
else:
    print(capabilityValue.StringGet())
StringGet()

Returns the value as a string.

Returns:

The capability value as a string

Return type:

str

Example

capabilityType = capabilityValue.TypeGet()
if capabilityType==0:
    print(capabilityValue.BooleanGet())
elif capabilityType==1:
    print(capabilityValue.IntegerGet())
else:
    print(capabilityValue.StringGet())
TypeGet()

Returns the type of value.

Returns:

The type of the value

Return type:

CapabilityValueType

Example

capabilityType = capabilityValue.TypeGet()
if capabilityType==0:
    print(capabilityValue.BooleanGet())
elif capabilityType==1:
    print(capabilityValue.IntegerGet())
else:
    print(capabilityValue.StringGet())
Type_BOOLEAN = 0
Type_INTEGER = 1
Type_STRING = 2
property thisown

The membership flag

class byteblowerll.byteblower.CapabilityValueType

Bases: object

BOOLEAN = 0

The given capability is a Boolean value, containing True or False

INTEGER = 1

The given capability is an integer value

STRING = 2

The given capability is a string value

class byteblowerll.byteblower.Capture(*args, **kwargs)

Bases: Rx

Abstract base class for a capture

FileNameRemoteGet()
ResultGet()
Start()
Stop()
property thisown

The membership flag

class byteblowerll.byteblower.CaptureRawPacket(*args, **kwargs)

Bases: Capture

This class is used to capture the raw packet data that is received on the Physical interface that is associated with a ByteBlowerPort.

With this class, one can capture the data that is received by the ByteBlower Port and save this to a pcap file on your pc. You can also apply a filter (BPF-style) to only capture the packets of your interest.

Example

captureRaw = bbPort2.RxCaptureBasicAdd()
captureRaw.FilterSet('ip dst 1.1.1.2')
captureRaw.Start()
#...
captureRaw.Stop()
result = captureRaw.ResultGet()
print(result.DescriptionGet())
FileNameRemoteGet()

Returns the name for the capture as stored on the ByteBlower server

Return type:

str

FilterGet()

Returns the current installed BPF filter string.

The filter string can be configured using FilterSet()

Returns:

The current BPF filter string

Return type:

str

Example

Suppose we configured the trigger with filter string: where ipv4_1 and ipv4_2 are IPv4Configuration objects and frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

print(captureRaw.FilterGet())
FilterSet(inFilter)

Sets a BPF filter on a RX object.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Parameters:

bpf (str) – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ConfigError – When an invalid BPF filter string is given.

Example

This will filter only UDP traffic. Set the filter on packets that match:

  • source and destination IPv4 address

  • UDP traffic with given destination and source UDP port

  • (layer2) frame length (without CRC!)

captureRaw.FilterSet('ip dst 1.1.1.2')
ResultGet()

Returns the capture result.

Return type:

CaptureResultSnapshot

Example

result = captureRaw.ResultGet()
Start()

Start capturing.

Note

Calling Start while already running does not throw an exception.

Example

captureRaw.Start()
Stop()

Stop capturing.

Note

Calling Stop while not running does not throw an exception.

Example

captureRaw.Stop()
property thisown

The membership flag

class byteblowerll.byteblower.CaptureRawPacketList(*args)

Bases: object

This is a List of multiple CaptureRawPacket objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.CaptureResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

This class represents the result of a CaptureRawPacket.

It contains the metrics and the frames that are captured. To get an update of the values use ::Refresh.

Example

captureRaw = bbPort2.RxCaptureBasicAdd()
captureRaw.FilterSet('ip dst 1.1.1.2')
captureRaw.Start()
# ...
captureRaw.Stop()
resultSnapshot = captureRaw.ResultGet()
ByteCountGet()

Returns the number of bytes captured.

Returns:

The number of bytes captured

Return type:

int

Example

This example returns the number of bytes captured

print(resultSnapshot.ByteCountGet())
CaptureDurationGet()

Returns the duration of the capture.

Returns:

The duration of the capture in nanoseconds

Return type:

int

Example

This example returns the duration of the capture

print(resultSnapshot.CaptureDurationGet())
Clear()

Clears the counters and deletes the captured packets from the capture.

Example

This example returns the captured frames

resultSnapshot.Clear()
ErrorCountGet()

Returns Error count.

Returns:

Returns the number of packets with incorrect CRC

Return type:

int

Example

This example returns the number of corrupt frames

print(resultSnapshot.ErrorCountGet())
FramesGet()

Returns a list of captured frames.

Returns:

a list of CapturedFrame objects.

Return type:

CapturedFrameList

Example

This example returns the captured frames

framesResult = resultSnapshot.FramesGet()
for frame in framesResult:
print(frame.DescriptionGet())
FramesGetByIndex(index)

Returns a Rx.Capture.Frame at the provided index.

Return type:

CapturedFrame

Example

This example returns the captured frame given by the index

frame = resultSnapshot.FramesGetByIndex(0)
PacketCountGet()

Returns the number of packets captured.

Returns:

The number of packets this capture captured

Return type:

int

Example

This example returns the number of packets captured

print(resultSnapshot.PacketCountGet())
PcapLastFileNameGet()

The fileName where the last pcap was saved to.

Return type:

str

Example

print(resultSnapshot.PcapLastFileNameGet())
# prints: pcapResult.pcap
PcapNanoSave(filename)

Stores the captured frames into a pcap file.

Parameters:

filename (str) – Destination filename for the capture file.

Raises:

<python_error> - No pcap support found: When the pcap library is not installed on the ByteBlower client PC.

Raises:

ByteBlower.Rx.Capture.GetFailed - When no results are available or when an exception occurred while obtaining the results.

Raises:

ByteBlower.Rx.Capture.GetFramesFailed - Invalid captured packet offset.

The stored capture file can be opened by e.g. wireshark.

Example

Stores all packets captured by filter to c:pcap which is in PcapNano format

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
server.PortCreate('trunk-1-1')
# TODO??
PcapSave(filename)

Stores the captured frames into a pcap file.

Parameters:

fileName (str) – Destination filename for the capture file.

Raises:

ByteBlower.Rx.Capture.GetFailed - When no results are available or when an exception occurred while obtaining the results.

Raises:

ByteBlower.Rx.Capture.GetFramesFailed - Invalid captured packet offset.

The stored capture file can be opened by e.g. wireshark.

Example

Stores all packets captured by filter to c:pcap

resultSnapshot.PcapSave('resultPcap.pcap')
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Example

print(resultSnapshot.RefreshTimestampGet())
StateNameGet()

Returns the status of the current capture.

Returns:

Returns current state of this capture.

Possible values are:

  • unknown

  • unavailable

  • inactive

  • active

  • invalid

Return type:

str

Example

print(resultSnapshot.StateNameGet())
property thisown

The membership flag

class byteblowerll.byteblower.CapturedFrame(inAbstractObject, inTimestamp, bytes)

Bases: AbstractObject

A representation of a Captured Frame captured using a CaptureRawPacket.

Example

result = captureRaw.ResultGet()
frame = result.FramesGetByIndex(0)
print(frame.LengthGet())
BufferGet()

Gets access to the binary buffer in which the frame is stored.

Returns:

hex representation of the content of the captured frame

Return type:

Buffer

Example

This example gets the bytes in HEX

print(frame.BufferGet())
BytesGet()

Gets the bytes in HEX format of this CapturedFrame.

Returns:

hex representation of the content of the captured frame

Return type:

str

Example

This example gets the bytes in HEX

print(frame.BytesGet())
LengthGet()

Gets the packet length of this CapturedFrame. This is the length without CRC.

Returns:

Length of the packet without CRC

Return type:

int

Example

print(frame.LengthGet())
TimestampGet()

Gets timestamp [NS] of this CapturedFrame.

Returns:

Timestamp in nanoseconds

Return type:

int

Example

This example gets the timestamp of the captured frame

print(frame.TimestampGet())
property thisown

The membership flag

class byteblowerll.byteblower.CapturedFrameList(*args)

Bases: object

This is a List of multiple CapturedFrame objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.CapturedHTTPData(*args, **kwargs)

Bases: AbstractObject

This class represents captured HTTP data.

The HTTP data is a local snapshot of the HTTP data received in a HTTP session at the ByteBlower Server.

HTTP data capture is currently supported on HTTP Client objects.

captureData = httpClient.CaptureGet()
print(captureData.HttpSizeGet())
HttpBytesGet()

Returns the captured HTTP data.

Returns:

Captured HTTP data as string.

Return type:

str

Raises:

UnsupportedFeature – When the ByteBlower Server does not support HTTP Client captures

The data includes both HTTP header and payload.

Note

This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method on this object.

Example

Suppose we sent a HTTP GET request for an ‘index.html’ test page

print(captureData.HttpBytesGet())
HTTP/1.1 200 OK
Date: Wed, 12 Feb 2014 13:23:32 GMT
Server: Apache/2.2.22 (Debian)
Last-Modified: Thu, 10 Feb 2011 11:32:16 GMT
ETag: "27c083-b1-49bebeefcb000"
Accept-Ranges: bytes
Content-Length: 177
Vary: Accept-Encoding
Content-Type: text/html
X-Pad: avoid browser bug
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added,
yet.</p>
</body></html>
HttpBytesSave(inFileName)

Saves the captured HTTP data to file.

Parameters:

fileName (str) – Destination filename for the captured HTTP data.

Raises:

UnsupportedFeature – When the ByteBlower Server does not support HTTP Client captures

Note

This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method on this object.

Example

Stores all HTTP data captured to c:.txt
captureData.HttpBytesSave('httpResults.txt')
HttpSizeGet()

Returns the number of captured bytes of HTTP data.

Returns:

Size of captured HTTP data in Bytes.

Return type:

int

The value includes the size of both HTTP header and payload.

Note

This only outputs the local cached HTTP data. The local cached HTTP data is a snapshot of the HTTP data received at the ByteBlower server. If no local snapshot was available yet, an initial one will be obtained from the server. You may want to synchronize the local cached data using the Refresh method on this object.

Raises:

UnsupportedFeature – When the ByteBlower Server does not support HTTP Client captures

Example

a HTTP GET request for an index.html test page
print(captureData.HttpSizeGet())
property thisown

The membership flag

exception byteblowerll.byteblower.ConfigError(*args)

Bases: DomainError

Raised when the API is called with a configuration mistake

This can happen in a few cases:

  • The API is called with a wrong argument. E.g. The API expects a positive integer, but e.g. -1 is passed

  • A method is called on an object which is not fully configured yet. E.g. Start is called on an HTTP client, but the remote address was not configured.

property thisown

The membership flag

byteblowerll.byteblower.ConvertCounterType(inType)
byteblowerll.byteblower.ConvertEthernetEncodingToString(inEthernetEncoding)
byteblowerll.byteblower.ConvertHTTPMultiClientStatusToString(inHTTPRequestStatus)
byteblowerll.byteblower.ConvertHTTPRequestMethodToString(inHTTPRequestMethod)
byteblowerll.byteblower.ConvertHTTPRequestStatusToString(inHTTPRequestStatus)
byteblowerll.byteblower.ConvertHTTPRequestTypeToString(inHTTPRequestType)
byteblowerll.byteblower.ConvertLinkStatusToString(inLinkStatus)
byteblowerll.byteblower.ConvertLinkTypeToString(inLinkType)
byteblowerll.byteblower.ConvertLogLevelFromString(inLevel)
byteblowerll.byteblower.ConvertPPPoEStatusToString(inPPPoEStatus)
byteblowerll.byteblower.ConvertPhysicalInterfaceTypeToString(inType)
byteblowerll.byteblower.ConvertRequestStartTypeToString(inRequestStartType)
byteblowerll.byteblower.ConvertRuntimeTransmitErrorSource(inSource)
byteblowerll.byteblower.ConvertRuntimeTransmitErrorStatus(inStatus)
byteblowerll.byteblower.ConvertRuntimeTransmitStatus(inStatus)
byteblowerll.byteblower.ConvertScheduleGroupStatusToString(inStatus)
byteblowerll.byteblower.ConvertTCPCongestionAvoidanceAlgorithmToString(inTCAA)
byteblowerll.byteblower.ConvertTCPConnectionStateToString(inState)
byteblowerll.byteblower.ConvertTimeUnitToString(inTimeUnit)
byteblowerll.byteblower.ConvertToString(inLevel)
exception byteblowerll.byteblower.DHCPFailed(*args)

Bases: InitializationError

Raised when the DHCP process failed.

This is usually due to a DISCOVER/SOLICIT/REQUEST message did not get a (valid) reply before the DHCP Timeout passed.

property thisown

The membership flag

class byteblowerll.byteblower.DHCPv4Protocol(*args, **kwargs)

Bases: AbstractObject

This is the entry point to configure the DHCP client behavior of a ByteBlowerPort.

A ByteBlowerPort can perform DHCP the get an IP address, gateway and netmask. Currently, no other options are supported but this will change in the future.

Users can configure the timing parameters used in the different stages of the DHCP protocol: - Discover

During the discover stage the ByteBlower port will broadcast discover messages.

  • Request

    Once one or more offers are received the ByteBlower port will broadcast its request message. If acknowledge the ByteBlower port will start using this address.

  • Renew

    When half of the lease time received in the acknowledge message of the request has passed, a ByteBlowerPort will sent a renew message to the server to extend its lease.

Although DHCP allows clients to use unicast messages in the Request stage, ByteBlower currently only supports broadcast messages in this stage.

A DHCPv4 Protocol also supports different retransmission strategies:

Fixed

This policy will use the same timeout value for each timeout.

RFCSuggested

This policy implements the policy described in :rfc:2131.

BroadcastFlagEnable(inValue)

Enables the DHCP broadcast flag

New in version 2.11.2.

Parameters:

enable (bool) – Whether or not to enable the Broadcast flag

When a ByteBlower port performs DHCP, the port will use the unicast DHCP method as described in the DHCP RFC. Pre-2.11.2 ByteBlower servers used the legacy broadcast technique, which is sometimes detected by devices as a broadcast storm.

Example

This example will enable the Broadcast flag and thus the legacy behavour of the ByteBlower server

dhcp_protocol = port_layer3_config.ProtocolDhcpGet()
dhcp_protocol.BroadcastFlagEnable(True)
print(dhcp_protocol.BroadcastFlagIsEnabled())
BroadcastFlagIsEnabled()

Returns whether or not the broadcast flag is enabled.

New in version 2.11.2.

Returns:

Whether or not the flag is enabled

Return type:

bool

When a ByteBlower port performs DHCP, the port will use the unicast DHCP method as described in the DHCP RFC. Pre-2.11.2 ByteBlower servers used the legacy broadcast technique, which is sometimes detected by devices as a broadcast storm.

Example

This example will enable the Broadcast flag and thus the legacy behavour of the ByteBlower server

dhcp_protocol = port_layer3_config.ProtocolDhcpGet()
dhcp_protocol.BroadcastFlagEnable(True)
print(dhcp_protocol.BroadcastFlagIsEnabled())
DHCPv4SessionInfoGet()

Returns the sessionInfo object for this DHCP Session.

Return type:

DHCPv4SessionInfo

This object contains all the DHCP sessionInfo like Tx,Rx, current leaseTime, giaddr etc…

Example

This example will return the DHCPv4SessionInfo object for this DHCP session.

print(dhcpProtocol.DHCPv4SessionInfoGet().DescriptionGet())
DiscoverInitialTimeoutGet()

Returns the current <InitialTimeout> for the DHCP discover stage.

Returns:

Current ‘<InitialTimeout> value for the discover stage. The unit is nanosecond (ns).

Return type:

int

During the Discover stage, one ore more discover messages will be sent by the DHCP client to get an offer message from one or more DHCP servers. The <InitialTimeout> is the timeout used to decide if the discover message must be retransmitted or not. The next timeout value will be calculated using the configured retransmission policy.

Example

This example will get the current <InitialTimeout> for the discover stage.

print(dhcp_protocol.DiscoverInitialTimeoutGet())
DiscoverInitialTimeoutSet(inValue)

Sets the <InitialTimeout> for the DHCP discover stage.

Parameters:

initial_timeout (int) – New value for the initial timeout. The unit is in nanosecond (ns), but the unit

During the Discover stage, one ore more discover messages will be sent by the DHCP client to get an offer message from one or more DHCP servers. The <InitialTimeout> is the timeout used to decide if the discover message must be retransmitted or not. The next timeout value will be calculated using the configured retransmission policy.

Example

This example will set the <InitialTimeout> for the discover stage.

dhcp_protocol.DiscoverInitialTimeoutSet(2000000000)
DiscoverMaxRetriesGet()

Returns the current maximum retries for the DHCP discover stage.

Returns:

Current value for the number of retries in the discover stage.

Return type:

int

During the Discover stage, one ore more discover messages will be sent by the DHCP client to get an offer message from one or more DHCP servers. The maximum number of times the DHCP client will retransmit the discover message is returned by this method.

Example

This example will get the current maximum number of retries for the discover stage.

print(dhcp_protocol.DiscoverMaxRetriesGet())
DiscoverMaxRetriesSet(inValue)

Sets the maximum retries for the DHCP discover stage.

During the Discover stage, one ore more discover messages will be sent by the DHCP client to get an offer message from one or more DHCP servers. The maximum number of times the DHCP client will retransmit the discover message is configured by this method.

Parameters:

maxRetries (int) – The new value for the maximum number of retransmission of the discover message.

Example

This example will set the maximum number of retries for the discover stage to 3 times.

dhcp_protocol.DiscoverMaxRetriesSet(3)
Perform()

Start DHCP and wait for the result.

This method will force the DHCP client on the ByteBlower port to send a first DHCP discover message. It the client is already active, a new discover message will be sent. This is a synchronous call, so the full DHCPv6 solicit and request will be done once this call returns, or an error have occurred.

Raises:

DHCPFailed – When no offer was received during the DHCP discover stage or when no DHCPAck was received during DHCPRequest stage

Example

This example will perform DHCP on the specified ByteBlowerPort.

dhcp_protocol.Perform()
PerformAsync()

Will start DHCP and return immediately.

New in version 2.2.

This method will force the DHCP client on the ByteBlower port to send a first DHCP discover message. If the client is already active, a new discover message will be sent. This is a asynchronous call, so it will return immediately. If you want to see if there an exception occurred during this async, call the Perform() method.

Example

This example will perform DHCP on the specified ByteBlowerPort.

dhcp_protocol.PerformAsync()
Release()

Release the DHCP lease.

Returns:

This method will return nothing, but will return after DHCP Release is performed

Return type:

int

This method will release the address previously received using DHCP. After this, the address will not be used anymore by the ByteBlower port and the DHCP server can reuse the address for other DHCP clients. Of course, packets sent by the ByteBlower port as part of streams can still use the address. Example

This example will release the DHCP address.

dhcp_protocol.Release()
ReleaseEnable(inValue)

Enable/disable sending DHCP release during destruction.

Parameters:

enable (bool) – Boolean to enable or disable the release of the address at the end of the test. (Default: True)

When a ByteBlowerPort is destructed and this port has performed DHCP, such a port should release its address. If this behavior is prefered, then this should be done by using the Release.Enable method to indicate the ByteBlowerPort should release its address if possible. A ByteBlowerPort is able to release its address at destruction time if the destination mac address is in the ByteBlowerPort’s ARP cache. If not, the DHCP release messages will not be sent out, because it could delay the whole cleanup.

If you want to force the release of an address received through DHCP, use Release().

Example

This example will disable the automatic release of the DHCP address at the end of the test.

dhcp_protocol.ReleaseEnable(False)
ReleaseIsEnabled()

Return whether sending DHCP release during destruction is enabled.

Returns:

If the port will release its IP at destruction

Return type:

bool

When a ByteBlowerPort is destructed and this port has performed DHCP, it should release its address. If this behavior is prefered, then this should be done by using the ReleaseEnable() method to inidicate the ByteBlowerPort should release its address if possible. A ByteBlowerPort is able to release its address at destruction time if the destination mac address is in the ByteBlowerPort’s ARP cache. If not, the DHCP release messages will not be sent out, because it could delay the whole cleanup.

If you want to force the release of an address received through DHCP, use Release().

Example

This example will disable the automatic release of the DHCP address at the end of the test.

dhcp_protocol = port_layer3_config.ProtocolDhcpGet()
print(dhcp_protocol.ReleaseIsEnabled())
RequestInitialTimeoutGet()

Returns the current <InitialTimeout> for the DHCP request stage.

Returns:

Current <InitialTimeout> value for the request stage. The unit is nanosecond (ns).

Return type:

int

During the Request stage, one ore more request messages will be sent by the DHCP client to get an ack message from the DHCP server. The <InitialTimeout> is the timeout used to decide if the request message must be retransmitted or not. The next timeout value will be calculated using the configured retransmission policy.

Example

This example will get the current <InitialTimeout> for the request stage.

print(dhcp_protocol.RequestInitialTimeoutGet())
RequestInitialTimeoutSet(inTime)

Sets the <InitialTimeout> for the DHCP request stage.

During the Request stage, one ore more request messages will be sent by the DHCP client to get an ack message from the DHCP server. The <InitialTimeout> is the timeout used to decide if the request message must be retransmitted or not. The next timeout value will be calculated using the configured retransmission policy.

Parameters:

InitialTimeout (int) – New value for the initial timeout. The unit is in nanosecond (ns).

Example

This example will set the <InitialTimeout> for the request stage.

dhcp_protocol.RequestInitialTimeoutSet(3000000000)
RequestMaxRetriesGet()

Returns the current maximum retries for the DHCP Request stage.

Returns:

Current value for the number of retries in the request stage.

Return type:

int

During the Request stage, one ore more request messages will be sent by the DHCP client to get an ack message from the DHCP server. The maximum number of times the DHCP client will retransmit the request message is returned by this method.

Example

This example will get the current maximum number of retries to 10 for the request stage.

dhcp_protocol.RequestMaxRetriesSet(10)
RequestMaxRetriesSet(inValue)

Sets the maximum retries for the DHCP Request stage.

Parameters:

maxRetries (int) – The new value for the maximum number of retransmissions of the request message. (Default: 5)

During the Request stage, one ore more request messages will be sent by the DHCP client to get an ack message from the DHCP server. The maximum number of times the DHCP client will retransmit the request message is configured by this method.

Example

This example will set the current maximum number of retries to 10 for the request stage.

dhcp_protocol.RequestMaxRetriesSet(10)  
RetransmissionPolicyGet()

Returns the current configured retransmission policy.

Returns:

Current configured Retransmission Policy (Default: RetransmissionPolicy.FixedTiming)

Return type:

RetransmissionPolicy

This policy is used in calculating the timeout value for each outstanding message and is the same for all message types.

Example

This example will get the retransmission policy.

print(dhcp_protocol.RetransmissionPolicyGet())
RetransmissionPolicySet(policy)

Configures the Retransmission Policy.

Parameters:

policy (RetransmissionPolicy) – The policy to configure (Default: RetransmissionPolicy.FixedTiming)

The Retransmission Policy defines the timing for the DHCP messages.

Example

This example will set the retransmission policy to fixed timing.

property thisown

The membership flag

class byteblowerll.byteblower.DHCPv4SessionInfo(*args, **kwargs)

Bases: AbstractObject

Class containing the info about the DHCPSession.

This class represents the session info gathered from a DHCPSession. It will contain counters of the amount of DHCPMessages transmitted and received. It also contains some values of the obtained lease ( leasetime, GiAddr, SiAddr, OptionValues )

session_info = protocol.DHCPv4SessionInfoGet()
for option in info.DHCPOptionGet():
   print(option)
AckTimestampLastGet()

Returns the timestamp when the last DHCP Ack message is received.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.AckTimestampLastGet())
DHCPOptionGet()

Returns a list if received DHCPOptions.

Returns:

List of DHCPOptions in the form of OptionNumber-Value

Return type:

Int64StringMap

Example

for option in session_info.DHCPOptionGet:
   print(option)
DHCPServerAddrGet()

Returns the ipAddress of the DHCPServer.

Returns:

Address of the DHCP server

Return type:

str

This address is parsed out of DHCPServerIdentifier option ( Option 54 )

Example

print(session_info.DHCPServerAddrGet())
DiscoverTimestampLastGet()

Returns the timestamp when the last DHCP Discover message is sent.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.DiscoverTimestampLastGet())
GiAddrGet()

Returns the ipAddress of the relay agent, used in booting via a relay agent.

Returns:

Relay agent IP address

Return type:

str

Example

print(session_info.GiAddrGet())
LeaseTimeGet()

Returns IP Address lease time.

Returns:

The leasetime in NanoSeconds

Return type:

int

Example

print(session_info.LeaseTimeGet())
OfferTimestampLastGet()

Returns the timestamp when the last DHCP Offer message is received.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.OfferTimestampLastGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Returns:

RefreshTimestamp in nanoseconds

Return type:

int

Example

print(session_info.RefreshTimestampGet())
RequestTimestampLastGet()

Returns the timestamp when the last DHCP Request message is sent.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.RequestTimestampLastGet())
RxGet()

Returns the number of DHCPMessages recieved.

Returns:

Number of DHCP messages received

Return type:

int

Example

print(session_info)
SiAddrGet()

Returns the IP address of next server to use in bootstrap.

Returns:

next server IP address

Return type:

str

Example

print(session_info.SiAddrGet())
TransactionIDGet()

Returns the transaction ID used in this DHCP session.

Return type:

str

TxGet()

Returns the number of DHCPMessages transmitted.

Returns:

Number of DHCP messages transmitted

Return type:

int

Example

print(session_info)
property thisown

The membership flag

class byteblowerll.byteblower.DHCPv6Protocol(*args, **kwargs)

Bases: AbstractObject

The DHCPv6Protocol is the entry point to configure the DHCPv6 client behavior of a ByteBlowerPort.

A ByteBlowerPort can perform DHCPv6 for configuring IP addresses, IP prefixes and/or other parameters required to operate on an IPv6 network.

A ByteBlowerPort can acquire and combine IP addresses using stateless address autoconfiguration, or by using DHCPv6 or static configuration. DHCP tends to be preferred at sites where central management of hosts is valued; stateless autoconfiguration does not require any sort of central management, and is therefore preferable in networks where no management is readily available, such as a typical home network.

IPv6 hosts that use stateless autoconfiguration may require information other than an IP address. DHCPv6 can be used to acquire this information, even though it is not being used to configure IP addresses.

DHCPv6 can also be used to deligate prefix information to e.g. home gateways. Such gateways require not only an IPv6 address for use in communicating with upstream routers, but also an IPv6 prefix for use in configuring devices on the downstream side of the router. DHCPv6 Prefix delegation provides a mechanism for configuring such routers. ByteBlower currently doesn’t support prefix delegation yet, but can only be used as a host.

ByteBlower allows full control of the timing parameters of the DHCPv6 client side. The retransmission policy used for DHCPv6 is the one suggested in the rfc:3315.

Configurable timing parameters are:

  • Initial Timeout

  • Maximum Duration

  • Maximum Retries

  • Maximum Timeout

These timing parameters can be applied to the following stages of DHCPv6:

  • Solicit

  • Request

  • Renew

  • Inform

  • Confirm

For each state the parameters do the following:

ByteBlower will send up to <MaxRetries> messages. The total duration of the the state may take up the <MaxDuration>. For the first attempt, a ByteBlowerPort will wait up to <InitialTimeout> nanoseconds before retrying. Each attempt will wait for maximum ‘<MaxTimeout> nanoseconds before concluding that the messages has timed out.

ConfirmInitialTimeoutGet()

Getter for <InitialTimeout> when in the Confirm state.

Returns:

Current value for <InitialTimeout> for stage Confirm. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <InitialTimeout> in the Confirm stage.

print(dhcp_protocol.ConfirmInitialTimeoutGet())
ConfirmInitialTimeoutSet(arg2)

Setter for <InitialTimeout> when in the Confirm state.

Parameters:

value (int) – New value for <InitialTimeout> for stage Confirm. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <InitialTimeout> in the Confirm stage.

dhcp_protocol.ConfirmInitialTimeoutSet(100000)
ConfirmMaxDurationGet()

Getter for <MaxDuration> when in the Confirm state.

Returns:

Current value for <MaxDuration> for stage Confirm. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxDuration> in the Confirm stage.

print(dhcp_protocol.ConfirmMaxDurationGet())
ConfirmMaxDurationSet(arg2)

Setter for <MaxDuration> when in the Confirm state.

Parameters:

value (int) – New value for <MaxDuration> for stage Confirm. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxDuration> in the Confirm stage.

dhcp_protocol.ConfirmMaxDurationSet(100000)
ConfirmMaxRetriesGet()

Getter for <MaxRetries> when in the Confirm state.

Returns:

Current value for <MaxRetries> for stage Confirm. This is a positive integer value, indicating the number of times the ByteBlowerPort will resend its Confirm message.

Return type:

int

Example

This example demonstrates how to get the value for <MaxRetries> in the Confirm stage.

print(dhcpv6.ConfirmMaxRetriesGet())
ConfirmMaxRetriesSet(arg2)

Setter for <MaxRetries> when in the Confirm state.

Parameters:

value (int) – New value for <MaxRetries> for stage Confirm. This must be a positive integer value, indicating the number of times the ByteBlowerPort will resend its Confirmmessage.

Example This example demonstrates how to set the value for <MaxRetries> to 12 in the Confirm stage.

dhcp_protocol.ConfirmMaxRetriesSet(12)
ConfirmMaxTimeoutGet()

Getter for <MaxTimeout> when in the Confirm state.

Returns:

Current value for <MaxTimeout> for stage Confirm. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxTimeout> in the Confirm stage.

print(dhcp_protocol.ConfirmMaxTimeoutGet())
ConfirmMaxTimeoutSet(arg2)

Setter for <MaxTimeout> when in the Confirm state.

Parameters:

value (int) – New value for <MaxTimeout> for stage Confirm. This is a time value, in nanosecond inits.

Example

This example demonstrates how to set the value for <MaxTimeout> in the Confirm stage.

dhcp_protocol.ConfirmMaxTimeoutSet(5000000000)
DHCPv6SessionInfoGet()

Returns the sessionInfo object for this DHCP Session.

This object contains all the DHCP sessionInfo like Tx,Rx

Returns:

The statistics object for this DHCP session

Return type:

DHCPv6SessionInfo

Example

This example will return the DHCPv6SessionInfo object for this DHCP session.

print(dhcp_protocol.DHCPv6SessionInfoGet().DescriptionGet())
InformInitialTimeoutGet()

Getter for <InitialTimeout> when in the Inform state.

Returns:

Current value for <InitialTimeout> for stage Inform. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <InitialTimeout> in the Inform stage.

print(dhcp_protocol.InformInitialTimeoutGet())
InformInitialTimeoutSet(arg2)

Setter for <InitialTimeout> when in the Inform state.

Parameters:

value (int) – New value for <InitialTimeout> for stage Inform. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <InitialTimeout> in the Inform stage.

dhcp_protocol.InformInitialTimeoutSet()
InformMaxDurationGet()

Getter for <MaxDuration> when in the Inform state.

Returns:

Current value for <MaxDuration> for stage Inform. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxDuration> in the Inform stage.

print(dhcp_protocol.InformMaxDurationGet())
InformMaxDurationSet(arg2)

Setter for <MaxDuration> when in the Inform state.

Parameters:

value (int) – New value for <MaxDuration> for stage Inform. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxDuration> to 100000 in the Inform stage.

dhcp_protocol.InformMaxDurationSet(100000)
InformMaxRetriesGet()

Getter for <MaxRetries> when in the Inform state.

Returns:

Current value for <MaxRetries> for stage Inform. This is a positive integer value, indicating the number of times the ByteBlowerPort will resend its Inform message.

Return type:

int

Example

This example demonstrates how to get the value for <MaxRetries> in the Inform stage.

print(dhcp_protocol.InformMaxRetriesGet())
InformMaxRetriesSet(arg2)

Setter for <MaxRetries> when in the Inform state.

Parameters:

value (int) – New value for <MaxRetries> for stage Inform. This must be a positive integer value, indicating the number of times the ByteBlowerPort will resend its Inform message.

Example

This example demonstrates how to set the value for <MaxRetries> to 5 in the Inform stage.

dhcp_protocol.InformMaxRetriesSet(5)
InformMaxTimeoutGet()

Getter for <MaxTimeout> when in the Inform state.

Returns:

Current value for <MaxTimeout> for stage Inform. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxTimeout> in the Inform stage.

print(dhcp_protocol.InformMaxTimeoutGet())
InformMaxTimeoutSet(arg2)

Setter for <MaxTimeout> when in the Inform state.

Parameters:

value (int) – New value for <MaxTimeout> for stage Inform. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxTimeout> in the Inform stage.

dhcp_protocol.InformMaxTimeoutSet(100000)
Perform()

This method will bootstrap the DHCPv6 process.

The client will start with sending DHCPv6 solicit messages. This is a synchronous call, so the full DHCPv6 solicit and request will be done once this call returns, or an error have occurred.

Returns:

This method will return nothing, but will return after DHCP is performed successfully. If DHCP fails, and exception is thrown.

Return type:

int

Raises:

DHCPFailed – Thrown if no offer was received during the DHCP solicit stage or no DHCPReply during DHCPRequest stage

Example

This example will start the DHCPv6 process.

dhcp_protocol.Perform()
PerformAsync()

This method will bootstrap the DHCPv6 process.

New in version 2.2.

Returns:

This method will return nothing and return immediately

The client will start with sending DHCPv6 solicit messages. This is a asynchronous call, so it will return immediately. If you want to see if there an exception occured during this async, call the perform method.

Example

This example will start the DHCPv6 process.

dhcp_protocol.PerformAsync()
Release()

Release the address previously received using DHCPv6

This method will release the address previously received using DHCP. After this, the address will not be used anymore by the ByteBlower port and the DHCP server can reuse the address for other DHCP clients. Offcourse, packets sent by the ByteBlower port as part of streams can still use the address.

Returns:

This method will return nothing, but will return after DHCP Release is performed

Example

This example will release the DHCP address.

dhcp_protocol.Release()
ReleaseEnable(inValue)

Enable automatic release when the ByteBlower port is destroyed

Parameters:

enable (bool) – True to enable the automatic release of the address (Default: True)

When a ByteBlowerPort is destructed and this port has performed DHCP, such a port should release its address. If this behavior is prefered, then this should be done by using the ReleaseEnable() method to inidicate the ByteBlowerPort should release its address if possible. A ByteBlowerPort is able to release its address at destruction time if the destination mac address is in the ByteBlowerPort’s ARP cache. If not, the DHCP release messages will not be sent out, because it could delay the whole cleanup.

If you want to force the release of an address received through DHCP, use Release().

Example

This example will disable the automatic release of the DHCP address at the end of the test.

dhcp_protocol.ReleaseEnable()
ReleaseIsEnabled()

Returns True when automatic release is enabled

Returns:

If the port will release its IP at destruction

Return type:

bool

When a ByteBlowerPort is destructed and this port has performed DHCP, it should release its address. If this behavior is prefered, then this should be done by using the Release.Enable method to inidicate the ByteBlowerPort should release its address if possible. A ByteBlowerPort is able to release its address at destruction time if the destination mac address is in the ByteBlowerPort’s ARP cache. If not, the DHCP release messages will not be sent out, because it could delay the whole cleanup.

If you want to force the release of an address received through DHCP, use Release()

Example

This example will disable the automatic release of the DHCP address at the end of the test.

print(dhcp_protocol.ReleaseIsEnabled())
RenewInitialTimeoutGet()

Getter for <InitialTimeout> when in the Renew state.

Returns:

Current value for <InitialTimeout> for stage Renew. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <InitialTimeout> in the Renew stage.

print(dhcp_protocol.RenewInitialTimeoutGet())
RenewInitialTimeoutSet(arg2)

Setter for <InitialTimeout> when in the Renew state.

Parameters:

value (int) – New value for <InitialTimeout> for stage Renew. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <InitialTimeout> to 10000 in the Renew stage.

dhcp_protocol.RenewInitialTimeoutSet(10000)
RenewMaxDurationGet()

Getter for <MaxDuration> when in the Renew state.

Returns:

Current value for <MaxDuration> for stage Renew. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxDuration> in the Renew stage.

print(dhcp_protocol.RenewMaxDurationGet())
RenewMaxDurationSet(arg2)

Setter for <MaxDuration> when in the Renew state.

Parameters:

value (int) – New value for <MaxDuration> for stage Renew. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxDuration> in the Renew stage.

dhcp_protocol.RenewMaxDurationSet(100000)
RenewMaxRetriesGet()

Getter for <MaxRetries> when in the Renew state.

Returns:

Current value for <MaxRetries> for stage Renew. This is a positive integer value, indicating the number of times the ByteBlowerPort will resend its Renew message.

Return type:

int

Example

This example demonstrates how to get the value for <MaxRetries> in the Renew stage.

print(dhcp_protocol.RenewMaxRetriesGet())
RenewMaxRetriesSet(arg2)

Setter for <MaxRetries> when in the Renew state.

Parameters:

value (int) – New value for <MaxRetries> for stage Renew. This must be a positive integer value, indicating the number of times the ByteBlowerPort will resend its Renew message.

Example

This example demonstrates how to set the value for <MaxRetries> to 12in the Renew stage.

dhcp_protocol.RenewMaxRetriesSet(12)
RenewMaxTimeoutGet()

Getter for <MaxTimeout> when in the Renew state.

Returns:

Current value for <MaxTimeout> for stage Renew. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxTimeout> in the Renew stage.

print(dhcp_protocol.RenewMaxTimeoutGet())
RenewMaxTimeoutSet(arg2)

Setter for <MaxTimeout> when in the Renew state.

Parameters:

value (int) – New value for <MaxTimeout> for stage Renew. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxTimeout> in the Renew stage.

dhcpv6.RenewMaxTimeoutSet(5000)
RequestInitialTimeoutGet()

Getter for <InitialTimeout> when in the Request state.

Returns:

Current value for <InitialTimeout> for stage Request. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <InitialTimeout> in the Request stage.

print(dhcp_protocol.RequestInitialTimeoutGet())
RequestInitialTimeoutSet(arg2)

Setter for <InitialTimeout> when in the Request state.

Parameters:

value (int) – New value for <InitialTimeout> for stage Request. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <InitialTimeout> in the Request stage.

dhcp_protocol.RequestInitialTimeoutSet(1000000)
RequestMaxDurationGet()

Getter for <MaxDuration> when in the Request state.

Returns:

Current value for <MaxDuration> for stage Request. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxDuration> in the Request stage.

print(dhcp_protocol.RequestMaxDurationGet())
RequestMaxDurationSet(arg2)

Setter for <MaxDuration> when in the Request state.

Parameters:

value (int) – New value for <MaxDuration> for stage Request. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <MaxDuration> to 10 in the Request stage.

dhcp_protocol.RequestMaxDurationSet(1000000)
RequestMaxRetriesGet()

Getter for <MaxRetries> when in the Request state.

Returns:

Current value for <MaxRetries> for stage Request. This is a positive integer value, indicating the number of times the ByteBlowerPort will resend its Request message.

Return type:

int

Example

This example demonstrates how to get the value for <MaxRetries> in the Request stage.

print(dhcp_protocol.RequestMaxRetriesGet())
RequestMaxRetriesSet(arg2)

Setter for <MaxRetries> when in the Request state.

Parameters:

value (int) – New value for <MaxRetries> for stage Request. This must be a positive integer value, indicating the number of times the ByteBlowerPort will resend its Request message.

Example

This example demonstrates how to set the value for <MaxRetries> to 10 in the Request stage.

dhcp_protocol.RequestMaxRetriesSet(10)
RequestMaxTimeoutGet()

Getter for <MaxTimeout> when in the Request state.

Returns:

Current value for <MaxTimeout> for stage Request. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxTimeout> in the Request stage.

print(dhcp_protocol.RequestMaxTimeoutGet())
RequestMaxTimeoutSet(arg2)

Setter for <MaxTimeout> when in the Request state.

Parameters:

value (int) – New value for <MaxTimeout> for stage Request. This is a time value, in nanosecond units

Example

This example demonstrates how to set the value for <MaxTimeout> in the Request stage.

dhcp_protocol.RequestMaxTimeoutSet(1000000)
RetransmissionPolicyGet()

Returns the current configured retransmission policy. This policy is used in calculating the timeout value for each outstanding message and is the same for all message types.

Returns:

Current configured Retransmission Policy (Default: RetransmissionPolicy.RfcSuggested)

Return type:

RetransmissionPolicy

Example

This example will get the retransmission policy.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')

dhcpProtocol = l3.ProtocolDhcpGet()
policy = dhcpProtocol.RetransmissionPolicyGet()
RetransmissionPolicySet(policy)

Configures the Retransmission Policy.

The Retransmission Policy defines the timing for the DHCP messages.

Parameters:

policy (RetransmissionPolicy) – The Retransmission policy to be set. (Default: RetransmissionPolicy.RfcSuggested)

Example

This example will set the retransmission policy to fixed timing.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
SolicitInitialTimeoutGet()

Getter for <InitialTimeout> when in the Solicit state.

Returns:

Current value for <InitialTimeout> for stage Solicit. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <InitialTimeout> in the Solicit stage.

print(dhcp_protocol.SolicitInitialTimeoutGet())
SolicitInitialTimeoutSet(arg2)

Setter for <InitialTimeout> when in the Solicit state.

Parameters:

value (int) – New value for <InitialTimeout> for stage Solicit. This is a time value, in nanosecond units.

Example

This example demonstrates how to set the value for <InitialTimeout> in the Solicit stage.

dhcp_protocol.SolicitInitialTimeoutSet(100000)
SolicitMaxDurationGet()

Getter for <MaxDuration> when in the Solicit state.

Returns:

Current value for <MaxDuration> for stage Solicit. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxDuration> in the Solicit stage.

print(dhcp_protocol.SolicitMaxDurationGet())
SolicitMaxDurationSet(arg2)

Setter for <MaxDuration> when in the Solicit state.

Parameters:

value (int) – New value for <MaxDuration> for stage Solicit. This is a time value, in nanosecond units.

Example This example demonstrates how to set the value for <MaxDuration> to 1000000 in the Solicit stage.

dhcp_protocol.SolicitMaxDurationSet(1000000)
SolicitMaxRetriesGet()

Getter for <MaxRetries> when in the Solicit state.

Returns:

Current value for <MaxRetries> for stage Solicit. This is a positive integer value, indicating the number of times the ByteBlowerPort will resend its Solicit message.

Return type:

int

Example

This example demonstrates how to get the value for <MaxRetries> in the Solicit stage.

print(dhcp_protocol.SolicitMaxRetriesGet())
SolicitMaxRetriesSet(arg2)

Setter for <MaxRetries> when in the Solicit state.

Parameters:

value (int) – New value for <MaxRetries> for stage Solicit. This must be a positive integer value, indicating the number of times the ByteBlowerPort will resend its Solicit message.

Example

This example demonstrates how to set the value for <MaxRetries> in the Solicit stage.

print(dhcp_protocol.SolicitMaxRetriesGet())
SolicitMaxTimeoutGet()

Getter for <MaxTimeout> when in the Solicit state.

Returns:

Current value for <MaxTimeout> for stage Solicit. This is a time value, in nanosecond units.

Return type:

int

Example

This example demonstrates how to get the value for <MaxTimeout> in the Solicit stage.

print(dhcp_protocol.SolicitMaxTimeoutGet())
SolicitMaxTimeoutSet(arg2)

Setter for <MaxTimeout> when in the Solicit state.

Parameters:

value (int) – New value for <MaxTimeout> for stage Solicit. This is a time value, in nanosecond units.

This example demonstrates how to set the value for <MaxTimeout> in the Solicit stage.

Example

dhcp_protocol.SolicitMaxTimeoutSet(10000)
property thisown

The membership flag

class byteblowerll.byteblower.DHCPv6SessionInfo(*args, **kwargs)

Bases: AbstractObject

Class containing the info about the DHCPSession.

This class represents the session info gathered from a DHCPv6Session. It will contain counters of the amount of DHCPMesseage transmitted and received.

AdvertiseTimestampLastGet()

Returns the timestamp when the last DHCP Advertise message is received.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.AdvertiseTimestampLastGet())
RefreshTimestampGet()

Returns the timestamp when the results are last retrieved from the server

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.RefreshTimestampGet())
ReplyTimestampLastGet()

Returns the timestamp when the last DHCP Reply message is received.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.ReplyTimestampLastGet())
RequestTimestampLastGet()

Returns the timestamp when the last DHCP Request message is sent.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.RequestTimestampLastGet())
RxGet()

Returns the number of DHCPMessages recieved.

Returns:

Number of DHCP messages received

Return type:

int

Example

print(dhcpSessionInfo.RxGet())
SolicitTimestampLastGet()

Returns the timestamp when the last DHCP Solicit message is sent.

New in version 2.11.2.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(session_info.SolicitTimestampLastGet())
TxGet()

Returns the number of DHCPMessages transmitted.

Returns:

Number of DHCP messages transmitted

Return type:

int

Example

print(dhcpSessionInfo.TxGet())
property thisown

The membership flag

class byteblowerll.byteblower.DataRate(inSize, inDuration)

Bases: object

Represents a data rate. The datarate can be expressed in multiple formats.

Example

httpResultData = httpClient.ResultHistoryGet().CumulativeLatestGet()
dataRate = httpResultData.RxByteCountRateGet()
BitRateGet()

Returns the bits per second of the http session

Returns:

The speed in bits per second

Return type:

int

Example

print(dataRate.BitRateGet())
ByteRateGet()

Returns the bytes per second of the http session

Returns:

The speed in bytes per second

Return type:

int

Example

print(dataRate.ByteRateGet())
GbpsGet()

Returns the gigabits per second of the http session

Returns:

The speed in gigabits per second

Return type:

int

Example

print(dataRate.GbpsGet())
KbpsGet()

Returns the kilobits per second of the http session

Returns:

The speed in kilobits per second

Return type:

int

Example

print(dataRate.KbpsGet())
MbpsGet()

Returns the megabits per second of the http session

Returns:

The speed in megabits per second

Return type:

int

Example

print(dataRate.MbpsGet())
bitrate()

Returns the number of bits per second

Returns:

The speed in bits per second

Return type:

int

Example

print(dataRate.bitrate())
byterate()
Returns:

The speed in bytes per second

Return type:

int

Example

print(dataRate.byterate())
property thisown

The membership flag

toString()

Returns the bytes per second in a readable string format

Returns:

A human readable format of the speed

Return type:

str

Example

print(dataRate.toString())
byteblowerll.byteblower.Demangle(inName)
class byteblowerll.byteblower.DeviceInfo(*args, **kwargs)

Bases: AbstractObject

Device information of the ByteBlower Endpoint.

New in version 2.6.0.

Contains all usefull device information of a ByteBlower Endpoint like OS, Network, Battery etc…

Example

from byteblowerll.byteblower import ByteBlower
meetingPoint = bb.MeetingPointAdd('byteblower-tutorial-1300.lab.byteblower.excentis.com')
endpoint = meetingPoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.BatteryLevelGet())
BatteryLevelGet()

Returns the device’s battery level.

Return type:

int

Example

deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.BatteryLevelGet())
GivenNameGet()

Returns the user-provided device name.

Return type:

str

Example

deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.GivenNameGet())
NetworkInfoGet()

Return the networkInfoObject containing all the network information of the ByteBlower Endpoint.

Return type:

NetworkInfo

Example

deviceInfo = endpoint.DeviceInfoGet()
networkInfo = endpoint.NetworkInfoGet()
NetworkInfoMonitorAdd()

Creates a NetworkInfo monitor to be used during a scenario

Returns:

The newly created NetworkInfoMonitor

Return type:

NetworkInfoMonitor

A NetworkInfo monitor collects information about the network interfaces using the typical history objects

Example

deviceInfo = endpoint.DeviceInfoGet()
monitor = endpoint.NetworkInfoMonitorAdd()
NetworkInfoMonitorGet()

Get the created NetworkInfo monitors

Returns:

A list of NetworkInfoMonitors

Return type:

NetworkInfoMonitorList

A NetworkInfo monitor collects information about the network interfaces using the typical history objects

Example

deviceInfo = endpoint.DeviceInfoGet()
monitor = endpoint.NetworkInfoMonitorAdd()
monitors = endpoint.NetworkInfoMonitorGet()
NetworkInfoMonitorRemove(arg2)

Removes the specified NetworkInfoMonitor

Parameters:

monitor (NetworkInfoMonitor) – The monitor to be removed

A NetworkInfo monitor collects information about the network interfaces using the typical history objects

Example

deviceInfo = endpoint.DeviceInfoGet()
monitor = endpoint.NetworkInfoMonitorAdd()
endpoint.NetworkInfoMonitorRemove(monitor)
OsTypeGet()

Returns the OS type.

Return type:

DeviceOsType

Example

deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.OsTypeGet())
OsVersionGet()

Returns the OS version.

Return type:

str

Example

deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.OsVersionGet())
TypeGet()

Returns the type of device. I.e “iPad Air”, “iPhone 6S”, “Nexus 5x”, etc…

Return type:

str

Example

deviceInfo = endpoint.DeviceInfoGet()
print(deviceInfo.TypeGet())
property thisown

The membership flag

class byteblowerll.byteblower.DeviceOsType

Bases: object

Android = 0

The Endpoint application runs on a Device running Android

Linux = 3

The Endpoint application runs on a Device running a Linux distribution

OSx = 2

The Endpoint application runs on a Device running Apple macOS

Unknown = 5

The Endpoint application runs on a Device running an unknown operating system

Windows = 4

The Endpoint application runs on a Device running Microsoft Windows

iOS = 1

The Endpoint application runs on a Device running Apple iOS

class byteblowerll.byteblower.DeviceStatus

Bases: object

Available = 1

The Endpoint application is registered

Reserved = 2

The Endpoint application is locked/used by (another) user

Running = 4

The Endpoint application is currently running a test

Starting = 3

The Endpoint application will start any second now with a test

Unavailable = 0

The Endpoint application not available/registered

exception byteblowerll.byteblower.DomainError(*args)

Bases: ByteBlowerAPIException

property thisown

The membership flag

class byteblowerll.byteblower.EthernetConfiguration(*args, **kwargs)

Bases: Layer2Configuration

EthernetII provides an interface for the Ethernet configuration on a ByteBlower port.

static IsValidMacAddress(inMacAddress)
MacGet()
MacSet(inMacAddress)
TypeGet()

Returns the layer 2 encoding scheme.

Returns:

The layer 2 encoding scheme.

Return type:

EthernetEncoding

Example

This example returns the layer 2 encoding scheme.

print(ethernetConf.TypeGet())
TypeSet(inEthernetEncoding)

Sets the layer 2 encoding scheme.

Parameters:

encoding (EthernetEncoding) – Currently supported encodings are SNAP and DIX.

Example

This example sets the layer 2 encoding scheme.

print(ethernetConf.TypeSet())
property thisown

The membership flag

class byteblowerll.byteblower.EthernetEncoding

Bases: object

DIX = 1
SNAP = 0
class byteblowerll.byteblower.Frame(*args, **kwargs)

Bases: AbstractObject

Class: Frame

A ByteBlower Frame is an object representing a Frame which can be used in a Stream for transmission by a ByteBlower Port.

A Frame is used in stateless traffic testing. It will be sent by a ByteBlowerPort. For each Frame, different options can be enabled:

  1. Tagging

    • Sequence: Defines if a sequence number must be set. This is used for out-of-sequence detection.

    • Timestamping: Defines if the timestamp of transmission must be set in the frame. This is used for latency measurements.

  2. Checksumming

    • L3: IPv4/IPv6 automatic header checksumming.

    • L4: UDP/TCP automatic checksumming.

  3. Length field correction

    • L3: Automatic correction of the IPv4 length field. This is usefull when using a FrameSizeModifier.

    • L7: Automatic correction of the UDP/TCP length field. This is usefull when using a FrameSizeModifier.

Also the frame can be modified during the test using modifiers:

  1. Field

    • Incremental: A field in the frame will be incremented every time the frame is sent out. The field’s position and size is configurable.

    • Random: A field in the frame will be a random value every time the frame is sent out. The field’s position and size is configurable.

  2. Size

    • GrowingSize: The frame will grow between a minimum and a maximum value. When the maximum value is reached, the frame resizes to the given minimum.

    • RandomSize: The frame will have a different size every time it is sent out. The sizes will be random between a given minimum and maximum size.

BytesGet()

A method which returns the current content of a Frame in a hexadecimal format.

This method will return the current content of a Frame. A ByteBlower Frame is an Ethernet Frame, excluding the frame check sequence ( aka CRC ).

Note

The real content of a Frame can differ if Modifiers such as the FrameSizeModifier are applied on the Flow containing this Frame.

Returns:

This method returns the content in a hexadecimal string. All bytes are concatenated into one string.

Example

The current content of a frame can be requested like this:

print(frame.BytesGet())
BytesSet(frameString)

A method which sets the content of a Frame in a hexadecimal format.

Parameters:

bytes (str) – Bytes can be of any of the formats mentioned above. The length must be at least 60 bytes

Raises:
  • ConfigError – When the frame is too small (<60 bytes) or when the frame is too big (>8192)

  • ConfigError – When the value does contain non-hexadecimal characters or when the length is not even.

This method will change the content of a Frame. A ByteBlower Frame is an Ethernet Frame excluding the four CRC bytes. The value can be in different formats, e.g.

  1. 0x01 0x02 0x03 0x04 0x05 …

  2. 0001020304050607

  3. 00 01 02 03 04 05 …

Note

You can call this method even during transmission of a flow, the value will be updated in real-time.

Example

Set the content for a frame
# Layer2 (without CRC) size.
frame_size = 1000  # bytes

# Add a frame
frame = stream.FrameAdd()

# create some payload, we need scapy for that

# frame_size is ethernet length, we substract the length of the
# ethernet, IP and UDP header
payload = 'a' * (frame_size - 42)

from scapy.layers.inet import Raw
scapy_udp_payload = Raw(payload.encode('ascii', 'strict'))

payload_array = bytearray(bytes(scapy_udp_payload))

# The API expects a 'str', so we need to make a string of the payload
payload_str = ''.join((format(b, '02x') for b in payload_array)

frame.BytesSet(payload_str)
FrameTagSequenceGet()

Returns the FrameTag.Tx object related to the sequence number injection for this frame.

New in version 1.8.18.

Return type:

FrameTagTx

Each frame can be enabled to have a sequence number inserted into the frame.

The FrameTagTx object which is returned by this method represents the current configuration of the SequenceTag injection. This object can be used to configure the SequenceTag injection.

Warning

On older ByteBlower servers, this requires a lot of resources, so this option must be used with care.

Example

print(frame.FrameTagSequenceGet().DescriptionGet())
FrameTagTimeGet()

Returns the FrameTagTx object related to the timestamp injection for this frame.

New in version 1.8.18.

Returns:

TimeTag injection configuration for this frame.

Return type:

FrameTagTx

Each frame can be enabled to have a timestamp inserted into the frame.

The FrameTagTx object which is returned by this method represents the current configuration of the TimeTag injection. This object can be used to configure the TimeTag injection.

For more detailed information about Frame tagging, you can also take a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour

Warning

On older ByteBlower servers, this requires a lot of resources, so this option must be used with care.

Example

In this example, we will retrieve the FrameTagTx object for the TimeTag:

print(frame.FrameTagTimeGet().DescriptionGet())
L3AutoChecksumEnable(value)

Enable or disable the automatic checksum calculation of the Layer3 header of this frame.

Parameters:

enable (bool) – True will enable the automatic Layer3 checksum calculation. False will disable the automatic Layer3 checksum calculation. (Default: False/Disabled)

This method provides the possibility to automatically recalculate the Layer3 checksum. Currently, only IPv4 is supported ( IPv6 has no header checksum ). This calculation will be done at the server side, just before transmitting the frame.

By default, the Layer3 checksum will not be calculated automatically.

Warning

On the ByteBlower 1000 series, this feature requires a lot of resources.

Note

This features is especially handy when combining a frame with a modifier like the FrameSizeModifier or with a FrameTag. In such a situation, the length or content of the Frame will change each time the frame has been sent, so the checksum must be calculated at the server side.

Example

This example will enable the automatic Layer3 checksum calculation:

frame.L3AutoChecksumEnable(True)
L3AutoChecksumGet()

Method returning the current configuration of the automatic checksum calculation option.

Returns:

True if enabled, False if disabled. (Default: False/Disabled)

Return type:

bool

This method returns the current configuration of the automatic Layer3 checksum calculation.

See Frame.L3AutoChecksumEnable() on how to enable this feature.

Example

This examples shows the result when the Layer3 automatic checksum calculation option is enabled:

print(frame.L3AutoChecksumGet())
L3AutoLengthEnable(value)

Enable or disable the automatic Layer3 header length field calculation of this frame.

Parameters:

enable (bool) – True will enable the automatic Layer3 length field adaption. False will disable the automatic Layer3 length field adaption. (Default: False/Disabled)

This method provides the possibility to automatically recalculate the Layer3 length field. This calculation will be done at the server side, just before transmitting the frame.

Warning

On the ByteBlower 1000 series, this feature requires a lot of resources.

Note

This features is especially handy when combining a frame with a modifier like the FrameSizeModifier. In such a situation, the length of the Frame can change each time the frame has been sent, so the length field must be adapted at the server side.

Example

This example will enable the automatic Layer3 length field adaption: This example will disable the automatic Layer3 length field adaption:

frame.L3AutoLengthEnable(True)
L3AutoLengthGet()

Method returning the current configuration of the automatic Layer3 length field adaption option.

This method returns the current configuration of the automatic Layer3 length field adaption.

See Frame.L3AutoLengthEnable() on how to enable this option.

Default value: Disabled

Returns:

True if enabled, False if disabled.

Example

This examples shows the result when the automatic Layer3 length field adaption option is enabled:

print(frame.L3AutoLengthGet())
L4AutoChecksumEnable(value)

Enable or disable the automatic Layer4 checksum calculation of this frame.

Parameters:

enable (bool) – True will enable the automatic Layer4 checksum calculation. False will enable the automatic Layer4 checksum calculation. (Default: False/Disabled)

This method provides the possibility to automatically recalculate the Layer4 (UDP or TCP) checksum. This calculation will be done at the server side, just before transmitting the frame.

Warning

On the ByteBlower 1000 series, this feature requires a lot of resources.

Note

This features is especially handy when combining a frame with a modifier like the FrameSizeModifier or FrameTag. In such a situation, the length or content of the Frame can change each time the frame has been sent, so the checksum must be recalculated at the server side.

Example

This example will enable the automatic Layer4 checksum calculation: This example will disable the automatic Layer3 checksum calculation:

frame.L4AutoChecksumEnable(True)
L4AutoChecksumGet()

Method returning the current configuration of the automatic Layer4 checksum recalculation option.

Returns:

True if enabled, False if disabled. (Default: False/Disabled)

Return type:

bool

This method returns the current configuration of the automatic Layer4 checksum recalculation.

See Frame.L4AutoChecksumEnable() on how to enable this option.

Example

This examples shows the result when the automatic Layer4 checksum recalculation option is enabled:

print(frame.L4AutoChecksumGet()
L4AutoLengthEnable(value)

Enable or disable the automatic Layer4 header length field calculation of this frame.

Parameters:

enable (bool) – True will enable the automatic Layer4 length field adaption. False will enable the automatic Layer4 length field adaption. (Default: Disabled/False)

This method provides the possibility to automatically recalculate the Layer4 (UDP or TCP) length field. This calculation will be done at the server side, just before transmitting the frame.

Warning

On the ByteBlower 1000 series, this feature requires a lot of resources.

Note

This features is especially handy when combining a frame with a modifier like the FrameSizeModifier. In such a situation, the length of the Frame can change each time the frame has been sent, so the length field must be adapted at the server side.

Example

This example will enable the automatic Layer4 length field adaption:

frame.L4AutoLengthEnable(True)
L4AutoLengthGet()

Method returning the current configuration of the automatic Layer4 length field adaption option.

Returns:

True if enabled, False if disabled. (Default: False/Disabled)

Return type:

bool

This method returns the current configuration of the automatic Layer4 length field adaption.

See L4AutoLengthEnable() on how to enable this option.

Example

This examples shows the result when the automatic Layer4 length field adaption option is enabled:

print(frame.L4AutoLengthGet())
ModifierFieldIncrementalAdd()

Adds an incremental frame field modifier.

New in version 2.5.0.

Return type:

FrameFieldModifierIncremental

Example

This example adds an incremental value frame field modifier.

frame.ModifierFieldIncrementalAdd()
ModifierFieldIncrementalDestroy(inModifier)

Returns the active incremental frame field modifier(s).

New in version 2.5.0.

Example

This example retrieves the current applied field modifiers.

frame.ModifierFieldIncrementalDestroy(modifier)
ModifierFieldIncrementalGet()

Returns the active incremental frame field modifier(s).

New in version 2.5.0.

Return type:

FrameFieldModifierIncremental

Example

This example retrieves the current applied field modifiers.

print(frame.ModifierFieldIncrementalGet()[0].DescriptionGet())
ModifierFieldRandomAdd()

Adds a random frame field modifier.

New in version 2.5.0.

Return type:

FrameFieldModifierRandom

Example

This example adds a random value frame field modifier.

frameFieldModifierRandom = frame.ModifierFieldRandomAdd()
ModifierFieldRandomDestroy(inModifier)

Removes the given Field modifier.

New in version 2.5.0.

Example

frame.ModifierFieldRandomDestroy(modifier)
ModifierFieldRandomGet()

Returns the active random frame field modifier(s).

New in version 2.5.0.

Return type:

FrameFieldModifierRandom

Example

This example retrieves the current applied field modifiers.

print(frame.ModifierFieldRandomGet()[0].DescriptionGet())
ModifierSizeGet()

Returns the active frame size modifier.

New in version 2.5.0.

:rtype:FrameSizeModifierGrowing|FrameSizeModifierRandom

Example

This example gets the current applied growing size modifier

print(frame.ModifierSizeGet().DescriptionGet())
ModifierSizeGrowingDestroy(arg2)

Removes the growing size modifier

New in version 2.5.0.

Parameters:

modifier (FrameSizeModifierRandom) – Modifier to destroy

Example

This example gets the current applied size modifier. E.g. the random

frame.ModifierSizeRandomDestroy(modifier)
ModifierSizeGrowingGet()

Returns the active frame growing size modifier.

New in version 2.5.0.

:rtype:FrameSizeModifierGrowing

Example

This example gets the current applied growing size modifier

print(frame.ModifierSizeGrowingGet().DescriptionGet())
ModifierSizeGrowingSet()

Sets a growing frame size modifier.

New in version 2.5.0.

Return type:

FrameSizeModifierGrowing

Example

This example sets a growing size frame modifier.

growSizeMod = frame.ModifierSizeGrowingSet()
ModifierSizeRandomDestroy(arg2)

Removes the random size modifier

New in version 2.5.0.

Parameters:

modifier (FrameSizeModifierRandom) – Modifier to destroy

Example

This example gets the current applied size modifier. E.g. the random

frame.ModifierSizeRandomDestroy(modifier)
ModifierSizeRandomGet()

Returns the active frame random size modifier.

New in version 2.5.0.

Return type:

FrameSizeModifierRandom

Example

This example gets the current applied size modifier. E.g. the random

print(frame.ModifierSizeRandomGet().DescriptionGet())
ModifierSizeRandomSet()

Sets a random frame size modifier.

New in version 2.5.0.

Return type:

FrameSizeModifierRandom

Example

This example sets a random size frame modifier.

frame.ModifierSizeRandomSet()
ResultClear()

Resets the current transmit counters to zero.

New in version 2.1.0.

Example

frame.resultClear()
ResultGet()

Returns the current transmit counters.

Return type:

FrameResultSnapshot

Example

 print(frame.ResultGet().DescriptionGet())
ResultHistoryGet()
Return type:

FrameResultHistory

property thisown

The membership flag

class byteblowerll.byteblower.FrameFieldModifier(*args, **kwargs)

Bases: AbstractObject

Abstract Base Class for Frame Field Modifiers

New in version 2.3.0.

LengthGet()

Method to get the current configured field length.

Returns:

The field length which will be used for this field modifier.

Return type:

int

Example

This example shows how to retrieve the current field length.

 print(frameModifier.LengthGet())
LengthSet(inLength)

Sets the length of the frame field.

Parameters:

length (int) – Length of the frame field. The value must be greater than zero and smaller than 8 (as for server version 2.3.x) Default: 2

Raises:

ConfigError – When the field length is not supported by the server.

Example

This example will set the field length to 4.

frameModifier.LengthSet(4)
OffsetGet()

Method to get the current configured field offset within the frame content.

The field offset is the absolute offset from the start of the frame.

Returns:

The field offset which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current field offset.

print(frameModifier.OffsetGet())
OffsetSet(inOffset)

Sets the offset of the frame field within the frame content.

Parameters:

offset (int) – Offset of the frame field within the frame content. This value is relative to the start of the frame. The value must be greater or equal than zero and must be smaller than the ByteBlowerPort MDL Default: 56

Raises:

ConfigError – When the field offset is out of valid range.

Example

This example will set the offset to 88.

 frameModifier.OffsetSet(88)
property thisown

The membership flag

class byteblowerll.byteblower.FrameFieldModifierIncremental(*args, **kwargs)

Bases: FrameFieldModifier

A frame field modifier which will increase the value of the frame field between a minimum and maximum value.

New in version 2.3.0.

ByteBlower allows different modifiers on a Frame. Some modifiers work on the size of a frame, others content. The FrameFieldModifierIncremental is a modifier which modifies a certain field in the frame content.

A frame field is a number of subsequent bytes in the frame content. The value is defined as host-ordering signed integer and will be written to the frame content as network-ordering signed integer.

A FrameFieldModifierIncremental will increment the value in a frame field with a configured amount. The following parameters can be configured:

  1. Parameters related to the location of the field in the frame:

    Field offset

    Offset of the field counted in bytes from the start of the frame.

    Field length

    Length of the field counted in bytes. Minimum: 1Byte. Maximum: 8Bytes ( depends on server version).

    The field cannot overwrite the 4 bytes Ethernet checksum. The allowed range for offset is 0 … <ByteBlowerPort MDL>.

    • When the field offset is greater or equal than the actual frame size, nothing will be written to the frame.

    • When the field offset is smaller than the actual frame size, but the field offset + field length exceeds the frame size. Then the LSB part of the field will be written to the frame.

    Please note that in both cases the field value will still move on to the next value.

  2. Parameters related to the value written to the field:

    Minimum value

    The minimum field value.

    Maximum value

    The maximum field value.

    Value step

    The amount the value will increase. By default, the value will grow with one but this parameter allows larger value steps. The step can be positive or negative but cannot be zero.

    Initial value

    This field value will bewritten to the frame contents when the Stream is started.

    The field value range is defined by the minimum and maximum value (both valuesinclusive).

    • Positive value step A frame with a FrameFieldModifierIncremental installed, will start sending frames with field value <Initial value>, increase the value with <Value step> until the <Maximum value> is reached.

      When maximum value is reached, the modifier will return to the minimum value again. So if the <Maximum value> is reached, the next value will be the <Minimum value>.

    • Negative value step A frame with a FrameFieldModifierIncremental installed, will start sending frames with field value <Initial value>, increase the value with (the negative) <Value step> (thus decrease the value) until the <Minimum value> is reached.

      When the minimum value is reached, the modifier will return to the maximum value again. So if the <Minimum value> is reached, the next value will be the <Maximum value>.

Note

When the <Initial value> is smaller than the <Minimum value> when the stream is started, then the minimum value will be used as initial value. When the <Initial value> is greater than the <Maximum value> when the stream is started, then the maximum value will be used as initial value.

Note

If automatic checksum and/or length calculations have been enabled on the Frame and the frame field overlaps one or more of those. Then the automatic fields will overrule the field modifier value. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

Note

It is possible that the maximum value is never reached. Depending on the <Value step> and the Stream configuration (<NumberOfFrames>), the maximum value will never be reached.

 frameModifierIncr = frame.ModifierFieldIncrementalAdd()
 frameModifierIncr.MinimumSet(500)
InitialValueGet()

Method to get the current configured initial field value.

Returns:

The initial field value which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current initial field value.

 print(frameModifierIncr.InitialValueGet())
InitialValueSet(inInitialValue)

Sets the initial value of the frame field.

Parameters:

initial (int) – Initial value of the frame field. When the initial value is smaller than the <Minimum value> when the stream is started, then the minimum value will be used as initial value. When the initial value is greater than the <Maximum value> when the stream is started, then the maximum value will be used as initial value. Default: 0

This value will be used when a Stream is started.

Example

This example will set the initial value to 1024.

 frameModifierIncr.InitialValueSet(1024)
LengthGet()

Method to get the current configured field length.

Returns:

The field length which will be used for this field modifier.

Return type:

int

Example

This example shows how to retrieve the current field length.

 print(frameModifier.LengthGet())
LengthSet(inLength)

Sets the length of the frame field.

Parameters:

length (int) – Length of the frame field. The value must be greater than zero and smaller than 8 (as for server version 2.3.x) Default: 2

Raises:

ConfigError – When the field length is not supported by the server.

Example

This example will set the field length to 4.

frameModifier.LengthSet(4)
MaximumGet()

Method to get the current configured maximum field value.

Returns:

The maximum field value which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current maximum field value.

print(frameModifierIncr.MaximumGet())
MaximumSet(inMaxValue)

Sets the maximum value of the frame field for an incremental value field modifier.

Parameters:

maximum (int) – Maximum value for the frame field. This value is limited to 64-bit signed integer range. The value must always be greater than the <Minimum value> configured. Default: 65535

Raises:

ConfigError – Maximum too big or too small.

Example

This example will set the maximum value to 16383 bytes.

 frameModifierIncr.MaximumSet(16383)
MinimumGet()

Method to get the current configured minimum field value.

Returns:

The minimum field value which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current minimum field value.

 print(frameModifierIncr.MinimumGet())
MinimumSet(inMinValue)

Sets the Minimum value of the frame field for an incremental value field modifier.

Parameters:

minimum (int) – Minimum value for the frame field. This value is limited to 64-bit signed integer range. The value must always be less than the <Maximum value> configured. Default: 0

Raises:

ConfigError – Minimum too small or too big.

Example

This example will set the minimum value to 512.

 frameModifierIncr.MinimumSet(512)
OffsetGet()

Method to get the current configured field offset within the frame content.

The field offset is the absolute offset from the start of the frame.

Returns:

The field offset which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current field offset.

print(frameModifier.OffsetGet())
OffsetSet(inOffset)

Sets the offset of the frame field within the frame content.

Parameters:

offset (int) – Offset of the frame field within the frame content. This value is relative to the start of the frame. The value must be greater or equal than zero and must be smaller than the ByteBlowerPort MDL Default: 56

Raises:

ConfigError – When the field offset is out of valid range.

Example

This example will set the offset to 88.

 frameModifier.OffsetSet(88)
StepGet()

Method to get the current configured value step.

Returns:

The value step which will be used for an incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current value step.

print(frameModifierIncr.StepGet())
StepSet(inStep)

Sets the value a field value will grow in one step.

Each time the modifier needs to adapt the value of the frame field, it will be incremented with <Value step>.

Parameters:

step (int) – This parameter defines the amount the field value will grow. This value can be positive or negative. Default: 1

Raises:

ConfigError – An error is returned when the value is zero.

Example

This example demonstrates a value step of 10:

 frameModifierIncr.StepSet(10)

This example demonstrates a negative value step of 2:

 frameModifierIncr.StepSet(-2)
property thisown

The membership flag

class byteblowerll.byteblower.FrameFieldModifierRandom(*args, **kwargs)

Bases: FrameFieldModifier

A frame field modifier which will change the field value of the frame randomly between a minimum and maximum value.

New in version 2.3.0.

ByteBlower allows different modifiers on a Frame. Some modifiers work on the size of a frame, others content. The FrameFieldModifierRandom is a modifier which modifies a certain field in the frame content.

A frame field is a number of subsequent bytes in the frame content. The value is defined as host-ordering signed integer and will be written to the frame content as network-ordering signed integer.

A FrameFieldModifierRandom will change the value in the frame field randomly. The following parameters can be configured:

  1. Parameters related to the location of the field in the frame:

    Field offset

    Offset of the field counted in bytes from the start of the frame.

    Field length

    Length of the field counted in bytes. Minimum: 1Byte. Maximum: 8Bytes (depends on server version).

    The field cannot overwrite the 4 bytes Ethernet checksum. The allowed range for offset is 0 … <ByteBlowerPort MDL>.

    • When the field offset is greater or equal than the actual frame size, nothing will be written to the frame.

    • When the field offset is smaller than the actual frame size, but the field offset + field length exceeds the frame size.

      Then the LSB part of the field will be written to the frame.

    Please note that in both cases the field value will still move on to the next value.

  2. Parameters related to the value written to the field:

    Minimum value

    The minimum field value.

    Maximum value

    The maximum field value.

    The field value range is defined by the minimum and maximum value (both values inclusive).

    So, a frame with a FrameFieldModifierRandom installed, will start sending frames with field values randomly chosen between <Minimum value> and <Maximum value>. Each time a frame is sent, a new value is selected.

Note

If automatic checksum and/or length calculations have been enabled on the Frame and the frame field overlaps one or more of those. Then the automatic fields will overrule the field modifier value. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

LengthGet()

Method to get the current configured field length.

Returns:

The field length which will be used for this field modifier.

Return type:

int

Example

This example shows how to retrieve the current field length.

 print(frameModifier.LengthGet())
LengthSet(inLength)

Sets the length of the frame field.

Parameters:

length (int) – Length of the frame field. The value must be greater than zero and smaller than 8 (as for server version 2.3.x) Default: 2

Raises:

ConfigError – When the field length is not supported by the server.

Example

This example will set the field length to 4.

frameModifier.LengthSet(4)
MaximumGet()

Method to get the current configured maximum field value.

Returns:

The maximum field value which will be used for this random value field modifier.

Return type:

int

Example

This example shows how to retrieve the current maximum field value.

print(frameModifierRnd.MaximumGet())
MaximumSet(inMaxValue)

Sets the maximum value of the frame field for a random value field modifier.

Parameters:

maximum (int) – Maximum value for the frame field. This value is limited to 64-bit signed integer range. Thevalue must always be greater than the <Minimum value> configured. Default: 65535

Raises:

ConfigError – Maximum too big or too small.

Example

This example will set the maximum value to 16383 bytes.

frameModifierRnd.MaximumSet(16383)
MinimumGet()

Method to get the current configured minimum field value.

Returns:

The minimum field value which will be used for this random value field modifier.

Return type:

int

Example

This example shows how to retrieve the current minimum field value.

print(frameModifierRnd.MinimumGet())
MinimumSet(inMinValue)

Sets the Minimum value of the frame field for a random value field modifier.

Parameters:

minimum – Minimum value for the frame field. This value is limited to 64-bit signed integer range. The value must always be less than the <Maximum value> configured. Default: 0

Return type:

int

Raises:

ConfigError – Minimum too small or too big.

Example

This example will set the minimum value to 512.

frameModifierRnd.MinimumSet(512)
OffsetGet()

Method to get the current configured field offset within the frame content.

The field offset is the absolute offset from the start of the frame.

Returns:

The field offset which will be used for this incremental value field modifier.

Return type:

int

Example

This example shows how to retrieve the current field offset.

print(frameModifier.OffsetGet())
OffsetSet(inOffset)

Sets the offset of the frame field within the frame content.

Parameters:

offset (int) – Offset of the frame field within the frame content. This value is relative to the start of the frame. The value must be greater or equal than zero and must be smaller than the ByteBlowerPort MDL Default: 56

Raises:

ConfigError – When the field offset is out of valid range.

Example

This example will set the offset to 88.

 frameModifier.OffsetSet(88)
property thisown

The membership flag

class byteblowerll.byteblower.FrameList(*args)

Bases: object

This is a List of multiple Frame objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.FrameMobile(*args, **kwargs)

Bases: AbstractObject

New in version 2.6.0.

A FrameMobile is an object that configures the payload of a frame belonging to a StreamMobile object.

A FrameMobile object is used for frame blasting. It is configured by a StreamMobile object and will be transmitted by the ByteBlower Endpoint.

Example

This example will show how to add a frame to a stream and configure the payload.

frame = stream.FrameAdd()
frame_tag = frame.FrameTagTimeGet()
FrameTagTimeGet()

Returns the FrameTagTx object related to the timestamp injection for this frame.

New in version 2.6.0.

Return type:

FrameTagTx

Each frame can be enabled to have a timestamp inserted into the frame.

The FrameTagTx object which is returned by this method represents the current configuration of the TimeTag injection. This object can be used to configure the TimeTag injection.

For more detailed information about Frame tagging, you can also take a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour

Warning

this requires extra resources, so this option must be used with care.

Example

In this example, we will retrieve the FrameTagTx object for the TimeTag:

frame_tag = frame.FrameTagTimeGet()
PayloadGet()

A method which returns the payload of a frame.

Returns:

This method returns the content in a hexadecimal string. All bytes are concatenated into one string.

Return type:

str|bytes

This method will return the UDP payload of the frame in a hexadecimal format.

Example

The current content of a frame can be requested like this:

print(frame.PayloadGet())
PayloadSet(payloadString)

A method which sets the payload of a frame.

Parameters:

bytes (str) – Bytes can be of any of the formats listed below.

This method will change the payload of the frame. The value can be in different formats, e.g.

  1. 0x01 0x02 0x03 0x04 0x05 …

  2. 0001020304050607

  3. 00 01 02 03 04 05 …

Example

The content of a frame can be set like this:

frame.PayloadSet('0001020304050607')
ResultClear()

Clears the transmit counters.

This method will clear the transmit counters for this frame.

frame.ResultClear()
ResultGet()

Returns the transmit counters.

Return type:

FrameResultSnapshot

Example

print(frame.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the current transmit history counters.

Returns:

an object representing the frame result history

Return type:

FrameResultHistory

property thisown

The membership flag

class byteblowerll.byteblower.FrameMobileList(*args)

Bases: object

This is a List of multiple FrameMobile objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.FrameModifierFieldIncrementalList(*args)

Bases: object

This is a List of multiple FrameFieldModifierIncremental objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.FrameModifierFieldRandomList(*args)

Bases: object

This is a List of multiple FrameFieldModifierRandom objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.FrameResultData(*args, **kwargs)

Bases: AbstractObject

ByteCountGet()

Gets the current transmitted bytes.

Return type:

int

Example

This example gets the transmitted bytes

 print(frameData.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame transmitted in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the largest framesize transmitted in this snapshot.

 print(frameData.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame transmitted in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest framesize transmitted in this snapshot.

 print(frameData.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(frameData.IntervalDurationGet())
PacketCountGet()

Gets the transmitted packets.

Return type:

int

Example

This example gets the transmitted packets

 print(frameData.PacketCountGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first transmitted packet in this snapshot

 print(frameData.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

 print(frameData.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last transmitted packet in this snapshot

 print(frameData.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.FrameResultDataList(*args)

Bases: object

This is a List of multiple FrameResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.FrameResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Sender-side frame transmission result history.

New in version 2.1.0.

The history contains the sender information in time since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object.

A Frame history result object can be created via

Note

See History result for more information

Example

Get the counters per sampling interval for the frame result history.

 print(frameData.FrameResultHistory())
Clear()

Removes the locally stored history snapshots.

This can be used to save memory in long tests where the results are requested at regular intervals.

Warning

Any interval or cumulative result object returned from this history object before calling Clear will be destoyed and thus become unusable.

CumulativeGet()

Returns a list of available accumulated results.

Return type:

FrameResultDataList

Example

This example gets the available accumulated results

 historyList = frameHistory.CumulativeGet()
CumulativeGetByIndex(index)

Returns a list of available cumulative counters.

Return type:

FrameResultData

Example

This example gets the available cumulative counters

 print(frameHistory.CumulativeGetByIndex(0))
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp nanoseconds.

Return type:

FrameResultData

Example

This example gets the available cumulative counters

 print(CumulativeGetByTime(timestamp))
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

Return type:

FrameResultData

Example

This example gets the available cumulative counters

 print(frameHistory.CumulativeLatestGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(frameHistory.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Return type:

FrameResultDataList

Example

This example gets the available interval results

 print(frameHistory.IntervalGet().DescriptionGet())
IntervalGetByIndex(index)

Returns a list of available interval counters.

Return type:

FrameResultData

Example

This example gets the available interval counters

 print(frameHistory.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

Return type:

FrameResultData

Example

This example gets the available interval counters

 print(frameHistory.IntervalGetByTime(timestamp))
IntervalLatestGet()

Returns the latest closed item of the interval list.

Return type:

FrameResultData

Example

This example gets the available interval counters

 print(frameHistory.IntervalLatestGet().DescriptionGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

 print(frameHistory.IntervalLengthGet())
RefreshTimestampGet()

Returns the latest timestamp when the history was refreshed.

Returns:

Timestamp in nanoseconds (since epoch)

Return type:

int

Example

 print(frameHistory.RefreshTimestampGet())
SamplingBufferLengthGet()

Returns the number of the snapshots to keep in the history.

Returns:

number of snapshots to keep in the history

Return type:

int

Example

 print(frameHistory.SamplingBufferLengthGet())
SamplingBufferLengthSet(inCount)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

 frameHistory.SamplingBufferLengthSet(100)
SamplingIntervalDurationGet()

Returns the duration of the interval used for the history snapshots.

The returned duration is in nanoseconds

Returns:

interval in nanoseconds used by the server

Return type:

int

Example

 print(frameHistory.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Warning

The previously collected historywill be invalidated.

Example

 frameHistory.SamplingIntervalDurationSet(1000)
property thisown

The membership flag

class byteblowerll.byteblower.FrameResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Todo

add documentation

ByteCountGet()

Gets the current transmitted bytes.

Example

This example gets the transmitted bytes

 print(frameSnapshot.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame transmitted in this snapshot.

New in version 2.5.0.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the largest frame size transmitted in this snapshot.

 print(frameSnapshot.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame transmitted in this snapshot.

New in version 2.5.0.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest frame size transmitted in this snapshot.

 print(frameSnapshot.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Returns:

The duration of this interval in nanoseconds

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

 print(frameSnapshot.IntervalDurationGet())
PacketCountGet()

Gets the transmitted packets.

Example

This example gets the transmitted packets

 print(frameSnapshot.PacketCountGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

 frameSnapshot.RefreshTimestampGet()
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first transmitted packet in this snapshot

 print(frameSnapshot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Example

Return type:

int

This example gets the snapshot timestamp [NS].

 print(frameSnapshot.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last transmitted packet in this snapshot

 print(frameSnapshot.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.FrameSizeModifier(*args, **kwargs)

Bases: AbstractObject

DEFAULT_MAX_SIZE = 1514
DEFAULT_MIN_SIZE = 60
ResultGet()

Returns the accumulated counters.

Return type:

FrameSizeModifierResultSnapshot

Example

resultSnapshot = sizeModifierRandom.ResultGet()
property thisown

The membership flag

class byteblowerll.byteblower.FrameSizeModifierGrowing(*args, **kwargs)

Bases: FrameSizeModifier

A frame size modifier which will increase the size of the frame between a minimum and maximum value.

New in version 2.3.0.

ByteBlower allows different modifiers on a Frame. Some modifiers work on the size of a frame, others content. The FrameSizeModifierGrowing is a modifier which modifies the size of the frame.

A FrameSizeModifierGrowingSize will increment the frame size with a configured amount of bytes. The following parameters can be configured:

Minimum size

the minimum frame size. This size will be used when the Stream is started.

Maximum size

the maximum frame size. It this limit is reached, the modifier will return to the minimum size again.

Step size

the amount of bytes the size will increase. By default, a frame will grow with one byte but this parameter allows larger step sizes.

Iteration

this parameter defines the number of times the same frame size is iterated before increasing to the next frame size.

So, a frame with a FrameSizeModifierGrowingSize installed, will start sending frames with a <Minimum size> size, will send this size <Iteration> times, increase the size with <Step size> bytes until the <Maximum size> is reached.

If the maximum size is reached, the next size is calculated as follows:

<next size> = <Minimum size> + ( <current size> + <Step size> - <Maximum size> )

All sizes define a frame size, excluding the 4 bytes Ethernet checksum.

The frame size modifier will change the size of the Frame. If the original frame size is longer, the size will truncated to the requested frame size. If automatic checksum calculations have been enabled on the Frame, they will be recalculated. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

If the original frame size of a Frame is too short, the Frame will be padded with zero-value bytes.

Note

It is possible that the maximum size is never reached. Depending on both the <Step size> and the Stream configuration (NumberOfFrames), the maximum size will never be used.

Example

This example will set the minimum frame size to 128 bytes.

sizeModifierGrowing = frame.ModifierSizeGrowingSet()
sizeModifierGrowing.MinimumSet(128)
DEFAULT_ITERATION = 1
DEFAULT_STEP_SIZE = 1
IterationGet()

Method to get the current configured iteration.

Returns:

The iteration which will be used for a growing size flow.

Return type:

int

Example

This example shows how to retrieve the current iteration.

 iteration = sizeModifierGrowing.IterationGet()
IterationSet(inIteration)

Sets the number of times the same frame size will be used.

Parameters:

iteration (int) – Number of times the same frame size will be used before the frame size is increased to the next value. Default: 1

A Frame can be sent with the same frame size multiple times before the size is increased to the next value. This parameter defines the iteration count.

Example

This example demonstrates an iteration of 10, before going to the next frame size.

 sizeModifierGrowing.IterationSet(10)
MaximumGet()

Method to get the current configured maximum frame size.

Returns:

The maximum frame size which will be used for a growing size flow.

Return type:

int

Example

This example shows how to retrieve the current maximum frame size.

 print(sizeModifierGrowing.MaximumGet())
MaximumSet(inMaxSize)

Sets the maximum size of a Frame of a growing size flow. This defines the maximum frame size of the stream.

Parameters:

maximum (int) – Maximum byte length of the Frame. This value must be at least 61 bytes, and maximum 8192. The value must also be bigger than the <Minimum size> configured. Default: 1514

Raises:

python_error Maximum too big or too small.

Example

This example will set the maximum frame size to 128 bytes.

 sizeModifierGrowing.MaximumSet(128)
MinimumGet()

Method to get the current configured minimum frame size.

Returns:

The minimum frame size which will be used for a growing size flow.

Example

This example shows how to retrieve the current minimum frame size.

 print(sizeModifierGrowing.MinimumGet())
MinimumSet(inMinSize)

Sets the Minimum size of a Frame of a growing size flow.

This defines the minimal frame size of the stream. This frame size will be used when a Stream is started.

Parameters:

minimum (int) – Minimum byte length of the Frame. This value must be at least 60 bytes, and maximum 8191. The value must also be less than the <Maximum size> configured. Default: 60

Raises:

ConfigError – Minimum too small or too big.

Example

This example will set the minimum frame size to 128 bytes.

 sizeModifierGrowing.MinimumSet(128)
StepGet()

Method to get the current configured step size.

Returns:

The step size which will be used for a growing size flow.

Return type:

int

Example

This example shows how to retrieve the current step size.

 print(sizeModifierGrowing.StepGet())
StepSet(inStep)

Sets the number of bytes a frame will grow in one step.

Parameters:

step (int) – This parameter defines the amount of bytes the frame will grow. Default: 1

Raises:

python_error: An error is returned when the value is less than 1.

Each time the modifier needs to adapt the size of the frame, the size will be incremented with <Step size> bytes.

Example

This example demonstrates a step size of 10 bytes:

 sizeModifierGrowing.StepSet(2)
property thisown

The membership flag

class byteblowerll.byteblower.FrameSizeModifierRandom(*args, **kwargs)

Bases: FrameSizeModifier

A frame size modifier which will change the size of the frame randomly between a minimum and maximum value.

New in version 2.3.0.

ByteBlower allows different modifiers on a Frame. Some modifiers work on the size of a frame, others content. The FrameModifierRandomSize is a modifier which modifies the size of the frame.

A FrameModifierRandomSize will change the frame size randomly. The following parameters can be configured:

Minimum size

the minimum frame size.

Maximum size

the maximum frame size.

So, a stream with a FrameModifierRandomSize installed, will start sending frames with a size randomly chosen between <Minimum size> size and <Maximum size> size. Each time a frame is sent, a new size is selected.

All sizes are without the additional 4 bytes Ethernet checksum.

The frame size modifier will change the sizes of the Frames added to the stream. If the original frame size is bigger, the size will truncated to the requested frame size. If automatic checksum calculations have been enabled on the Frame, they will be recalculated. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

If the original frame size of a Frame is too short, the Frame will be padded with zero-value bytes.

This example will set the maximum frame size to 128 bytes.

sizeModifierRandom = frame.ModifierSizeRandomSet()
sizeModifierRandom.MaximumSet(128)
MaximumGet()

Method to get the current configured maximum frame size.

Returns:

The maximum frame size which will be used for a random size flow.

Return type:

int

Example

This example shows how to retrieve the current maximum frame size.

 print(sizeModifierRandom.MaximumGet())
MaximumSet(inMaximum)

Sets the Maximum size of a Frame of a flow with FrameModifierRandomSize.

This defines the maximum frame size of the stream.

Parameters:

maximum (int) – Maximum byte length of the Frame. This value must be at least 61 bytes, and maximum 8192. The value must also be bigger than the <Minimum size> configured. Default: 1514

Raises:

ConfigError – Minimum too small or too big.

Example

This example will set the maximum frame size to 128 bytes.

 sizeModifierRandom.MaximumSet(128)
MinimumGet()

Method to get the currently configured minimum frame size.

Returns:

The minimum frame size which will be used for a random size flow.

Return type:

int

Example

This example shows how to retrieve the current minimum frame size.

 print(sizeModifierRandom.MinimumGet())
MinimumSet(inMinimum)

Sets the Minimum size of a Frame of a flow with FrameModifierRandomSize.

This defines the minimal frame size of the stream.

Parameters:

minimum (int) – Minimum byte length of the Frame. This value must be at least 60 bytes, and maximum 8191. The value must also be less than the <Maximum size> configured. Default: 60

Raises:

ConfigError – Minimum too small or too big.

Example

This example will set the minimum frame size to 128 bytes.

 sizeModifierRandom.MinimumSet(128)
property thisown

The membership flag

class byteblowerll.byteblower.FrameSizeModifierResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

A collection of statistics containing the results of a frame size modifier.

There are currently 2 frame size modifiers available:

Example

This example shows how to retrieve the number of packets handled by a FrameSizeModifierGrowing

resultSnapshot = sizeModifierRandom.ResultGet()
print(resultSnapshot.PacketCountGet())
ByteCountGet()

Returns the number of transmitted bytes.

Return type:

int

Example

 print(snapshot.ByteCountGet())
FramesizeMaximumGet()

Returns the size of the biggest transmitted frame.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

 print(snapshot.FramesizeMaximumGet())
FramesizeMinimumGet()

Returns the size of the smallest transmitted frame.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

 print(snapshot.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Returns:

the duration of this sample in nanoseconds

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

 print(snapshot.IntervalDurationGet())
PacketCountAboveMaximumGet()

Returns the number of transmitted packets with a size larger than maximally configured.

Return type:

int

Example

 print(snapshot.PacketCountAboveMaximumGet())
PacketCountBelowMinimumGet()

Returns the number of transmitted packets with a smaller size than configured.

Return type:

int

Example

 print(snapshot.PacketCountBelowMinimumGet())
PacketCountGet(*args)

Returns the number of transmitted packets.

Return type:

int

Example

 print(snapshot.PacketCountGet())

Returns the number of transmitted packets.

Return type:

int

Example

 print(snapshot.PacketCountGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Returns:

The timestamp in nanoseconds when the counters were last refreshed in nanoseconds since epoch

Return type:

int

Note

This is not the same as TimestampGet()

Example

 print(snapshot.RefreshTimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Returns:

The timestamp of the first transmitted frame in nanoseconds since epoch

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first transmitted packet in this snapshot

 print(snapshot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

The timestamp of this snapshot in nanoseconds since epoch

Return type:

int

Example

This example gets the snapshot timestamp [NS].

 print(snapshot.TimestampGet())
TimestampLastGet()

Gets the timestamp [NS] of the last packet in this snapshot.

Returns:

The timestamp of the last transmitted frame in nanoseconds since epoch

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last transmitted packet in this snapshot

 print(snapshot.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.FrameTag(*args, **kwargs)

Bases: AbstractObject

FormatDestroy()
FormatGet()

Method to set the format.

Returns:

This defines the format of the tag

Rtype format:

FrameTagFormat

Example

In this example, we set the format of the timestamp to 10 nanoseconds.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

See also: FormatStringGet() for details on the tag formats.

FormatStringGet()

This returns the format string of this tag.

The exact format of the different tags may vary between the different versions of the ByteBlower software. To match the receiving part of a flow with then transmitting part, it is necessary to configure the same format.

Each tag format has a unique format code. The following formats are currently defined:

  • Sequence Tag:

    For a Sequence Tag, the following formats exist:

    • SequenceNumber-0_CRC

      this format defines a tag of 8 bytes:

      1

      2

      3

      4

      5

      6

      7

      8

      SEQUENCE NUMBER

      CRC

      The sequence number is incremented for each packet leaving the ByteBlower server. The CRC will invert the changes in value so the checksum over the full payload remains constant. This makes sure other checksums (e.g. UDP) remain valid.

  • Time Tag

    For a Time Tag, two formats are currently defined:

    • TimeStamp-Microseconds_CRC

      Deprecated since version 2.9.0.

      This format is used on pre-1.10.16 software versions on the ByteBlower 1000 series. This Tag is 8 bytes long and looks like this:

      1

      2

      3

      4

      5

      6

      7

      8

      TIMESTAMP MICROSECONDS

      CRC

      This format carries the server timestamp when this frame was sent in units of microseconds. The CRC will invert the changes in value so the checksum over the full payload remains constant. This makes sure other checksums (e.g. UDP) remain valid.

    • TimeStamp-10Nanoseconds

      This format is used by the ByteBlower 2000 series and by the 1000 series from version 1.10.18 onwards. This Tag is 8 bytes long, only containing the Timestamp in nanoseconds. It does not include a CRC compensation. This means that automatic checksum calculation must be enabled on the Frame or those CRC values will be incorrect.

Returns:

One of SequenceNumber-0_CRC TimeStamp-Microseconds_CRC TimeStamp-10Nanoseconds

Return type:

str

Example

This example will return the type of a Sequence

print(frame_tag.FormatStringGet())
MetricsDestroy()
MetricsGet()

Returns the FrameTagMetrics of this tag.

Return type:

FrameTagMetrics

The FrameTag Metrics represent the configuration like the length and alignment of a tag. This method returns this information for this object.

Example

This example will return the FrameTagMetrics object for a sequence tag:

frameTagtx = frame.FrameTagSequenceGet()
tagMetrics = frameTagtx.MetricsGet()
PositionGet()

Returns the current configured location of the tag within the Frame.

Returns:

Current configured position. If nothing was specified, the default position chosen by the server is returned.

Return type:

int

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

0

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method returns the current configured value for this position.

Default value

  • At the TX side, the default position places the tag at the end of the frame, without overlapping with other enabled tags.

  • At the RX side, the default position is the length of the tag. This means the RX side guesses the location of the tag to be at the very end of the frame. Note that this guess is incorrect if multiple tags are enabled on a single frame!

Example

This example will return the position of a sequence tag:

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

PositionSet(newPosition)

Sets the location of the tag in the Frame.

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method allows the user to configure this value.

Parameters:

position – The new value of the position. This value must be between <taglength> and <framelength>.

Example

This example will sets the position of a sequence tag:

TODO

TypeGet()

Returns the FrameTag type.

Return type:

FrameTagType

Currently two FrameTags are in use:

  • The TimeTag is used for latency measurements and contains a timestamp value. The server automatically determines it by looking at its clock for each frame sent in the stream.

  • The SequenceTag is used for out of sequence detection and contains a frame counter value. The server automatically increments it for each frame sent in the stream.

Example

This example will return the type of a Sequence Tag:

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

property thisown

The membership flag

class byteblowerll.byteblower.FrameTagFormat(*args, **kwargs)

Bases: AbstractObject

FormatStringGet()
SequenceNumberFormatGet()
TimeStampFormatGet()
TypeGet()
property thisown

The membership flag

class byteblowerll.byteblower.FrameTagMetrics(*args, **kwargs)

Bases: AbstractObject

Class which represents the metrics of a FrameTag.

The metrics of a tag are parameters describing the length and byte alignment of a frame.

The metrics can only be read, because they are determined by the tag format and the server type.

metric = frameTagtx.MetricsGet()
print(metric.AlignmentGet())
AlignmentGet()

Returns the alignment value for this tag.

Returns:

The alignment value of this tag.

Return type:

int

Some frame tags must be aligned with the start of a frame. This means the tag must start at a multiple of <x> bytes within a frame, where <x> is the alignment value. The default value is one.

Frame alignment requirements are caused by hardware limitations as a new tag must be included in every frame that is sent.

Example

This example illustrates how the alingment value of a timestamp tag can be retrieved;

 print(metric.AlignmentGet())
LengthGet()

Returns the length of the tag.

Returns:

The length of the tag in bytes.

Return type:

int

The number of bytes in a Frame that will be overwritten by this tag.

Note

This byte range does not need to be contiguous! More specifically, if the tag alignment is larger than one, a single byte containing the offset to the aligned tag may be stored separately.

Example

This example shows the how to retrieve the length of a sequence tag:

 print(metric.LengthGet())
property thisown

The membership flag

class byteblowerll.byteblower.FrameTagRx(*args, **kwargs)

Bases: FrameTag

The FrameTagRx class describes the receive configuration of a Tag in a Frame.

ByteBlower supports optional tagging of frames. Such a tag can have different formats, locations, … These parameters can be set and retrieved using this class.

Currently, two different types of FrameTags are supported:

  • Sequence Number: A tag which contains the sequence number within the stream.

  • Timestamp: A tag containing the timestamp this frame has left the transmit interface.

Adding tags is a very powerful and flexible feature of ByteBlower. Please have a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour for a detailed explanation.

This class is represents the FrameTag configuration at the receiving side of the flow.

In typical situations this configuration must not be changed.

FormatDefaultSet()

Sets the format to the native, default format.

This method sets the format to the default value. The default value depends on server type:

For sequence tags, the default value is the same for all systems <SequenceNumber-0_CRC>.

For time tags, the default value is <TimeStamp-10Nanoseconds>. However, on 1000 series servers with a software version before 1.10.18, the <TimeStamp-Microseconds_CRC> format is used instead.

Raises:

ByteBlower.Rx.Counter.Unsupported - The format string is a valid value, but is not supported by the server.

Raises:

<python_error> - The format string is not a valid value.

Example In this example, we restore the format of a sequence tag to the default format:

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

Todo

Real Example

FormatSet(fromFrameTagFormat)

Method to set the format.

Parameters:

format (FrameTagFormat) –

This defines the format of the tag, the following format strings are currently supported:

TimeStamp-Microseconds_CRC Timestamp in microseconds followed by a CRC. Not supported since 2.9.0

Example

In this example, we set the format of the timestamp to 10 nanoseconds.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

See also: FrameTag.FormatStringGet for details on the tag formats.

FormatSetFromString(formatString)

Method to set the format by name.

This method allows to set the format by name.

See also: FrameTag.FormatStringGet for details on the tag formats.

Parameters:

format

This defines the format of the tag, the following format strings are currently supported:

TimeStamp-Microseconds_CRC Timestamp in microseconds followed by a CRC. Not supported since 2.9.0

Valid Options

TimeStamp-10Nanoseconds

Timestamp in nanoseconds.

SequenceNumber-0_CRC

Sequence number followed by a CRC.

Example

In this example, we set the format of the timestamp to 10 nanoseconds.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

MetricsDefaultSet()

Sets the metrics to the default values.

This method restores the metrics to the default value.

Currently, both the sequence tag and time tag have metrics with an alignment of 1 bytes and a size of 8 bytes on all servers types and versions.

Example

This example restores the default metrics of a sequence tag.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

MetricsSet(fromFrameTagMetrics)

Sets the metric of the tag.

This method allows to copy the metrics of a FrameTagTx to the receive side of a flow.

Note that it is often better to copy the complete TX tag configuration to the receive side of a flow. See TaggedRx.FrameTagSet for an example.

Parameters:

metrics – This parameter is an object of type FrameTagMetrics .

Example

This example demonstrates how you can set the metrics of a frame on the receiving object. The configuration is simply copied from the TX side.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

PositionDefaultSet()

This restores the position to the default value.

This method restores the default value for the position. By default, the tag is put at the end of the frame. This will restore the position of the receiving object to its default.

Example

This example restores the position of the sequence tag to the default value.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

PositionGet()

Returns the current configured location of the tag within the Frame.

Returns:

Current configured position. If nothing was specified, the default position chosen by the server is returned.

Return type:

int

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

0

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method returns the current configured value for this position.

Default value

  • At the TX side, the default position places the tag at the end of the frame, without overlapping with other enabled tags.

  • At the RX side, the default position is the length of the tag. This means the RX side guesses the location of the tag to be at the very end of the frame. Note that this guess is incorrect if multiple tags are enabled on a single frame!

Example

This example will return the position of a sequence tag:

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

PositionSet(newPosition)

Sets the location of the tag in the Frame.

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method allows the user to configure this value.

Parameters:

position – The new value of the position. This value must be between <taglength> and <framelength>.

Example

This example will sets the position of a sequence tag:

TODO

property thisown

The membership flag

class byteblowerll.byteblower.FrameTagTx(*args, **kwargs)

Bases: FrameTag

The FrameTagTx class describes the transmit configuration of a Tag in a Frame.

ByteBlower supports optional tagging of frames. Such a tag can have different formats, locations, … These parameters can be set and retrieved using this class.

Currently, two different types of FrameTags are supported:

SequenceTag

is used for out of sequence detection and contains a frame counter value. The server automatically increments it for each frame sent in the stream.

TimeTag

is used for latency measurements and contains a timestamp value. The server automatically determines it by looking at its clock for each frame sent in the stream.

Adding tags is a very powerful and flexible feature of ByteBlower. Please have a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour for a very detailed explanation.

To perform latency measurements or out of sequence detection, configuration needs to be done both at TX and RX side:

  • At the TX side

    we need to add the FrameTag(s) to the Frame object.

  • At the RX side

    we need to create the appropriate receiver(s) on the incoming packets. This causes the server to read a tag from the received frames and interpret them (e.g. by calculating latency based on the timestamps).

Enable(set)

Method to enable the tag on the Frame.

Parameters:

enable (bool) – Enable the Transmit FrameTag (Default: False)

This will activate the tag on the Frame, and apply its configuration. As long as this method is not called, the tag will not be active.

Note

the configuration of other enabled frames may change when this frame is disabled.

Example

To enable the sequence tag on frame, one can do:

 print(frameTagtx.Enable(True))
IsEnabled()

Method which will return whether a tag is activated or not.

Returns:

True if enabled, false if disabled. (Default: False / Disabled)

Return type:

bool

This method is used to retrieve the current state of the tag. If this tag is activated/enabled, true is returned. Otherwise, this method will return false.

Example

Check if a timestamp tag is enabled on a frame
frameTagtx = frame.FrameTagSequenceGet()
print(frameTagtx.IsEnabled())
PositionAutomaticSet()

This method will use the automatic position for the tag.

ByteBlower is very flexible in positioning the tag, and the combination of different tags. If the position of the tag is not important, the automatic positioning of tags is the easiest way for the user and is enabled by default

Note

The automatic position is used by default. This method is only useful when you want to reset positions that were previously set by the user.

Automatic placement of FrameTags has multiple advantages:

  1. it shields the API user from the complexity described above

  2. it makes sure the requirements are respected:

    the position will always be larger than the tag length and multiple tags will never overlap

  3. it places the tags as close towards the end as possible to allow tagging small frames without overwriting frame headers

Tags are automatically placed at the end of the frame. If both Tags are enabled and have an automatic position, the SequenceTag is placed in front of the TimeTag.

If a tag has an explicit position, this is always respected. The automatic position will adapt to it as follows:

  1. If there is enough place after the fixed tag to fit the automatic tag, the automatic tag is placed behind it (at the end of the frame).

  2. If there is not enough place after the fixed tag to fit the automatic tag, the automatic tag is placed right in front of the fixed tag.

Example

In this example, we will reset the position of the sequence tag to automatic.

 frameTagtx.PositionAutomaticSet()
PositionGet()

Returns the current configured location of the tag within the Frame.

Returns:

Current configured position. If nothing was specified, the default position chosen by the server is returned.

Return type:

int

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

0

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method returns the current configured value for this position.

Default value

  • At the TX side, the default position places the tag at the end of the frame, without overlapping with other enabled tags.

  • At the RX side, the default position is the length of the tag. This means the RX side guesses the location of the tag to be at the very end of the frame. Note that this guess is incorrect if multiple tags are enabled on a single frame!

Example

This example will return the position of a sequence tag:

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

PositionSet(newPosition)

Sets the location of the tag in the Frame.

A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).

This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.

The meaning of the position value is shown like this:

Position

<——————–

Frame contents

TAG

If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.

This method allows the user to configure this value.

Parameters:

position – The new value of the position. This value must be between <taglength> and <framelength>.

Example

This example will sets the position of a sequence tag:

TODO

property thisown

The membership flag

class byteblowerll.byteblower.FrameTagType

Bases: object

The type of the FrameTag as found in a Trigger and a Frame

SequenceNumber = 1

This is a FrameTag with a sequence number.

TimeStamp = 0

This is a FrameTag with a timestamp.

class byteblowerll.byteblower.GroupSchedulableObject(*args, **kwargs)

Bases: object

property thisown

The membership flag

class byteblowerll.byteblower.HTTPClient(*args, **kwargs)

Bases: SchedulableObject

HTTP client application that may schedule HTTP requests to real webservers or the HTTP server application.

Using this class, you can simulate TCP (Transmission Control Protocol) traffic The TCP is simulated by a HTML request to the HTTPServer. This is the HTTP Client that will perform the GET or the PUT. This request can be sent to the HTTPServer or even a real HTTPServer.

httpClient = port.ProtocolHttpClientAdd()
 httpClient.RemoteAddressSet('1.1.1.1')
 httpClient.RemotePortSet(80)
 httpClient.CaptureEnable()
 httpClient.RequestDurationSet(10 * 1000)
 httpClient.ReceiveWindowScalingValueSet(7)
 httpClient.SlowStartThresholdSet(2000000000)
 httpClient.RequestStart()
CaptureClear()

Clears the capture if enabled

CaptureEnable(inValue=True)

Enable the capture of the HTTPData.

Parameters:

enable (bool) – Whether or not to capture the received HTTP data

Example

httpClient.CaptureEnable()

Enable the capture of the HTTPData.

Parameters:

enable (bool) – Whether or not to capture the received HTTP data

Example

httpClient.CaptureEnable()
CaptureGet()

Return the captured HTTP Data.

Return type:

CapturedHTTPData

Example

 print(httpClient.CaptureGet().DescriptionGet())
ClientIdGet()

Returns the unique client ID.

Returns:

The httpclient unique ID

Return type:

str

Each client has a unique ID so that information about the same connection can be requested on a HTTP server object. This method returns the unique ClientID for this HTTP client.

Example

 print(httpClient.ClientIdGet())
ErrorMessageGet()

Returns the error message.

Returns:

The error message string

Return type:

bool

When the request status is “Error” then extra information can be obtained with this method.

Example

print(httpClient.ErrorMessageGet())
FinishedGet()

Returns whether or not the HTTP session has finished.

Returns:

True: Finished (with or without error), False: Not Finished

Return type:

bool

Example

Check if the client is finished

print(httpClient.FinishedGet())
FlowLabelGet()

Returns the configured “Flow Label” for IPv6 flows.

New in version 2.7.0.

Return type:

int

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example

 print(httpClient.FlowLabelGet())
FlowLabelSet(value)

Configures the flow label for IPv6 flows.

New in version 2.7.0.

Parameters:

label (int) – IPv6 Flow label to set in the IPv6 header

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example

httpClient.FlowLabelSet(1234)
HasError()

Returns true if an error has occurred.

Returns:

True: An error has occurred, False: No error has occurred

Return type:

bool

Example

print(httpClient.HasError())
HasSession()

Returns whether or not we have a HTTP session.

Returns:

True We have a session, False We don’t have a session

Return type:

bool

Example

print(httpClient.MaximumSegmentSizeGet())
HistorySamplingBufferLengthGet()

Gets the default Sampling Buffer Length for the HTTP Session history.

Returns:

The size of the sample buffer size on the server-side.

Return type:

int

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

print(httpClient.HistorySamplingBufferLengthGet())
HistorySamplingBufferLengthSet(inLength)

Sets the default Sampling Buffer Length for the HTTP Session history.

Parameters:

length (int) – The length of the server-side sample buffer

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the HTTP Session object.

Example

httpClient.HistorySamplingBufferLengthSet(10)
HistorySamplingIntervalDurationGet()

Gets the default Sampling interval for the HTTP Session history.

Returns:

The duration of a single sample in nanoseconds

Return type:

int

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

print(httpClient.HistorySamplingIntervalDurationGet())
HistorySamplingIntervalDurationSet(inDuration)

Sets the default Sampling interval for the HTTP Session history.

Parameters:

duration (int) – duration of a single sample in nanoseconds

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the HTTP Session object.

Example

httpClient.HistorySamplingIntervalDurationSet(500)
HttpMethodGet()

Returns the used HTTPRequest method.

Returns:

The configured HTTP Request Method (Default: HTTPRequestMethod.Get)

Return type:

HTTPRequestMethod

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')

Todo

Real Example

HttpMethodSet(*args)

Configures the HTTPRequest method to be used.

Parameters:

method (HTTPRequestMethod) – HTTP Request method to use (Default: HTTPRequestMethod.Get)

Example

httpClient.HttpMethodSet(HTTPRequestMethod.Get)

Configures the HTTPRequest method to be used.

Parameters:

method (HTTPRequestMethod) – HTTP Request method to use (Default: HTTPRequestMethod.Get)

Example

httpClient.HttpMethodSet(HTTPRequestMethod.Get)
HttpSessionInfoDestroy()

Removes a HTTP Session statistics object

Removing a HTTP Session statistics object will free up the storage required on the ByteBlower server and the API instance. Any stored value containing this object will be invalid.

HttpSessionInfoGet()

Returns the HttpSessionInfo from this session.

Return type:

HTTPSessionInfo

The HttpSessionInfo contains all the information of the current session. From state until the counters of received/transmitted bytes

Example

sessionInfoGet = httpClient.HttpSessionInfoGet()
IsCaptureEnabled()

Returns whether the capture of the HTTPData is enabled.

Returns:

Whether or not to capture the received HTTP data

Return type:

bool

Example

httpClient.IsCaptureEnabled()
IsLatencyEnabled()

Returns whether latency measurements are enabled.

Returns:

Whether or not to latency measurements are enabled

Return type:

bool

Example

httpClient.IsLatencyEnabled()
LatencyEnable(inValue=True)

Enable one way latency measurements on the HTTP layer.

Parameters:

enable (bool) – Whether or not to enable latency measurements

Example

httpClient.LatencyEnable()

Enable one way latency measurements on the HTTP layer.

Parameters:

enable (bool) – Whether or not to enable latency measurements

Example

httpClient.LatencyEnable()
LocalPortGet()

Returns the TCP the httpclient will use to send its HTTPRequest.

Returns:

The TCP port the client uses.

Return type:

bool

Example

 print(httpClient.LocalPortGet())
LocalPortSet(inPort)

Configure the TCP port for the client to use.

Parameters:

port (int) – TCP port on which the client will listen or replies and send its requests.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – when the value is not between 1 and 65535

Example

httpClient.LocalPortSet(45780)
MaximumSegmentSizeGet()

Returns the configured TCP maximum segment size.

Returns:

the configured TCP MSS in bytes (Default: 65535)

Return type:

bool

Example

print(httpClient.MaximumSegmentSizeGet())
MaximumSegmentSizeSet(inValue)

Sets the TCP maximum segment size.

Parameters:

size (int) – Maximum segment size. Should be between 1 and 65535.

This option specifies an upper bound on the TCP segment size.

Example

 httpClient.MaximumSegmentSizeSet(65535)
ReceiveWindowInitialSizeGet()

Gets the initial receive window for the client.

Returns:

The configured initial receive window size. (Default: 65535)

Return type:

int

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Example

print(httpClient.ReceiveWindowInitialSizeGet())
ReceiveWindowInitialSizeSet(inValue)

Sets the initial receive window for the client.

Parameters:

windowsize (int) – New value of the initial receive window.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – When the value is out of range

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Example

httpClient.ReceiveWindowInitialSizeSet(65535)
ReceiveWindowScalingEnable(inEnable)

Enables of disables windowscaling.

Parameters:

scaling (bool) – Which will enable (True) or disable (false) windowscaling. (Default: True)

Raises:

TypeError – When the value is not true or false

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Example

To enable window scaling
httpClient.ReceiveWindowScalingEnable(True)
To disable window scaling
httpClient.ReceiveWindowScalingEnable(False)
ReceiveWindowScalingIsEnabled()

Returns if windowscaling is enabled or not.

Returns:

True window scale enabled, False window scale disabled (Default: True)

Return type:

bool

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Example

When enabled:

 print(httpClient.ReceiveWindowScalingIsEnabled())
ReceiveWindowScalingValueGet()

Returns the current receive window scale.

Returns:

The current receive window scale (Default: 3)

Return type:

int

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF rfc:1323.

Example

print(httpClient.ReceiveWindowScalingValueGet())
ReceiveWindowScalingValueSet(inValue)

Configures the window scale which will be used for the client.

Note

This must be done before requesting the page, because this option is negotiated at the beginning of the TCP session.

Raises:
  • TypeError – when the value is not an Integer

  • ConfigError – When the value is not in the range 0-8

Parameters:

scale (int) – (0-8), which is used for bitwise shifting. (Default: 3)

Example

httpClient.ReceiveWindowScalingValueSet()
RemoteAddressGet()

Return the configured destination address.

Returns:

IP Address of the HTTP Server to send a request to.

Return type:

int

Example

print(httpClient.RemoteAddressGet())
RemoteAddressSet(inAddress)

Configure the destination address.

Parameters:

address (str) – Address of the HTTP server this client will use.

Method to configure the address of the HTTP server which this client will try to contact.

Note

Be aware that only addresses are used, no DNS is supported at this moment.

Example

 httpClient.RemoteAddressSet('1.1.1.1')
RemotePortGet()

Returns the configured destination port.

Returns:

the remote (destination) tcp port

Return type:

int

This method returns the current configured TCP port of the HTTP server which this client will try to contact.

Example

port = httpClient.RemotePortGet()
RemotePortSet(inRemotePort)

Configure the TCP port which the client will use as destination port.

Parameters:

port (int) – TCP port of the HTTP server which the client will try to contact.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – when the value is not between 1 and 65535

This method is used to configure the TCP port of the server which the client will try to contact.

Example

Configure the client to use port 80 as destination port
httpClient.RemotePortSet(80)
RequestDurationGet()

Method which will return the configured HTTP Request duration.

Returns:

The HTTP request duration in nanoseconds.

Return type:

int

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

Example

Get the configured request duration

 print(httpClient.RequestDurationGet())
RequestDurationSet(inDurationNs)

Method which will configure a page to send out an HTTP Request to transmit data during a certain time.

Parameters:

duration (int) – The duration in nanoseconds of data traffic to send the HTTP Request for.

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with data transferred over the network until the requested duration has passed.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet(). The HTTP Method defines the way the data traffic will flow.

Note

The Start Type that is used for the Request can be configured using RequestStartTypeSet(). The Start Type defines when the HTTP Request will start.

Note

The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.

Example

will configure a request to transfer data during 1.5 seconds expressed in nano seconds
httpClient.RequestDurationSet(int(1.5 * 1000000000))
RequestInitialTimeToWaitGet()

Returns the initial time to wait before a scheduled Request starts.

Returns:

The initial time to wait before a scheduled request starts. Units are nanoseconds (Default: 0)

Return type:

int

Example

 print(httpClient.RequestInitialTimeToWaitGet())
RequestInitialTimeToWaitSet(inDelay)

Sets the initial time to wait before really requesting a page (for a scheduled Request).

Parameters:

timetowait (int) – Time to wait before the request will be really sent. Units are nanoseconds (Default: 0)

This can be used if you want to start different request on different timestamps.

Example

Initial Time to wait of 60 seconds expressed in nanoseconds
 httpClient.RequestInitialTimeToWaitSet(60000000000)
RequestPageGet()

Method which will get the HTML page which will be requested.

Returns:

the HTML page name that will be requested

Return type:

str

If you are requesting on a ByteBlower HTTP Server, please check RequestSizeSet() and RequestDurationSet() for specialized HTTP Requests

Method which will set the HTML page which will be requested. When RequestStart() is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

A typical use in ByteBlower is a request for a certain size to a ByteBlower HTTP server. e.g. 10000000.html This will give us a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet() The HTTP Method defines the way the data traffic will flow.

Note

The Start Type that is used for the Request can be configured using RequestStartTypeSet() The Start Type defines when the data traffic will start.

Example

print(httpClient.RequestPageGet())
RequestPageSet(arg2)

Method which will set the HTML page which will be requested.

Parameters:

pagename (str) – The page to send the HTTP Request for.

If you are requesting on a ByteBlower HTTP Server, please check RequestSizeSet() and RequestDurationSet() for specialized HTTP Requests

Method which will set the HTML page which will be requested. When RequestStart() is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

A typical use in ByteBlower is a request for a certain size to a ByteBlower HTTP server. e.g. 10000000.html This will give us a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet() The HTTP Method defines the way the data traffic will flow.

Note

The Start Type that is used for the Request can be configured using RequestStartTypeSet() The Start Type defines the way the data traffic will flow.

Example

Setting the client to request for the page: 100000.html
httpClient.RequestPageSet('100000.html')
RequestRateLimitGet()

Method which will return the configured rate-limit of the HTTP traffic.

Returns:

rateLimit The rate limit, in bytes per second. A value of zero indicates not limit. (Default: 0)

Return type:

int

Example

Getting the configured rate limit.
print(httpClient.RequestRateLimitGet())
RequestRateLimitSet(inRateLimitBytesps)

Method which will limit the rate of the HTTP traffic to a certain amount..

Parameters:

rateLimit (int) – The rate limit, in bytes per second.

Example

Setting the rate limit to 10 MBytesps
httpClient.RequestRateLimitSet(10000000)
Disable rate limit
httpClient.RequestRateLimitSet(0)
RequestSizeGet()

Method which will return the configured requested pagesize expressed in Bytes.

Returns:

The configured requested pagesize in Bytes

Return type:

int

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

Example

Getting the configured requestsize
print(httpClient.RequestSizeGet())
RequestSizeSet(inRequestSize)

Method which will configure a page to send out an HTTP Request to request a certain number of Bytes.

Parameters:

requestsize (int) – The number of Bytes to send the HTTP Request for.

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet() The HTTP Method defines the way the data traffic will flow.

Note

The Start Type that is used for the Request can be configured using RequestStartTypeSet() The Start Type defines when the HTTP Request will start.

Note

The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.

Example

Setting the requestsize to 10000000 Bytes
httpClient.RequestSizeSet(10000000)
RequestStart()

Start the current configured HTTP Request.

Raises:

ConfigError – This exception is thrown when some configurations are incorrect. For example if the RemoteAddress is an IPv6 address and the HTTPClient has a IPv4 address.

The Start Type can be configured using RequestStartTypeSet()

Configuring the Request is done using RequestSizeSet() and RequestDurationSet()

Example

httpClient.RequestStart()
RequestStartTypeGet()

Returns the current configured Start Type.

Returns:

Start Type of the HTTP request. Must be either RequestStartType.Direct or RequestStartType.Scheduled (Default: RequestStartType.Direct)

Return type:

RequestStartType

Example

On a httpClient with direct starttype

print(httpClient.RequestStartTypeGet() == RequestStartType.Scheduled)
RequestStartTypeSet(inRequestStartType)

Configures the Start Type of a HTTP Request.

Parameters:

startType (RequestStartType) – Start Type of the HTTP request. Must be either RequestStartType.Direct or RequestStartType.Scheduled (Default: RequestStartType.Direct)

Example

Setting the startype to direct
httpClient.RequestStartTypeSet(RequestStartType.Direct)
Setting the startype to scheduled use RequestInitialTimeToWaitSet() to configure the schedule
 httpClient.RequestStartTypeSet(RequestStartType.Scheduled)
RequestStartType_Direct = 0
RequestStartType_Scheduled = 1
RequestStatusGet()

Returns the status of the HTTP request.

Return type:

HTTPRequestStatus

Example

print(httpClient.RequestStatusGet() == HTTPRequestStatus.Scheduled)
RequestStop()

This will stop the client.

Example

 httpClient.RequestStop()
RequestUriGet()

Returns the requested URI.

Returns:

HTTP Request URI as configured by RequestUriSet()

Return type:

str

Returns the URI like it is or will be requested by the client.

Example

print(httpClient.RequestUriGet())
RequestUriSet(inURI)

Method which will set the URI, it contains the complete HTTP URI which will be requested.

Parameters:

uri (str) – The URI the httpClient must request.

When RequestStart() is called, the HTTP Client will send a HTTP Request message for this page and will listen for a response.

Different from the RequestPageSet() method, this method allows you to configure a HTTP Request to external (non-ByteBlower) HTTP servers without adding the ‘server-client-id’ to the HTTP Request page’s path. Configuring the URI will also configure the HTTP Server address and HTTP Server TCP to which the HTTP Request is sent.

Note

DNS resolution is not supported for the URI, so the HTTP Server needs to be an IPv4 or IPv6 address.

Example

Configure the HTTP Client to send a request to HTTP Server 1.1.1.1, on the default TCP port 80, for page ‘/test/index.html’
httpClient.RequestUriSet(http://1.1.1.1/test/index.html)
configure the HTTP Client to send a request to HTTP Server 10.10.10.2, on TCP port 8080, for page ‘/project/index.html’
httpClient.RequestUriSet(http://10.10.10.2:8080/project/index.html)
ResultGet()

Returns the current HTTP statistics for a this session.

Returns:

The current cumulative HTTP Results for the this session

Return type:

HTTPResultSnapshot

ResultHistoryGet()

Returns the current HTTP statistics history for a this session.

Returns:

The current HTTP Result history for the this session

Return type:

HTTPResultHistory

ServerClientIdGet()

Return the combination of the server Id ( aka ByteBlower Server Id ) and client Id.

Returns:

The combined server- and client Id

Return type:

str

This returns a combination of the ServerId and the Client Id. This combination will identify a HTTP connection. It is this combination of id’s you can use to request the HTTPSessionInfo on the HTTP server (HTTPServer.HttpSessionInfoGet)

Example

 print(httpClient.ServerClientIdGet())
ServerIdGet()

Returns the unique ByteBlower Server ID.

Returns:

The ByteBlower server unique ID.

Return type:

str

Each ByteBlower server has a unique ID. This identifier stays persistant over the lifetime of the ByteBlowerServers (changed when rebooted). This serverId together with the clientId identifies a HTTPConnection. By adding those 2 id’s together it is unlikely that 2 httpclients each running on a different server end up with the same connection ID.

Example

print(httpClient.ServerIdGet())
SlowStartThresholdGet()

Returns the initial slow-start threshold value used by TCP.

Returns:

slowstart threshold (Default: 65535)

Return type:

int

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

print(httpClient.SlowStartThresholdGet())
SlowStartThresholdSet(inValue)

Set the initial slow-start threshold value used by TCP.

Parameters:

ssthresh (int) – The slow start threshold to use (Default: 65535)

Raises:

ConfigError – When the value is not a positive integer

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

To set slow-start threshold to 1000000
 httpClient.SlowStartThresholdSet(1000000)
TcpCongestionAvoidanceAlgorithmGet()

Gets the current configured TCP Congestion Avoidance Algorithm.

Returns:

current Congestion Avoidance Algorithm. (Default: TCPCongestionAvoidanceAlgorithm.No_Algorithm)

Return type:

TCPCongestionAvoidanceAlgorithm

Example

 print(httpClient.TcpCongestionAvoidanceAlgorithmGet() == TCPCongestionAvoidanceAlgorithm.NewRenoWithCubic)
TcpCongestionAvoidanceAlgorithmSet(inValue)

Selects the used TCP Congestion Avoidance Algorithm (TCAA).

This must be selected before requesting the page, because for some algorithms, the congestion avoidance support is negotiated a the beginning of the TCP session.

Parameters:

algorithm (TCPCongestionAvoidanceAlgorithm) – current Congestion Avoidance Algorithm. (Default: TCPCongestionAvoidanceAlgorithm.No_Algorithm)

Raises:

ConfigError – Invalid TCP congestion avoidance algorithm: When the value could not be interpreted as a valid TCAA

Example

Configure NewReno as congestionAvoidance Algorithm
 httpClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.NewReno)
Configure Sack as congestionAvoidance Algorithm
httpClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.Sack)
Configure None as congestionAvoidance Algorithm
httpClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.No_Algorithm)
TcpHistorySamplingBufferLengthGet()

Gets the default Sampling Buffer Length for the TCP Session history.

Return type:

int

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

print(httpClient.TcpHistorySamplingBufferLengthGet())
TcpHistorySamplingBufferLengthSet(inLength)

Sets the default Sampling Buffer Length for the TCP Session history.

Parameters:

length (int) – The size of the sample buffer on the server-side

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the TCP Session object.

Example

 httpClient.TcpHistorySamplingBufferLengthSet(12)
TcpHistorySamplingIntervalDurationGet()

Gets the default Sampling interval for the TCP Session history.

Returns:

The duration of a single sample in nanoseconds

Return type:

int

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

 print(httpClient.TcpHistorySamplingIntervalDurationGet())
TcpHistorySamplingIntervalDurationSet(inDuration)

Sets the default Sampling interval for the TCP Session history.

Parameters:

duration (int) – duration of a single sample in nanoseconds

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

This function is only allowed when the HTTP Session is not running yet. When the HTTP Session is running, the history must be configured on the TCP Session object.

Example

httpClient.TcpHistorySamplingIntervalDurationSet(500)
TcpPragueEnable(value)

Request TCP Prague / L4S support for this flow..

New in version 2.22.0.

Parameters:

enable (bool) – Whether or not to try to use L4S on this flow.

When TCP Prague or L4S is supported by the ByteBlower Port, this method will enable L4S / TCP Prague on this flow.

To determine whether or not the action succeeded, one should call TcpPragueIsEnabled() after an invocation of this method.

Example

http_client.TcpPragueEnable(True)
is_enabled = http_client.TcpPragueIsEnabled()
TcpPragueIsEnabled()

Returns whether or not TCP Prague is enabled.

New in version 2.22.0.

Return type:

bool

When TCP Prague or L4S is enabled on the HTTP Client for this flow, this method will return True. If TCP Prague was not configured, this method will return False.

Checking the Tcp.L4S capability will determine if TCP Prague or L4S is supported by the ByteBlower Server.

Example

return http_client.TcpPragueIsEnabled()
TypeOfServiceGet()

Retrieves the ‘Type Of Service’ or ‘Traffic Class’ configuration of the IP layer.

New in version 2.5.0.

Returns:

The byte value of the ‘Type Of Service’ or ‘Traffic Class’ field. (Default: 0)

Return type:

int

Both IP headers reserve space to for an the expected quality of service (QOS) field. In IPv4 this field is called the ‘Type Of Service’. IPv6 uses the term ‘Traffic Class’. Despite naming, they are both 8 bits wide. For ease of use, the getter is generic, it is used for both IPv4 and IPv6 layers.

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

Example

type = httpClient.TypeOfServiceGet()
TypeOfServiceSet(value)

Configures the ‘Type Of Service’ or ‘Traffic Class’ used at the IP layer.

New in version 2.5.0.

Parameters:

tos (int) – The Type Of Service field to use in the IPv4 header

Both IP headers reserve space to specify the expected quality of service (QOS). IPv4 calls this field the ‘Type Of Service’. In IPv6 one uses the term ‘Traffic Class’. Despite naming, they are both 8 bits wide. For ease of use, the method is generic, it is used for both IPv4 and IPv6 layers. The implementaion will configure the proper header.

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase,thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example

httpClient.TypeOfServiceSet(16)
WaitUntilConnected(timeout)

Waits until connection is established or timeout has expired.

Parameters:

timeout (int) – How long we should wait before giving up (and returning false).

Returns:

True when the HTTP session connects within the timeout. False when the HTTP session failed to connect before the timeout expired.

Return type:

bool

Raises:

ConfigError – when called from configuration or stopped state.

Valid states in which this method may be called: scheduled, connecting, running and finished.

Returns true immediately when called from running or finished states.

Returns false if timeout expired before running state was reached.

When called from error state or if error state is reached while waiting then the server-side exception that caused the error state will be rethrown here.

Example

while not httpClient.WaitUntilConnected(1000000000):
   print('Waiting until connected...')
WaitUntilFinished(timeout_ns)

Waits until request is finished or timeout has expired.

Parameters:

timeout (int) – How long we should wait before giving up (and returning false).

Returns:

True when the request finished before the timeout expired False when the request was not finished.

Raises:

ConfigError – if called from configuration or stopped state.

Valid states in which this method may be called:

  • scheduled

  • connecting

  • running

  • finished.

Returns true immediately when called from finished state.

Returns false if timeout expired before finished state was reached.

When called from error state or if error state is reached while waiting then the server-side exception that caused the error state will be rethrown here.

Example

while not httpClient.WaitUntilFinished(1000000000):
   print('Wait until finished...')
property thisown

The membership flag

class byteblowerll.byteblower.HTTPClientList(*args)

Bases: object

This is a List of multiple HTTPClient objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPClientMobile(*args, **kwargs)

Bases: AbstractObject

HTTP client application that may schedule HTTP requests to the HTTP server application.

New in version 2.5.0.

Using this class, you can simulate TCP (Transmission Control Protocol) traffic The TCP is simulated by a HTML request to the HTTPServer. This is the HttpClient that will perform the GET or the PUT. This request can be sent to the HTTPServer object

Example

Standard usage of the HTTPClient for WirelessEndpoints
http_client = wireless_endpoint.ProtocolHttpClientAdd()

# configure the HTTP server to talk with
http_client.RemoteAddressSet('10.4.8.2')
http_client.RemotePortSet(8080)

# we want a session of 10 seconds
nanoseconds_per_second = 1 * 1000 * 1000 * 1000
http_client.RequestDurationSet(10 * nanoseconds_per_second)

# we do not want to start immediately
http_client.RequestInitialTimeToWaitSet(1 * nanoseconds_per_second)

# we want the client to restart if the connection is broken
# e.g. when the access point restarts
http_client.RestartEnable(True)

# start the wireless endpoint 
wireless_endpoint.Prepare()
wireless_endpoint.Start()
ClientIdGet()

Returns the unique client ID.

Returns:

the HTTPClientMobile unique ID

Return type:

str

Each client has a unique ID so that information about the same connection can be requested on a HTTP server object. This method returns the unique ClientID for this HTTP client.

Example

print(http_client.ClientId())
HttpMethodGet()

Returns the used HTTPRequest method.

Returns:

The current selected HTTP request method (Default: HTTPRequestMethod.Get)

Return type:

HTTPRequestMethod

Example

print(http_client.HttpMethodGet() == HTTPRequestMethod.Get)
HttpMethodSet(*args)

Configures the HTTPRequest method to be used.

Parameters:

method (HTTPRequestMethod) – The method to be used.

Note

Only 2 HTTP methods are supported for now:

Example

http_client.HttpMethodSet(HTTPRequestMethod.Put)

Configures the HTTPRequest method to be used.

Parameters:

method (HTTPRequestMethod) – The method to be used.

Note

Only 2 HTTP methods are supported for now:

Example

http_client.HttpMethodSet(HTTPRequestMethod.Put)
LocalPortGet()

Returns the TCP the HTTPClientMobile will use to send its HTTPRequest.

Returns:

The TCP port the client uses.

Return type:

int

Example

print(http_client.LocalPortGet())
LocalPortSet(inPort)

Configure the TCP port for the client to use.

Parameters:

port (int) – TCP port on the client will use to communicate with the HTTP server. Valid range: 1-65535

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – When the value is not between 1 and 65535

This method will set the TCP port for the client.

Example

Set the local TCP port to 20000
http_client.LocalPortSet(20000)
RemoteAddressGet()

Return the configured destination address.

Returns:

destination address

Return type:

str

Example

print(http_client.RemoteAddressGet())
RemoteAddressSet(inAddress)

Configure the destination address.

Parameters:

address (str) – IP address of the HTTP server this client will use.

Method to configure the address of the HTTP server which this client will try to contact.

Note

Be aware that only addresses are used, no DNS is supported at this moment.

Example

http_client.RemoteAddressSet('192.168.0.4')
RemotePortGet()

Returns the configured destination port.

Returns:

the remote (destination) tcp port

Return type:

int

This method returns the current configured TCP port of the HTTP server which this client will try to contact.

Example

print(http_client.RemotePortGet())
RemotePortSet(inRemotePort)

Configure the TCP port which the client will use as destination port.

Parameters:

port (int) – TCP port of the HTTP server which the client will try to contact.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – when the value is not between 1 and 65535

This method is used to configure the TCP port of the server which the client will try to contact.

Example

Set the remote port to port 80.
http_client.RemotePortSet(80)
RequestDurationGet()

Method which will return the configured HTTP Request duration.

Returns:

The HTTP request duration.

Return type:

int

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

Example

Prints the configured request duration
print(http_client.RequestDurationGet())
RequestDurationSet(inDurationNs)

Method which will configure a page to send out an HTTP Request to transmit data during a certain time.

Parameters:

duration (int) – The duration of data traffic to send the HTTP Request for.

A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with data transferred over the network until the requested duration has passed.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet()

Note

The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.

Example

Request a data transfer for 3 seconds.
nanoseconds_per_second = 1000 * 1000 * 1000

http_client.RequestDurationSet(3 * nanoseconds_per_second)
RequestInitialTimeToWaitGet()

Returns the initial time to wait before a scheduled Request starts.

Returns:

The initial time in nanoseconds to wait before a scheduled request starts. (default 0)

Return type:

int

Example

print(http_client.RequestInitialTimeToWaitGet())
RequestInitialTimeToWaitSet(inDelay)

Sets the initial time to wait before really requesting a page (for a scheduled Request).

Parameters:

timetowait (int) – Time in nanoseconds to wait before the request will be really sent. (default: 0)

This can be used if you want to start different request on different timestamps.

Example

http_client.RequestInitialTimeToWaitSet(1000000000)
RequestRateLimitGet()

Method which will return the configured rate-limit of the HTTP traffic.

Returns:

rateLimit The rate limit, in bytes per second.

Return type:

int

Example

Get the configured rate limit in bytes per second
print(http_client.RequestRateLimitGet())
RequestRateLimitSet(inRateLimitBytesps)

Method which will limit the rate of the HTTP traffic to a certain amount..

Parameters:

ratelimit (int) – The rate limit, in bytes per second. 0 disables the rate limit.

Example

Set the ratelimit to 10 megabytes per second
bytes_per_megabyte = 1000 * 1000

http_client = wireless_endpoint.ProtocolHttpClientAdd()
http_client.RequestRateLimitSet(10 * bytes_per_megabyte)

Example

Disable rate limit

http_client.RequestRateLimitSet(0)
RequestSizeGet()

Method which will return the configured requested pagesize expressed in Bytes.

New in version 2.22.0.

Returns:

The configured requested pagesize in bytes

Return type:

int

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

Example

Getting the configured requestsize

print(httpClient.RequestSizeGet())
RequestSizeSet(inRequestSize)

Method which will configure a page to send out an HTTP Request to request a certain number of Bytes.

New in version 2.22.0.

Parameters:

size (int) – The number of Bytes to send the HTTP Request for. A value of zero means unlimited (Default: 0)

A HTTP Request page will be configured to request for a certain size of data on a ByteBlower HTTP server.

This will prepare a nice TCP traffic test with the number of requested Bytes transferred over the network.

Note

The HTTP Method that is used for the Request can be configured using HttpMethodSet() The HTTP Method defines the way the data traffic will flow.

Note

The generated HTTP Request URI format is specific for a ByteBlower HTTP Server.

Example

Setting the requestsize to 10000000 Bytes

httpClient.RequestSizeSet(10000000)
RestartEnable(arg2)

Let the HTTP Client try to restart the session when a connection fails.

New in version 2.10.0.

Parameters:

enable (bool) – True to enable, False to disable.

The HTTP Client will setup a new HTTP connection when the connection is lost for some reason. Possible reasons are loss of the network connection on the device, loss of the TCP connection due to a rebooting device somewhere in the network…

To distinguish the different sessions, the ClientServerId is used as a prefix. The connection attempt number is appended to the ID

Example

Enable the restart behaviour
http_client.RestartEnable(True)
RestartIsEnabled()

Method which will return whether or not the HTTP Client will restart the session when the connection fails.

New in version 2.10.0.

Returns:

True if enabled, false otherwise.

Return type:

bool

Example

print(http_client.RestartIsEnabled())
ServerClientIdGet()

This method returns the combination of the server Id (aka ByteBlower Server Id) and client Id.

Returns:

The combined server- and client Id

Return type:

str

This returns a combination of the ServerId and the Client Id. This combination will identify a HTTP connection. It is this combination of id’s you can use to request the HTTPSessionInfo on the HTTP server HTTPServer

Example

print(http_client.ServerClientIdGet())
ServerIdGet()

Returns the unique ByteBlower Server ID.

Returns:

The ByteBlower server unique ID.

Return type:

str

Each ByteBlower server has a unique ID. This identifier stays persistent over the lifetime of the ByteBlowerServers ( changed when rebooted ). This serverId together with the clientId identifies a HTTPConnection. By adding those 2 id’s together it is unlikely that 2 HTTPClientMobiles each running on a different server end up with the same connection ID.

Example

prints the Server ID
print(http_client.ServerIdGet())
TcpPragueEnable(value)

Request TCP Prague / L4S support for this flow..

New in version 2.22.0.

Parameters:

enable (bool) – True to enable

When TCP Prague or L4S is supported by the Endpoint device, this method will enable L4S / TCP Prague on this flow. In the other case, the method will silently fail and keep the default value of False.

To determine whether or not the action succeeded, one should call TcpPragueIsEnabled() after an invocation of this method.

Example

http_client.TcpPragueEnable(True)
is_enabled = http_client.TcpPragueIsEnabled()
TcpPragueIsEnabled()

Returns whether or not TCP Prague is enabled.

New in version 2.22.0.

Return type:

bool

When TCP Prague or L4S is enabled on the Endpoint for this flow, this method will return True. If TCP Prague was not configured or the Endpoint does not support TCP Prague or L4S, this method will return False.

Checking the Tcp.L4S capability will determine if TCP Prague or L4S is supported by the Endpoint device.

Example

return http_client.TcpPragueIsEnabled()
TypeOfServiceGet()

Retrieves the ‘Type Of Service’ or ‘Traffic Class’ configuration of the IP layer.

New in version 2.5.0.

Returns:

The byte value of the ‘Type Of Service’ or ‘Traffic Class’ field. (Default: 0)

Return type:

int

Both IP headers reserve space to for an the expected quality of service(QOS) field. In IPv4 this field is called the ‘Type Of Service’. IPv6 uses the term ‘Traffic Class’. Despite naming, they are both 8 bits wide. For ease of use, the getter is generic, it is used for both IPv4 and IPv6 layers.

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

Example

print(http_client.TypeOfServiceGet())
TypeOfServiceSet(value)

Configures the ‘Type Of Service’ or ‘Traffic Class’ used at the IP layer.

New in version 2.5.0.

Parameters:

tos (int) – The literal value to be set (0-255)

This method sets the Type of Service for an IPv4 connection or the Traffic Class for an IPv6 connection. Despite naming, they are both 8 bits wide. For ease of use, the method is generic, it is used for both IPv4 and IPv6 layers. The implementation will configure the proper header.

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase, thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example

http_client.TypeOfServiceSet(8)
property thisown

The membership flag

class byteblowerll.byteblower.HTTPClientMobileList(*args)

Bases: object

This is a List of multiple HTTPClientMobile objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiClient(*args, **kwargs)

Bases: AbstractObject

HTTPMultiClient can be used in combination with MultiServer to start multiple concurrent HTTP requests.

New in version 2.10.0.

When starting the flow, the configured number of HTTP requests will be started. Each time a request is finished (succesfully or unsuccesfully) it will be replaced by a new request. This is repeated until one of the configured stop conditions is reached. Possible stop conditions are: total duration, total size or number of connections created. If no stop conditions are configured then the flow continues indefinitely.

Main parameters:

MaximumConcurrentRequests

Number of HTTP requests to run concurrently

Duration

Total duration of the flow

Size

Total number of bytes that may transmitted

SessionDuration

Duration of individual requests

SessionSize

Number of bytes transmitted by individual requests

CumulativeConnectionLimit

Maximum number of connections that may be created during the whole flow

CumulativeConnectionLimitGet()

Returns the limit on the total number of connections that may be created.

Return type:

int

A value of zero indicates no limit (infinite number of connections may be created).

Example

print(httpMultiClient.CumulativeConnectionLimitGet())
CumulativeConnectionLimitSet(value)

Sets a limit on the total number of connections that may be created.

Parameters:

limit (int) – The maximum of connections to be set. A value of zero indicates no limit. (Default: 0)

Once the total number of connection attempts has reached the configured limit no new connections will be created. If there are no active connections at that time then flow immediately enters Finished state. Otherwise the flow remains in Running state until all remaining requests have finished.

Example

Allow 100 connection attempts in total

httpMultiClient.CumulativeConnectionLimitSet(100)
DurationGet()

Returns the flow duration.

Returns:

The configured request duration in nanoseconds. A value of zero indicates unlimited duration (Default: 0)

Return type:

int

Example

print(httpMultiClient.DurationGet())
DurationSet(value)

Sets the maximum total duration of the flow.

Parameters:

requestDuration (int) – The total duration of the flow. A value of zero indicates unlimited duration. (Default: 0)

Example

Configure the flow to run for 15 minutes
httpMultiClient.DurationSet(15*60*1000000000)
FinishedGet()

Returns true if the flow has finished or was stopped explicitly.

Return type:

bool

Example

Check if the multi-session is finished

print(httpMultiClient.FinishedGet())
FlowLabelGet()

Returns the “Flow Label” for IPv6 flows.

Return type:

int

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example

httpMultiClient = port.RemotePortGet()
print(httpMultiClient.FlowLabelGet())
FlowLabelSet(value)

Sets the flow label for IPv6 flows.

Parameters:

label (int) – The IPv6 Flow label.

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example

httpMultiClient.FlowLabelSet(1234)
HttpMethodGet()

Returns the HTTP request method.

Return type:

HTTPRequestMethod

Example

print(httpMultiClient.HttpMethodGet() == HTTPRequestMethod.Get)
HttpMethodSet(*args)

Sets the HTTP request method.

Parameters:

method (HTTPRequestMethod) – HTTP Method to use. HTTP GET will send traffic from HTTP server to HTTP client, PUT will upload traffic from HTTP Client to HTTP server. (Default: GET)

Example

print(httpMultiClient.HttpMethodSet(HTTPRequestMethod.Get))

Sets the HTTP request method.

Parameters:

method (HTTPRequestMethod) – HTTP Method to use. HTTP GET will send traffic from HTTP server to HTTP client, PUT will upload traffic from HTTP Client to HTTP server. (Default: GET)

Example

print(httpMultiClient.HttpMethodSet(HTTPRequestMethod.Get))
InitialTimeToWaitGet()

Returns the initial time to wait value.

Returns:

The initial time to wait in nanoseconds

Return type:

int

Example

print(httpMultiClient.InitialTimeToWaitGet())
InitialTimeToWaitSet(ns)

Sets the initial time to wait before really starting the flow.

This can be used if you want to different flows to start at different times.

Parameters:

timetowait (int) – Time to wait before the flow will start. (Default: 0)

Example

Initial Time to wait of 60 seconds

httpMultiClient.InitialTimeToWaitSet(60000000000)
LocalPortRangeGet()

Returns the port range.

Return type:

IntegerList

Example

print(httpMultiClient.LocalPortRangeGet())
LocalPortRangeSet(_from, to)

Sets the local port range for the TCP connections.

Parameters:
  • min (int) – The minimum value of the port range.

  • max (int) – The maximum value of the port range.

Example

httpMultiClient.LocalPortRangeSet(20000,30000)
MaximumConcurrentConnectionAttemptsGet()

Returns the maximum number of concurrent connection attempts.

Return type:

int

MaximumConcurrentConnectionAttemptsSet(value)

Sets the maximum number of concurrent connection attempts.

Parameters:

val (int) – The maximum number of concurrent attempts to set. (Default: 1)

This method limits maximum number of requests that can be in the TCP SYN-SENT state.

Example

Allow 100 concurrent connection attempts:

httpMultiClient.MaximumConcurrentConnectionAttemptsSet(100)
MaximumConcurrentRequestsGet()

Returns the maximum number of concurrent requests.

Return type:

int

Example

print(httpMultiClient.MaximumConcurrentRequestsGet())
MaximumConcurrentRequestsSet(value)

Sets the maximum number of concurrent requests.

Parameters:

numberOfRequests (int) – Maximum number of concurrent requests. (Default: 1)

The flow will start the requested number of HTTP requests and then maintain this number by starting a new request every time a request has finished or failed.

Example

Allow 100 concurrent HTTP requests
httpMultiClient.MaximumConcurrentRequestsSet(100)
MaximumSegmentSizeGet()

Returns the TCP maximum segment size.

Return type:

int

Default value: 65535.

Example

print(httpMultiClient.MaximumSegmentSizeGet())
MaximumSegmentSizeSet(value)

Sets the TCP maximum segment size.

Parameters:

mss (int) – The TCP MSS to use Should be between 1 and 65535.

This option specifies an upper bound on the TCP segment size.

Example

httpMultiClient.MaximumSegmentSizeSet(65535)
ReceiveWindowInitialSizeGet()

Returns the TCP receive window.

Return type:

int

Example

print(httpMultiClient.MaximumConcurrentConnectionAttemptsGet())
ReceiveWindowInitialSizeSet(value)

Sets the TCP receive window.

Parameters:

windowsize – New value of the TCP receive window. Must be between 1 and 65535 bytes. (Default: 65535)

Return type:

int

Example

httpMultiClient.ReceiveWindowInitialSizeSet(65535)
ReceiveWindowScalingEnable(inEnable)

Enables of disables the TCP window scale option.

Parameters:

enable (bool) – True to enable Window Scaling.

Window scaling window sizes that are larger than 65535 bytes.

Example

To enable window scaling

httpMultiClient.ReceiveWindowScalingEnable(True)
ReceiveWindowScalingIsEnabled()

Returns if TCP window scaling is enabled or not.

Returns:

True: window scale enabled , False: window scale disabled

Return type:

bool

Window scaling enables window sizes that are larger than 65535 bytes.

Example

print(httpMultiClient.ReceiveWindowScalingIsEnabled())
ReceiveWindowScalingValueGet()

Returns the TCP window scale value.

Returns:

current receive window scale

Return type:

int

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Example

print(httpMultiClient.ReceiveWindowScalingValueGet())
ReceiveWindowScalingValueSet(value)

Sets the TCP window scale value.

Parameters:

scale (int) – (0-8), which is used for bitwise shifting.

Raises:

ConfigError – when the value is not an integer

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF rfc:1323.

Example

httpMultiClient.ReceiveWindowScalingValueSet(3)
RemoteAddressGet()

Returns the remote address.

Rtype:

str

Example

print(httpMultiClient.RemoteAddressGet())
RemoteAddressSet(value)

Sets the remote address for the HTTP requests.

Parameters:

address (str) – The destination address for the HTTP requests.

This should be the address of the HTTPMultiServer.

Example

httpMultiClient.RemoteAddressSet('1.1.1.1')
RemotePortGet()

Returns the remote port.

Return type:

int

Example

print(httpMultiClient.RemotePortGet())
RemotePortSet(value)

Sets the remote port for the HTTP requests.

Parameters:

portNumber (int) – The destination port for the HTTP requests.

This should be the port that the HTTPMultiServer is listening to.

Example

httpMultiClient.RemotePortSet(80)
ResultGet()

Returns the current result counters.

Return type:

HTTPMultiResultSnapshot

Example

print(httpMultiClient.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the result history.

Return type:

HTTPMultiResultHistory

This method returns a HTTPMultiResultHistory Object. This will contain the Cumulative and the Interval counters over time.

Example

print(httpMultiClient.ResultHistoryGet().DescriptionGet())
SamplingBufferLengthGet()

Returns the snapshot buffer length.

Returns:

The length of the server sample buffer on the server-side

Return type:

int

Example

print(httpMultiClient.SamplingBufferLengthGet())
SamplingBufferLengthSet(value)

Configure the snapshot buffer size.

Parameters:

length (int) – The number of samples that should be kept on the server-side buffer

ByteBlower server stores the snapshots in a circular buffer before they are transferred to the client. If the buffer overflows then the oldest snapshot is overwritten. This method configures the maximum size of the buffer.

Example

httpMultiClient.SamplingBufferLengthSet(6)
SamplingIntervalDurationGet()

Returns the duration for the result snapshots.

Returns:

expressed as nanoseconds

Return type:

int

Example

print(httpMultiClient.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(value)

Sets the duration of the result snapshots.

Parameters:

duration (int) – Duration in nanoseconds of a single sample

Example

httpMultiClient.SamplingIntervalDurationSet(1500000)
SessionDurationGet()

Returns the session duration expressed in nanoseconds.

Returns:

The duration of the session. A value of zero indicates an unlimited duration.

Return type:

int

Example

print(httpMultiClient.SessionDurationGet())
SessionDurationSet(value)

Sets the duration for the individual HTTP requests.

Parameters:

duration (int) – The duration of an individual HTTP Request in nanoseconds. (Default: 0)

Each request will run for the configured duration. This duration will automatically be reduced near the end of the flow so that the global time limit (see DurationSet()) is not exceeded.

A value of zero indicates unlimited duration.

Parameters:

requestDuration – The duration of each HTTP request.

Example

Configure each request to run for 10 seconds

print(httpMultiClient.SessionDurationSet(10000000000))
SessionRateLimitGet()

Returns the rate limit for the individual HTTP requests.

Return type:

int

Example

print(httpMultiClient.SessionRateLimitGet())
SessionRateLimitSet(bytes_per_second)

Sets a rate limit for the individual HTTP requests.

Parameters:

limit (int) – The rate limit in bytes per second. (Default: 0)

A value of zero indicates no rate limit.

Example

httpMultiClient.SessionRateLimitSet(1500)
SessionSizeGet()

Returns the session size.

Return type:

int

A value of zero indicates unlimited size.

Example

print(httpMultiClient.SessionSizeGet())
SessionSizeSet(value)

Sets the size for the individual HTTP requests.

Parameters:

size (int) – The size in bytes for a single HTTP Request. A value of zero means unlimited (Default: 0)

Each new started request will send or receive the configured size in bytes.

Example

Configure each request to send 15000 bytes:

httpMultiClient.SessionSizeSet(1500)
SizeGet()

Returns the size limit.

Return type:

int

A value of zero indicates unlimited size.

Example

print(httpMultiClient.SizeGet())
SizeSet(value)

Puts a size limit on the total number of bytes that can be sent.

Parameters:

requestsize – The maximum cumulative payload size of all flows. A value of zero indicates unlimited size. (Default: 0)

Type:

int

Example

Allow a global payload of 1 GB

httpMultiClient.SizeSet(1000000000)
SlowStartThresholdGet()

Returns the initial slow-start threshold value used by TCP.

Returns:

Slow-start threshold

Return type:

int

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

print(httpMultiClient.SlowStartThresholdGet())
SlowStartThresholdSet(value)

Set the initial slow-start threshold value used by TCP.

Parameters:

ssthresh – New value for the slow-start threshold

Raises:

ConfigError – when the value is not a positive integer

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

To set slow-start threshold to 1000000

httpMultiClient.SlowStartThresholdSet(1000000)
Start()

Starts the flow.

Raises:

ConfigError – This exception is thrown in case of an incomplete configuration. For example if the remote IP or remote port is not set.

Example

httpMultiClient.Start()
StatusGet()

Returns the status of the flow.

Return type:

HTTPMultiClientStatus

Example

httpMultiClient.StatusGet()
Stop()

Stops the flow.

Explicitly stops a flow. Normally the flow finishes automatically when the configured duration or size has been reached. This method stops the flow immediately.

Example

httpMultiClient.Stop()
TcpCongestionAvoidanceAlgorithmGet()

Returns the preferred TCP Congestion Avoidance Algorithm.

Returns:

current Congestion Avoidance Algorithm.

Return type:

TCPCongestionAvoidanceAlgorithm

Possible values are: - none - sack - newreno - sack-with-cubic - newreno-with-cubic

Example

print(httpMultiClient.TcpCongestionAvoidanceAlgorithmGet()==TCPCongestionAvoidanceAlgorithm.NewReno)
TcpCongestionAvoidanceAlgorithmSet(value)

Configure the preferred TCP Congestion Avoidance Algorithm.

Parameters:

congestionAvoidanceAlgorithm (TCPCongestionAvoidanceAlgorithm) – Congestion Avoidance Algorithm to configure.

Example

Configure NewReno as congestionAvoidance Algorithm
httpMultiClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.NewReno)
Configure Sack as congestionAvoidance Algorithm
httpMultiClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.Sack)
Configure None as congestionAvoidance Algorithm
httpMultiClient.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.No_Algorithm)
TcpPragueEnable(value)

Whether or not TCP Prague must be enabled.

Parameters:

enable (bool) – True to enable TCP Prague, False to disable

TCP Prague is an implementation which is heavily used in L4S

TcpPragueIsEnabled()

Returns whether or not TCP Prague support is enabled

Return type:

bool

TypeOfServiceGet()

Returns the ‘Type Of Service’ or ‘Traffic Class’ value.

Return type:

int

TypeOfServiceSet(value)

Sets the ‘Type Of Service’ or ‘Traffic Class’ used at the IP layer.

Parameters:

tos (int) – Value for the Type Of Service IP field

Both IP headers reserve space to specify the expected quality of service(QOS). IPv4 calls this field the ‘Type Of Service’. In IPv6 one uses the term ‘Traffic Class’. Despite naming, they are both 8 bits wide. For ease of use, the method is generic, it is used for both IPv4 and IPv6 layers. The implementation will configure the proper header.

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase,thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example

httpMultiClient.TypeOfServiceSet(16)
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiClientList(*args)

Bases: object

This is a List of multiple HTTPMultiClient objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiClientStatus

Bases: object

Configuration = 0

initial state in which the configuration takes place

Finished = 3

flow finished succesfully

Running = 2

when the flow is running

Scheduled = 1

during the initial time to wait

Stopped = 4

flow was stopped by user

class byteblowerll.byteblower.HTTPMultiDataList(*args)

Bases: object

This is a List of multiple HTTPMultiResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiResultData(*args, **kwargs)

Bases: AbstractObject

Contains the result counters for HTTPMultiClient or HTTPMultiServer.

http_multi_data = http_client.ResultHistoryGet().CumulativeGetByIndex(0)
print(http_multi_data.TxTimestampLastGet(10000000000))
ConnectionsAbortedGet()

Returns the number of aborted TCP connection attempts.

Return type:

int

Example

print(http_multi_data.ConnectionsAbortedGet())
ConnectionsAttemptedGet()

Returns the number of TCP connection attempts that were initiated.

Return type:

int

For the HTTPMultiClient this means the number of active TCP connection attempts initiated. For the HTTPMultiServer this means the number of passive TCP connection requests received.

Example

 print(http_multi_data.ConnectionsAttemptedGet())
ConnectionsEstablishedGet()

Returns the number of succesful TCP connection attempts that reached ESTABLISHED state.

Return type:

int

Example

print(http_multi_data.ConnectionsEstablishedGet())
ConnectionsRefusedGet()

Returns the number of TCP connection attempts that were refused by the other side.

Return type:

int

For the HTTPMultiServer this value is always zero.

Example

print(http_multi_data.ConnectionsRefusedGet())
DebugCountersGetByName(name)

Returns a list of debug counter values.

Parameters:

name (str) – The name of the debug counter (obtained from DebugCountersNamesGet()).

Return type:

int

Note

The list of debug values is not backwards compatible.

Example

print(http_multi_data.DebugCountersGetByName('State_Closing'))
DebugCountersNamesGet()

Returns a list of debug counter names.

Return type:

StringList

Note

The list of names is not backwards compatible.

FinishedGet()

Indicates whether the flow has finished.

Returns:

True indicates if the flow has finished.

Return type:

bool

For the HTTPMultiClient this means that client state is Finished or Stopped. For the HTTPMultiServer this means the server state is Stopped.

IntervalDurationGet()

Returns the snapshot duration interval in nanoseconds.

Returns:

interval duration in nanoseconds

Return type:

int

Example

   print(http_multi_data.IntervalDurationGet())
RetransmissionsGet()

Returns number of TCP retransmissions.

Return type:

int

RoundTripTimeAverageGet(default_value)

Returns average TCP round-trip time or a default value in case no round-trip samples are available.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

The TCP RTT expressed in nanoseconds

Return type:

int

Example

print(http_multi_data.RoundTripTimeAverageGet(10000))
RoundTripTimeMaximumGet(default_value)

Returns maximum TCP round-trip time or a default value in case no round-trip samples are available.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

The TCP RTT in nanoseconds or the given default value.

Return type:

int

Example

print(http_multi_data.RoundTripTimeMaximumGet)
RoundTripTimeMinimumGet(default_value)

Returns minimum TCP round-trip time or a default value in case no round-trip samples are available.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

The TCP RTT expressed in nanoseconds

Return type:

int

Example

print(http_multi_data.RoundTripTimeMinimumGet(10000))
RxByteCountGet()

Returns number of received bytes.

Return type:

int

RxSpeedGet()

Returns average Rx speed .

Return type:

DataRate

RxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first receieved packet or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

print(http_multi_data.RxTimestampFirstGet(10000))
RxTimestampLastGet(default_value)

Returns the timestamp of the last receieved packet or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(http_multi_data.RxTimestampLastGet(10000))
SessionsAbortedGet()

Returns the number HTTP requests that failed because they were aborted locally.

Return type:

int

Example

print(http_multi_data.SessionsAbortedGet())
SessionsFinishedGet()

Returns the number HTTP requests that finished succesfully.

Return type:

int

Example

print(http_multi_data.SessionsFinishedGet())
SessionsResetByPeerGet()

Returns the number HTTP requests that failed because a TCP RESET message was received.

Return type:

int

Example

print(http_multi_data.SessionsResetByPeerGet())
TcpRxByteCountGet()

Returns number of bytes received by the TCP protocol.

Return type:

int

This includes the TCP header.

TcpRxSegmentCountGet()

Returns number of packets received by the TCP protocol.

Return type:

int

TcpRxSpeedGet()

Returns average Rx speed on OSI layer 4.

Return type:

DataRate

TcpRxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first receieved TCP segment or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(http_multi_data.TcpRxTimestampFirstGet(100000))
TcpRxTimestampLastGet(default_value)

Returns the timestamp of the last receieved TCP segment or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds

Return type:

int

Example

Prints -1 if the counter is not available

print(http_multi_data.TcpRxTimestampLastGet(10000))
TcpTxByteCountGet()

Returns number of bytes sent by the TCP protocol. This includes the TCP header and TCP retransmissions.

Return type:

int

TcpTxSegmentCountGet()

Returns number of packets sent by the TCP protocol.

Return type:

int

TcpTxSpeedGet()

Returns average Tx speed on OSI layer 4.

Return type:

DataRate

TcpTxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first transmitted TCP segment or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds

Return type:

int

Example

Prints -1 if the counter is not available

print(http_multi_data.TcpTxTimestampFirstGet(10000))
TcpTxTimestampLastGet(default_value)

Returns the timestamp (in nanoseconds) of the last transmitted TCP segment or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available.

print(http_multi_data.TcpTxTimestampLastGet(10000))
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

Timestamp of snapshot in nanoseconds since epoch

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(http_multi_data.TimestampGet())
TxByteCountGet()

Returns number of sent bytes.

Return type:

int

TxSpeedGet()

Returns average Tx speed .

Return type:

DataRate

TxTimestampFirstGet(default_value)

Returns the timestamp of the first transmitted packet or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(http_multi_data.TxTimestampFirstGet(10000))
TxTimestampLastGet(default_value)

Returns the timestamp of the last transmitted packet or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

:rtype:int

Example

Prints -1 if the counter is not available

print(http_multi_data.TxTimestampLastGet(10000000000))
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

General interface for getting cumulative or interval results.

Clear()

Clears the history.

Example

http_result_history.Clear()
CumulativeGet()

Returns a list of available cumulative results.

Returns:

list of HTTPMultiResultData containing the Cumulative counters

Return type:

HTTPMultiDataList

Example

This example gets the available cumulative results

print(http_result_history.CumulativeGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – number of the snapshot to get

Returns:

cumulative counter object at the specified index

Return type:

HTTPMultiResultData

Example

This example gets the available cumulative counters at index 1

print(http_result_history.CumulativeGetByIndex(0))
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp nanoseconds.

Parameters:

timestamp (int) – timestamp in nanoseconds since epoch

Return type:

HTTPMultiResultData

Example

This example gets the available cumulative counters

print(http_result_history.CumulativeGetByTime(timestamp))
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

Return type:

HTTPMultiResultData

Example

This example gets the available cumulative counters

print(http_result_history.CumulativeLatestGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(http_result_history.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Returns:

a list of HTTPMultiResultData containing the Interval counters

Return type:

HTTPMultiDataList

Example

This example gets the available interval results

print(http_result_history.IntervalGet()[0].DescriptionGet())
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – The interval counter to fetch

Returns:

interval counter object at the specified index

Return type:

HTTPMultiResultData

Example

This example gets the available interval counters at index 1

print(http_result_history.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

Parameters:

timestamp (int) – timestamp in nanoseconds since epoch

Return type:

HTTPMultiResultData

Example

This example gets the available interval counters

print(http_result_history.IntervalGetByTime(timestamp).DescriptionGet())
IntervalLatestGet()

Returns the latest closed item of the interval list.

Return type:

HTTPMultiResultData

Example

This example gets the available interval counters

print(http_result_history.IntervalLatestGet().DescriptionGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

print(http_result_history.IntervalLengthGet())
RefreshTimestampGet()

RefreshTimestampGet.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

print(http_result_history.RefreshTimestampGet())
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Refreshable snapshot that contains the result counters for HTTPMultiClient or HTTPMultiServer.

You can refresh the counters by calling the Refresh method on this object.

ConnectionsAbortedGet()

Returns the number of aborted TCP connection attempts.

Return type:

int

Example

print(multiSnapshot.RetransmissionsGet())
ConnectionsAttemptedGet()

Returns the number of TCP connection attempts that were initiated.

Return type:

int

For the HTTPMultiClient this means the number of active TCP connection attempts initiated. For the HTTPMultiServer this means the number of passive TCP connection requests received.

Example

print(multiSnapshot.ConnectionsAttemptedGet())
ConnectionsEstablishedGet()

Returns the number of succesful TCP connection attempts that reached ESTABLISHED state.

Return type:

int

Example

print(multiSnapshot.ConnectionsEstablishedGet())
ConnectionsRefusedGet()

Returns the number of TCP connection attempts that were refused by the other side.

Return type:

int

For the HTTPMultiServer this value is always zero.

Example

 print(multiSnapshot.ConnectionsRefusedGet())
DebugCountersGetByName(name)

Returns a debug counter by name.

Parameters:

name (str) – name of the counter to fetch

Return type:

int

Parameters:

name – The name of the debug counter (obtained from DebugCountersNamesGet()).

DebugCountersNamesGet()

Returns a list of debug counter names.

Return type:

StringList

Note

The list of names is not backwards compatible.

FinishedGet()

Indicates whether the flow has finished.

Returns:

True if the flow has finished.

Return type:

bool

For the HTTPMultiClient this means that client state is Finished or Stopped. For the HTTPMultiServer this means the server state is Stopped.

Example

print(multiSnapshot.FinishedGet())
IntervalDurationGet()

Returns the duration (in nanoseconds) between snapshot objects.

Return type:

int

Example

print(multiSnapshot.IntervalDurationGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(multiSnapshot.RefreshTimestampGet())
RetransmissionsGet()

Returns number of TCP retransmissions.

Return type:

int

RoundTripTimeAverageGet(default_value)

Returns average TCP round-trip time or a default value in case no round-trip samples are available.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

The TCP RTT expressed in nanoseconds

Return type:

int

Example

print(multiSnapshot.RoundTripTimeAverageGet(10000))
RoundTripTimeMaximumGet(default_value)

Returns maximum TCP round-trip time or a default value in case no round-trip samples are available.

Return type:

int

Example

print(multiSnapshot.RoundTripTimeMaximumGet(1000))
RoundTripTimeMinimumGet(default_value)

Returns minimum TCP round-trip time or a default value in case no round-trip samples are available.

Return type:

int

Example

print(multiSnapshot.RoundTripTimeMinimumGet())
RxByteCountGet()

Returns number of received bytes.

Return type:

int

RxSpeedGet()

Returns average Rx speed.

Return type:

DataRate

RxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first receieved packet or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(multiSnapshot.RxTimestampFirstGet())
RxTimestampLastGet(default_value)

Returns the timestamp (in nanoseconds) of the last receieved packet or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

print(multiSnapshot.RxTimestampLastGet(1000))
SessionsAbortedGet()

Returns the number HTTP requests that failed because they were aborted locally.

Return type:

int

Example

print(multiSnapshot.SessionsAbortedGet())
SessionsFinishedGet()

Returns the number HTTP requests that finished succesfully.

Return type:

int

Example

print(multiSnapshot.SessionsFinishedGet())
SessionsResetByPeerGet()

Returns the number HTTP requests that failed because a TCP RESET message was received.

Return type:

int

Example

print(multiSnapshot.SessionsResetByPeerGet())
TcpRxByteCountGet()

Returns number of bytes received by the TCP protocol. This includes the TCP header.

Return type:

int

TcpRxSegmentCountGet()

Returns number of packets received by the TCP protocol.

Return type:

int

TcpRxSpeedGet()

Returns average Rx speed on OSI layer 4

Return type:

DataRate

TcpRxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first receieved TCP segment or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(multiSnapshot.TcpRxTimestampFirstGet(1000))
TcpRxTimestampLastGet(default_value)

Returns the timestamp (in nanoseconds) of the last receieved TCP segment or a default value in case no packets were received.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds

Return type:

int

Example

Prints -1 if the counter is not available

print(multiSnapshot.TcpRxTimestampLastGet(10000))
TcpTxByteCountGet()

Returns number of bytes sent by the TCP protocol. This includes the TCP header and TCP retransmissions.

Return type:

int

TcpTxSegmentCountGet()

Returns number of packets sent by the TCP protocol.

Return type:

int

TcpTxSpeedGet()

Returns average Tx speed on OSI Layer 4.

Return type:

DataRate

TcpTxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first transmitted TCP segment or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

Prints -1 if the counter is not available

print(multiSnapshot.TcpTxTimestampFirstGet(1000))
TcpTxTimestampLastGet(default_value)

Returns the timestamp (in nanoseconds) of the last transmitted TCP segment or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds

Return type:

int

Example

Prints -1 if the counter is not available

print(multiSnapshot.TcpTxTimestampLastGet(10000))
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

Timestamp of snapshot in nanoseconds

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(multiSnapshot.TimestampGet())
TxByteCountGet()

Returns number of sent bytes.

Return type:

int

TxSpeedGet()

Returns average Tx speed.

Return type:

DataRate

TxTimestampFirstGet(default_value)

Returns the timestamp (in nanoseconds) of the first transmitted packet or a default value in case no packets were transmitted.

Parameters:
  • default (int) – A default value to return in case no samples are available

  • default – A default value to return in case no packets were transmitted

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

print(multiSnapshot.TxTimestampFirstGet(1000))
TxTimestampLastGet(default_value)

Returns the timestamp (in nanoseconds) of the last transmitted packet or a default value in case no packets were transmitted.

Parameters:

default (int) – A default value to return in case no samples are available

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example Prints -1 if the counter is not available

print(multiSnapshot.TxTimestampLastGet(1000))
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiServer(*args, **kwargs)

Bases: AbstractObject

HTTPMultiServer provides the server-side for HTTPMultiClient.

See HTTPMultiClient for more information.

New in version 2.10.0.

MaximumSegmentSizeGet()

Returns the TCP maximum segment size.

Returns:

The TCP Maximum Segment Size (MSS, Default: 65535)

Return type:

int

Example

print(http_server.MaximumSegmentSizeGet())
MaximumSegmentSizeSet(value)

Sets the TCP maximum segment size.

Parameters:

size (int) – Maximum segment size. Should be between 1 and 65535.

Raises:

ConfigError – when the configured value is out of range

This option specifies an upper bound on the TCP segment size.

Example

result_history = http_server.MaximumSegmentSizeSet(65535)
PortGet()

Returns the TCP port for the HTTP server.

Returns:

The configured TCP Port

Return type:

int

Example

print(http_server.PortGet())
PortSet(inPort)

Sets the TCP port on which the HTTP server will listen.

Parameters:

port (int) – The TCP port on which the HTTP server will listen for incoming requests.

Raises:
  • ValueError – When the value is not an Integer

  • ConfigError – When the value is not between 1 and 65535

Example

http_server.PortSet(80)
ReceiveWindowInitialSizeGet()

Gets the initial receive window for the server.

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Example

print(http_server.ReceiveWindowInitialSizeGet())
ReceiveWindowInitialSizeSet(value)

Sets the initial receive window for the server.

Parameters:

windowsize (int) – New value of the initial receive window.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – When the value is out of range

Small windowsizes can decrease the performance of a TCP session. Please use good size for your configuration and network setup.

Example

http_server.SlowStartThresholdSet(65535)
ReceiveWindowScalingEnable(value)

Enables of disables windowscaling.

Parameters:

scaling (bool) – bool which will enable (True) or disable (False) windowscaling.

Raises:

TypeError – when the value is not true or false

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Example

To enable window scaling or To disable window scaling or

http_server.ReceiveWindowScalingEnable(True)
ReceiveWindowScalingIsEnabled()

Returns if window scaling is enabled or not.

Returns:

True when scaling is enabled, false when scaling is disabled

Return type:

bool

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Example

When enabled:

print(http_server.ReceiveWindowScalingIsEnabled())
ReceiveWindowScalingValueGet()

Returns the current receive window scale.

Returns:

current receive window scale

Return type:

int

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323. Example

print(http_server.ReceiveWindowScalingValueGet())
ReceiveWindowScalingValueSet(value)

Sets the window scale which will be used for new clients.

Parameters:

scale (int) – 0-8, which is used for bitwise shifting.

Raises:
  • TypeError – When the value is not an integer

  • ConfigError – When the value is out of range

This must be done before requesting a page from a client, because this option is negotiated at the beginning of the TCP session.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Example

http_server.ReceiveWindowScalingValueSet(6)
ResultGet()

Returns the current result counters.

Return type:

HTTPMultiResultSnapshot

Example

print(http_server_result = http_server.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the result history.

Return type:

HTTPMultiResultHistory

This method returns a history object. This contains the Cumulative and the Interval counters over time.

Example

result_history = http_server.ResultHistoryGet()
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

Returns:

The length of the server sample buffer

Return type:

int

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold.

SamplingBufferLengthSet(value)

Sets the number of samples to keep in the buffer.

Parameters:

length (int) – The length of the server-side sample buffer

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold.

Example

http_server.SamplingBufferLengthSet(6)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Return type:

int

Example

print(http_server.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(value)

Sets the duration of one sampling interval.

Parameters:

interval (int) – duration of a single sample in nanoseconds

Example

print(http_server.SamplingIntervalDurationGet())
SlowStartThresholdGet()

Returns the initial slow-start threshold value used by TCP.

Returns:

Slow-start threshold

Return type:

int

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

print(http_server.SlowStartThresholdGet())
SlowStartThresholdSet(value)

Set the initial slow-start threshold value used by TCP.

Parameters:

ssthresh (int) – New value for the slow-start threshold

Raises:

ConfigError – When the value is not a positive integer

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See rfc:5681 “TCP Congestion Control” for more information on this topic.

Example

To set slow-start threshold to 1000000

http_server.SlowStartThresholdSet(1000000)
Start()

Starts the HTTP server on the configured port with the configured configuration.

Example

http_server.Start()
StatusGet()

Returns the HTTP server status.

Return type:

HTTPMultiServerStatus

Example

Before starting the HTTP server: HTTPMultiServerStatus.Stopped After starting the HTTP server: HTTPMultiServerStatus.Started

print(http_server.StatusGet() == HTTPMultiServerStatus_Started)
Stop()

Stops the HTTP server.

Running sessions will be aborted and incoming connection requests will be refused.

Example

http_server.Stop()
TcpCongestionAvoidanceAlgorithmGet()

Gets the current TCP Congestion Avoidance Algorithm for new clients.

Returns:

current Congestion Avoidance Algorithm.

Return type:

TCPCongestionAvoidanceAlgorithm

Example

print(http_server.TcpCongestionAvoidanceAlgorithmGet() == TCPCongestionAvoidanceAlgorithm.NewReno)
TcpCongestionAvoidanceAlgorithmSet(value)

Selects the TCP Congestion Avoidance Algorithm.

Parameters:

algorithm (TCPCongestionAvoidanceAlgorithm) – Congestion Avoidance Algorithm to configure.

Selects the TCP Congestion Avoidance Algorithm which will be used for new clients. This must be selected before requesting a page from a client, because for some algorithms, the congestion avoidance support is negotiated a the beginning of the TCP session.

Example

Configure NewReno as congestionAvoidance Algorithm
http_client.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.NewReno)
Configure Sack as congestionAvoidance Algorithm
http_client.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.Sack)
Configure None as congestionAvoidance Algorithm
http_client.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.No_Algorithm)
TcpPragueEnable(value)

Whether or not TCP Prague must be enabled.

Parameters:

enable (bool) – True to enable TCP Prague, False to disable

TCP Prague is an implementation which is heavily used in L4S

TcpPragueIsEnabled()

Returns whether or not TCP Prague support is enabled

Return type:

bool

property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiServerList(*args)

Bases: object

This is a List of multiple HTTPMultiServer objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPMultiServerStatus

Bases: object

Started = 1

The HTTP server is active

Stopped = 0

The HTTP server is not running

class byteblowerll.byteblower.HTTPRequestMethod

Bases: object

The HTTP Request Method of a HTTP Session

The HTTP Request Method determines what the ByteBlower HTTP Client will perform.

HTTP supports multiple HTTP Methods:

  • Get

  • Post

  • Put

  • Delete

  • Head

  • Options

  • Trace

But the ByteBlower HTTP Server implementations for traffic simulation currently only support Get and Put

Get

Download a resource from the Server

Put

Upload a resource to the server

class byteblowerll.byteblower.HTTPRequestStatus

Bases: object

Configuration = 0

initial state in which the configuration takes place

Connecting = 2

while trying to establish a connection

Error = 6

if an error occurred while trying to connect or while running

Finished = 4

after the http request has completed

Running = 3

while the connection is established and before http request has completed

Scheduled = 1

during the initial time to wait of a scheduled request

Stopped = 5

after the user stopped the request

class byteblowerll.byteblower.HTTPRequestType

Bases: object

Duration = 1

The session is duration based and finishes after a specific duration

Size = 0

The session is size based and finishes after a specific size

class byteblowerll.byteblower.HTTPResultData(*args, **kwargs)

Bases: AbstractObject

Contains the HTTP result counters.

AverageDataSpeedGet()

Rate in bytes per seconds of the data transferred.

Returns:

Rate in bytes per second

Return type:

DataRate

This method determines the direction of the traffic based on the HTTP method and whether the parent is an HTTPServer or HTTPClient.

  • A “GET” request on an HTTPServer : TX traffic.

  • A “GET” request on an HTTPClient : RX traffic.

  • A “PUT” request on an HTTPServer : RX traffic.

  • A “PUT” request on an HTTPClient : TX traffic.

Example

 print(resultData.AverageDataSpeedGet().BitRateGet())
IntervalDurationGet()

Returns the duration of this interval in nanoseconds.

Returns:

intervalduration in nanoseconds

Return type:

int

Example

print(resultData.IntervalDurationGet())
JitterGet(default_value)

Returns the jitter on the latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured jitter in nanoseconds

Return type:

int

Example

print(resultSnaphot.JitterGet())
LatencyAverageGet(default_value)

Returns the average latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured average latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyAverageGet())
LatencyMaximumGet(default_value)

Returns the maximum latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured maximum latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyMaximumGet())
LatencyMinimumGet(default_value)

Returns the minimum latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured minimum latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyMinimumGet())
RxByteCountHeaderGet()

The size of the received HTTP header in bytes.

Return type:

int

HTTP header contains the HTTP header fields. These fields define the operating parameters of an HTTP transaction (e.g. : User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/21.0 )

Example

 print(resultData.RxByteCountHeaderGet())
RxByteCountPayloadGet()

The size of the received HTTP Payload in bytes.

Return type:

int

The size of the actual content of the HTTP transaction

Example

print(resultData.RxByteCountPayloadGet())
RxByteCountRateGet()

Rate of the data received.

Returns:

Rate in bytes per second

Return type:

DataRate

Example

print(resultData.RxByteCountRateGet())
RxByteCountTotalGet()

Total of bytes received.

Returns:

Total received bytes

Return type:

int

The total is the sum of RxByteCountHeaderGet() and RxByteCountPayloadGet()

Example

print(resultData.RxByteCountTotalGet())
RxTimestampFirstGet()

Timestamp (in nanoseconds) of first received packet.

Returns:

Timestamp in nanoseconds

Return type:

int

Example

print(resultData.RxTimestampFirstGet())
RxTimestampLastGet()

Timestamp (in nanoseconds) of last received packet.

Returns:

Timestamp in nanoseconds

Return type:

int

Example

 print(resultData.RxTimestampLastGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

Timestamp of snapshot in nanoseconds

Return type:

int

Example This example gets the snapshot timestamp [NS].

 print(resultData.TimestampGet())
TxByteCountHeaderGet()

The size of the transmitted HTTPHeader in bytes.

Return type:

int

Example

 print(resultData.TxByteCountHeaderGet())
TxByteCountPayloadGet()

The size of the transmitted HTTPPayload in bytes.

Return type:

int

Example

print(resultData.TxByteCountPayloadGet())
TxByteCountRateGet()

Rate in bytes per seconds of the data sent.

Returns:

Rate in bytes per second

Return type:

DataRate

Example

 print(resultData.TxByteCountRateGet().BitRateGet())
TxByteCountTotalGet()

Total of transmitted bytes.

Return type:

int

Example

print(resultData.TxByteCountTotalGet())
TxTimestampFirstGet()

Timestamp (in nanoseconds) of first transmitted packet.

Returns:

Timestamp in nanoseconds

Return type:

int

Example

 print(resultData.TxTimestampFirstGet())
TxTimestampLastGet()

Timestamp (in nanoseconds) of last transmitted packet.

Returns:

Timestamp in nanoseconds

Return type:

int

Example

 print(resultData.TxTimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.HTTPResultDataList(*args)

Bases: object

This is a List of multiple HTTPResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

General interface for getting cumulative or interval results.

Clear()

Clears the history.

Example

resultHistory.Clear()
CumulativeGet()

Returns a list of available cumulative results.

Returns:

a list of HTTPResultData containing the Cumulative counters

Return type:

HTTPResultDataList

Example

This example gets the available cumulative results

print(resultHistory.CumulativeGet()[0].DescriptionGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

cumulative counter object at the specified index

Return type:

HTTPResultData

Example

This example gets the available cumulative counters at index 1

httpResultData = resultHistory.CumulativeGetByIndex(0)
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp nanoseconds.

Parameters:

timestamp (int) – the timestamp of the queried snapshot in nanoseconds since epoch

Return type:

HTTPResultData

Example

This example gets the available cumulative counters

httpResultData = resultHistory.CumulativeGetByTime(timestamp)
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

Return type:

HTTPResultData

Example

This example gets the available cumulative counters

 print(resultHistory.CumulativeLatestGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(resultHistory.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Returns:

a list of HTTPResultData containing the Interval counters

Return type:

HTTPResultDataList

Example

This example gets the available interval results

httpResultData = resultHistory.IntervalGet()[0]
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

HTTPResultData

Example

This example gets the available interval counters at index 1

httpResultData = resultHistory.IntervalGetByIndex(0)
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

Return type:

HTTPResultData

Example

This example gets the available interval counters

interval = resultHistory.IntervalGetByTime(timestamp)
IntervalLatestGet()

Returns the latest closed item of the interval list.

Return type:

HTTPResultData

Example

This example gets the available interval counters

httpResultData = resultHistory.IntervalLatestGet(0)
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

 print(resultHistory.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp when the results were last refreshed.

Returns:

timestamp in nanoseconds from epoch

Return type:

int

Results can be refreshed by calling Refresh on this object.

print(resultHistory.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

Returns:

The length of the server sample buffer

Return type:

int

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

Parameters:

length (int) – Number of samples to keep in the server-side buffer

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

 print(resultHistory.SamplingBufferLengthSet(6))
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Return type:

int

Example

 print(resultHistory.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

interval (int) – The duration in nanoseconds of a single sample

Warning

The previously collected history will be invalidated.

Example

 resultHistory.SamplingIntervalDurationSet(1000000000)
property thisown

The membership flag

class byteblowerll.byteblower.HTTPResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Contains HTTP result counters.

You can refresh the counters by calling the Refresh method on this object.

AverageDataSpeedGet()

Rate of the data transferred.

Depending on the HTTP method or if the parent of this object is an HTTPServer or HTTPClient, the rate of the traffic sent or received will be returned

Returns:

Rate in bytes per second

Return type:

DataRate

Example

print(resultSnaphot.AverageDataSpeedGet())
IntervalDurationGet()

Returns the duration (in nanoseconds) between snapshot objects.

Return type:

int

Example

print(resultSnaphot.IntervalDurationGet())
JitterGet(default_value)

Returns the jitter on the latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured jitter in nanoseconds

Return type:

int

Example

print(resultSnaphot.JitterGet())
LatencyAverageGet(default_value)

Returns the average latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured average latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyAverageGet())
LatencyMaximumGet(default_value)

Returns the maximum latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured maximum latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyMaximumGet())
LatencyMinimumGet(default_value)

Returns the minimum latency measured.

Parameters:

default (int) – Default value when this counter is not available

Returns:

The measured minimum latency in nanoseconds

Return type:

int

Example

print(resultSnaphot.LatencyMinimumGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(resultSnaphot.RefreshTimestampGet())
RxByteCountHeaderGet()

The size of the received HTTPheader in bytes.

HTTP header contains the HTTP header fields. These fields define the operating parameters of an HTTP transaction (e.g. : User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/21.0 )

Return type:

int

Example

result = httP
 print(resultSnapshot.RxByteCountHeaderGet())
RxByteCountPayloadGet()

The size of the received HTTP Payload in bytes.

Return type:

int

The size of the actual content of the HTTP transaction

Example

print(resultSnaphot.RxByteCountPayloadGet())
RxByteCountRateGet()

Rate of the data received.

Returns:

Rate in bytes per second

Return type:

DataRate

Example

print(resultSnaphot.RxByteCountRateGet())
RxByteCountTotalGet()

Total number of bytes received.

Returns:

Total received bytes

Return type:

int

The total is the sum of RxByteCountHeaderGet() and RxByteCountPayloadGet()

Example

print(resultSnaphot.RxByteCountTotalGet())
RxTimestampFirstGet()

Timestamp (in nanoseconds) of first received packet.

Return type:

int

Example

 print(resultSnapshot.RxTimestampFirstGet())
RxTimestampLastGet()

Timestamp (in nanoseconds) of last received packet.

Return type:

int

Example

print(resultSnapshot.RxTimestampLastGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

Timestamp of snapshot in nanoseconds

Return type:

int

Example

This example gets the snapshot timestamp [NS].

 print(resultSnaphot.TimestampGet())
TxByteCountHeaderGet()

The size of the transmitted HTTPHeader in bytes.

Return type:

int

Example

print(resultSnaphot.TxByteCountHeaderGet())
TxByteCountPayloadGet()

The size of the transmitted HTTPPayload in bytes.

Return type:

int

Example

print(resultSnaphot.TxByteCountPayloadGet())
TxByteCountRateGet()

Rate of the data sent.

Returns:

Rate in bytes per second

Return type:

DataRate

Example

 print(resultSnaphot.TxByteCountPayloadGet())
TxByteCountTotalGet()

Total of transmitted bytes.

Return type:

int

Example

print(resultSnaphot.TxByteCountTotalGet())
TxTimestampFirstGet()

Timestamp (in nanoseconds) of first transmitted packet.

Return type:

int

Example

 print(resultSnapshot.TxTimestampFirstGet())
TxTimestampLastGet()

Timestamp (in nanoseconds) of last transmitted packet.

Return type:

int

Example

print(resultSnapshot.TxTimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.HTTPServer(*args, **kwargs)

Bases: AbstractObject

HTTP server application that handles incoming HTTP requests with the correct URL format by returning a document of the appropriate size.

ClientIdentifiersGet()

Returns the list of known identifiers of HTTP clients which made a connection to this server.

Returns:

List of Client Identifiers which have connected this server.

Return type:

StringList

See also: HTTPClient.ServerClientIdGet()

Example

 print(httpServer.ClientIdentifiersGet()[0])
HasSession(inServerClientId)

Returns whether or not a client session exists with the given server-client-identifier.

Returns:

True when we have a Session, False if we don’t

Return type:

bool

See also: HTTPClient.ServerClientIdGet()

Example

 print(httpServer.HasSession('BBhttpS2502398654/BBhttpC1146349503' ))
HistorySamplingBufferLengthGet()

Gets the default Sampling Buffer Length for the HTTP Session history.

Return type:

int

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage is that previous history items are not invalidated.

Example

 print(httpServer.HistorySamplingBufferLengthGet())
HistorySamplingBufferLengthSet(inLength)

Sets the default Sampling Buffer Length for the HTTP Session history.

Parameters:

length (int) – Number of samples to keep in the server-side buffer

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Note

This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.

Example

httpServer.HistorySamplingBufferLengthSet(10)
HistorySamplingIntervalDurationGet()

Gets the default Sampling interval for the HTTP Session history.

Return type:

int

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

print(httpServer.HistorySamplingIntervalDurationGet())
HistorySamplingIntervalDurationSet(inDuration)

Sets the default Sampling interval for the HTTP Session history.

Parameters:

interval (int) – Duration of a single sample in nanoseconds

The history on the HTTP Session History object can be configured when the session is started. This method allows to configure the HTTP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Note

This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.

Example

httpServer.HistorySamplingIntervalDurationSet(500)
HttpSessionInfoDestroy(inServerClientId)

Removes a HTTP Session statistics object

Parameters:

session (HTTPSessionInfo) – Session to remove

Removing a HTTP Session statistics object will free up the storage required on the ByteBlower server and the API instance. Any stored value containing this object will be invalid.

HttpSessionInfoGet(inServerClientId)

Returns the HTTP Session statistics for this session.

Parameters:

clientID (str) – ID of the client which has connected with this server. This ID can be retrieved using the HTTPClient.ServerClientIdGet()

Return type:

HTTPSessionInfo

Raises:

ConfigError – when the HTTP Server did not setup the given HTTP session (e.g. when the TCP connection failed)

The object contains all the information of the current session. From state until the counters of received/transmitted bytes

Warning

call HasSession() to verify that the client session exists, before calling this function. Otherwise, an exception may be thrown.

Example

print(httpServer.HttpSessionInfoGet())
MaximumSegmentSizeGet()

Returns the configured TCP maximum segment size.

Return type:

int

The default value is 65535.

Example

 print(httpServer.MaximumSegmentSizeGet())
MaximumSegmentSizeSet(inValue)

Sets the TCP maximum segment size.

Parameters:

size (int) – Maximum segment size. Should be between 1 and 65535.

This option specifies an upper bound on the TCP segment size.

Example

 httpServer.MaximumSegmentSizeSet(65525)
PortGet()

Returns the configured TCP port for the HTTP server.

Returns:

The configured TCP Port

Return type:

int

Example

print(httpServer.PortGet())
PortSet(inPort)

Configures the TCP port on which the HTTP server will listen.

Parameters:

port (int) – The TCP port on which the HTTP server will listen for incoming requests.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – when the value is not between 1 and 65535

Example

 httpServer.PortSet(80)
ReceiveWindowInitialSizeGet()

Gets the initial receive window for the server.

Return type:

int

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Example

print(httpServer.ReceiveWindowInitialSizeGet())
ReceiveWindowInitialSizeSet(inValue)

Sets the initial receive window for the server.

Parameters:

windowsize (int) – New value of the initial receive window.

Raises:
  • TypeError – When the value is not an Integer

  • ConfigError – When the value is out of range

Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.

Example

httpServer.ReceiveWindowInitialSizeSet(65535)
ReceiveWindowScalingEnable(inWindowScaling)

Enables of disables windowscaling.

Parameters:

scaling (bool) – True to enable or False to disable windowscaling.

Raises:

TypeError – when the value does not evaluate to True or False

Windowscaling allows the Window Size to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Example

To enable window scaling or To disable window scaling or

httpServer.ReceiveWindowScalingEnable(True)
ReceiveWindowScalingIsEnabled()

Returns if window scaling is enabled or not.

Windowscaling allows windowsizes to grow further than 65,536 bytes. For high speed or high latency links, window scaling should be enabled for a good throughput.

Returns:

True: Window scaling is enabled, False when disabled

Return type:

bool

Example

print(httpServer.ReceiveWindowScalingIsEnabled())
ReceiveWindowScalingValueGet()

Returns the current receive window scale.

Returns:

current receive window scale (Default: 3)

Return type:

int

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in RFC 1323.

Example

print(httpServer.ReceiveWindowScalingValueGet())
ReceiveWindowScalingValueSet(inRcvWindowScale)

Configures the window scale which will be used for new clients.

Parameters:

scale (int) – Integer (0-8), which is used for bitwise shifting. (Default: 3)

Raises:

ConfigError – When the scaling value is out of range.

This must be done before requesting a page from a client, because this option is negotiated at the beginning of the TCP session.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF rfc:1323.

Example

 httpServer.ReceiveWindowScalingValueSet(7)
ResultGet(inServerClientId)

Returns the current HTTP statistics for a given session.

Parameters:

serverClientId (str) – Identifier of the session to get results for.

Returns:

The current cumulative HTTP Results for the given session

Return type:

HTTPResultSnapshot

ResultHistoryGet(inServerClientId)

Returns the current HTTP statistics history for a given session.

Parameters:

serverClientId (str) – Identifier of the session to get results for.

Returns:

The current HTTP Result history for the given session

Return type:

HTTPResultHistory

SessionStorageEnable(value)

Enable or disable storage for the HTTP Sessions

Parameters:

enable (bool) – Enable session storage. (Default: True)

The ByteBlower HTTP Server creates sessions and their histories by default. When one will never query those results, this feature can be disabled, so server resources will be free’d automatically as soon the HTTP Session finishes

SessionStorageIsEnabled()
Returns:

whether or not this feature is enabled

Return type:

bool

SlowStartThresholdGet()

Returns the initial slow-start threshold value used by TCP.

Returns:

Slow-start threshold (Default: 65535)

Return type:

int

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

print(httpServer.SlowStartThresholdGet())
SlowStartThresholdSet(inValue)

Set the initial slow-start threshold value used by TCP.

Parameters:

ssthresh (int) – New value for the slow-start threshold. Default: 65535

Raises:

ConfigError – When the value is not a positive integer

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 “TCP Congestion Control” for more information on this topic.

Example

To set slow-start threshold to 1000000

httpServer.SlowStartThresholdSet(1000000)
Start()

Starts the HTTP server on the configured port with the configured configuration.

Example

httpServer.Start()
StatusGet()

Returns the HTTP server status.

Return type:

HTTPServerStatus

Example

Before starting the HTTP server
print(httpServer.StatusGet() == HTTPRequestStatus.Stopped)
Stop()

Stops the HTTP server.

Running sessions will be stopped and new requests will be ignored.

Example

httpServer.Stop()
TcpCongestionAvoidanceAlgorithmGet()

Gets the current configured TCP Congestion Avoidance Algorithm for new clients.

Returns:

current Congestion Avoidance Algorithm. (Default: TCPCongestionAvoidanceAlgorithm.No_Algorithm)

Return type:

TCPCongestionAvoidanceAlgorithm

Example

print(httpServer.TcpCongestionAvoidanceAlgorithmGet() == TCPCongestionAvoidanceAlgorithm.NewRenoWithCubic)
TcpCongestionAvoidanceAlgorithmSet(inValue)

Selects the TCP Congestion Avoidance Algorithm.

Parameters:

algorithm (TCPCongestionAvoidanceAlgorithm) – Congestion Avoidance Algorithm to configure. (Default: TCPCongestionAvoidanceAlgorithm.No_Algorithm)

Raises:
  • TypeError – When the value could not be interpreted as a valid TCAA

  • ConfigError – When the value is not a supported TCAA

Selects the TCP Congestion Avoidance Algorithm which will be used for new clients. This must be selected before requesting a page from a client, because for some algorithms, the congestion avoidance support is negotiated a the beginning of the TCP session.

Example

Configure NewReno as congestionAvoidance Algorithm
httpServer.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.NewReno)
Configure Sack as congestionAvoidance Algorithm
httpServer.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.Sack)
Configure None as congestionAvoidance Algorithm
httpServer.TcpCongestionAvoidanceAlgorithmSet(TCPCongestionAvoidanceAlgorithm.No_Algorithm)
TcpHistorySamplingBufferLengthGet()

Gets the default Sampling Buffer Length for the TCP Session history.

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Example

print(httpServer.TcpHistorySamplingBufferLengthGet())
TcpHistorySamplingBufferLengthSet(inLength)

Sets the default Sampling Buffer Length for the TCP Session history.

Parameters:

length (int) – Number of samples to keep in the server-side buffer

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage not to invalidate previous history items.

Note

This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.

Example

httpServer.TcpHistorySamplingBufferLengthSet(10)
TcpHistorySamplingIntervalDurationGet()

Gets the default Sampling interval for the TCP Session history.

Return type:

int

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage is not to invalidate previous history items.

Example

print(httpServer.TcpHistorySamplingIntervalDurationGet())
TcpHistorySamplingIntervalDurationSet(inDuration)

Sets the default Sampling interval for the TCP Session history.

Parameters:

duration (int) – duration in nanoseconds for a single sample

The history on the TCP Session History object can be configured when the session is started. This method allows to configure the TCP Session History before the request is started and has thus the advantage is that previous history items are not invalidated.

Note

This setting will only be used on new HTTP sessions. When the session history settings must be changed, the settings must be set on the HTTP Session object.

Example

 httpServer.TcpHistorySamplingIntervalDurationSet(500)
TcpPragueEnable(value)

Whether or not TCP Prague must be enabled.

Parameters:

enable (bool) – True to enable TCP Prague, False to disable

TCP Prague is an implementation which is heavily used in L4S

TcpPragueIsEnabled()

Returns whether or not TCP Prague support is enabled

Return type:

bool

property thisown

The membership flag

class byteblowerll.byteblower.HTTPServerList(*args)

Bases: object

This is a List of multiple HTTPServer objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.HTTPServerStatus

Bases: object

Error = 2

Error occurred while initializing

Running = 0

The HTTP server is active

Stopped = 1

The HTTP server is not running

Unknown = 3

The server status code is not known to the client

class byteblowerll.byteblower.HTTPSessionInfo(*args, **kwargs)

Bases: AbstractObject

Class containing the info about the HTTPSession.

This class represents the session info gather from a HTTP session. It will contain states of the TCP session, Timestamp of received requests average throughputs etc…

ErrorMessageGet()

Returns the error message.

Returns:

The error message string

Return type:

str

When the request status is “Error” then extra information can be obtained with this method.

Example

print(httpSessionInfo.ErrorMessageGet())
RequestDurationGet()

Returns the configured Request Duration

Returns:

The configured duration in nanoseconds or 0 when the Request Type is not Duration

Return type:

int

RequestMethodGet()

Returns the http request method of the session.

Returns:

The request method used in this session

Return type:

HTTPRequestMethod

Example

retrieve the httpsession info from the httpClient

print(httpSessionInfo.RequestMethodGet() == HTTPRequestMethod.Get)
RequestSizeGet()

Returns the configured Request Size

Returns:

The configured size in bytes or 0 when the Request Type is not Size

Return type:

int

RequestStatusGet()

Returns the status of the HTTP request.

Return type:

HTTPRequestStatus

Example

print(httpSessionInfo.RequestStatusGet() == HTTPRequestStatus.Running)
RequestTypeGet()

Returns the request type ( Duration or Size )

Returns:

request Type

Return type:

HTTPRequestType

Example

print(httpSessionInfo.RequestTypeGet() == HTTPRequestType.Duration)
RequestValueGet()

Returns the request value.

Returns:

Request Value

Return type:

int

In case of duration based session it returns the duration that was requested by the httpClient. For Size it returns the requested payload size

Example

 print(httpSessionInfo.RequestValueGet())
ResultGet()

Returns the HTTPResultSnapshot for this session.

Return type:

HTTPResultSnapshot

The snapshot contains byte counters and time values.

Example

 print(httpSessionInfo.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the HTTPResultHistory for this session.

Return type:

HTTPResultHistory

The history contains a list of snapshots taken at one second intervals. To update the history use the Refresh method on this object.

Example

 print(httpSessionInfo.ResultHistoryGet().DescriptionGet())
RoleGet()

Returns the role of the session.

Possible values are:

Returns:

The role the session was/is playing

Return type:

Role

Example

retrieve the httpsession info from the httpClient

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO???
Role_Client = 0
Role_Server = 1
ServerClientIdGet()

Returns the unique identifier for this session.

Return type:

str

See: HTTPClient.ServerClientIdGet

TcpSessionInfoGet()

Returns the TCP Session Information for this session.

Return type:

TCPSessionInfo

The TCP Session information contains information about the TCP underlying session.

print(httpSessionInfo.TcpSessionInfoGet().DescriptionGet())
property thisown

The membership flag

class byteblowerll.byteblower.ICMPEchoSession(*args, **kwargs)

Bases: AbstractObject

Session for handling ICMP Echo Requests and Replies.

This Session uses the ICMP protocol for receiving and / or transmitting ICMP Echo Request and / or Replies

Some use cases for this session are:

  • DUT validation

    • Verify Echo Request / Replies are either or not filtered out

    • Verify public / private connectivity for Routers, NAT gateways, …

  • DUT stability

    • Verify Echo Replies are received during some stability tests

DataSizeGet()

Returns the data size.

Returns:

ICMP Echo data size

Return type:

int

This method returns the data size of our ICMP Echo Requests

The data size of our ICMP Echo Requests is the payload size of the packet

Default value: 56

Example

The ICMP session has been configure to add 76Bytes payload in the ICMP Request packets

print(icmpEchoSession.DataSizeGet())
DataSizeSet(inDataSize)

Configures the data size.

This method configures the data size of our ICMP Echo Requests

The data size of our ICMP Echo Requests is the payload size of the packet

Parameters:

dataSize – The ICMP data size you wish to configure.

The valid range of dataSize is: (0 to <port_mdl>) - <ICMP_header_size>.

Where

<port_mdl>

Value of ByteBlowerPort.MDLGet()

<ICMP_header_size>

Ethernet header size (14) + IPv4 header size (20) + ICMP header size (8)

Default value: 56

Raises:

<python_error> - bad lexical cast: When the value could not be interpreted as a valid integer

Raises:

ByteBlower.Protocol.InvalidValue - When the value is out of range

Example

Configure 92Bytes payload for the ICMP Request packets

icmpEchoSession.DataSizeSet(92)
EchoLoopCountGet()

Returns the Echo Request count.

This method returns the number of Echo Requests which will be transmitted when sending in a loop.

Default value: infinite (<max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615)

Returns:

The number of ICMP Echo Request packets in a loop

New in version 1.8.18.

Example

The transmit loop is configured to transmit 12345 packets

 print(icmpEchoSession.EchoLoopCountGet())
EchoLoopCountSet(inCount)

Configures the Echo Request count.

New in version 1.8.18.

Parameters:

packetCount (int) – The number of ICMP Echo Request packets to transmit

Raises:

TypeError – When the value could not be interpreted as a valid integer

This method configures the number of Echo Requests which will be transmitted when sending in a loop.

The Echo Request Loop can be started using EchoLoopStart()

Default value: infinite

The actual value is <max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615)

Example

Configure the loop to transmit 100 ICMP Echo Request packets

icmpEchoSession.EchoLoopCountSet(100)
EchoLoopIntervalGet()

Returns the Echo Request interval.

Returns:

The interval between two ICMP Echo Request packets [ns]

Return type:

int

This method returns the interval between subsequent Echo Request packets when sending in a loop.

The Echo Request Loop can be started using EchoLoopStart()

Note

The interval is always returned in nanoseconds resolution. No unit is added to the value.

Default value: 1s

Example

The transmit loop is configured with an interval of 625 microseconds

print(icmpEchoSession.EchoLoopIntervalGet())
EchoLoopIntervalSet(inTimeNs)

Configures the Echo Request interval.

Parameters:

loopInterval (int) – The interval between two ICMP Echo Request packets [ns]. Valid range: 0 to <max_uint64>*[ns] Where *<max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)

This method configures the interval between subsequent Echo Request packets when sending in a loop.

The interval has a nanosecond resolution. You can provide a time unit for the loop interval value.

The Echo Request Loop can be started using EchoLoopStart()

Default value: 1s

Example

Configure an interval of 50 microseconds (50000 nanoseconds)
icmpEchoSession.EchoLoopIntervalSet(50000)
Configure an interval of 500 milliseconds
icmpEchoSession.EchoLoopIntervalSet(500000000)
Configure an interval of 1.25 milliseconds
icmpEchoSession.EchoLoopIntervalSet(1250000)
EchoLoopStart()

Starts sending Echo Requests in a loop.

Raises:

ByteBlower.Session.Unavailable - When the destination IPv4 address was not yet configured

Raises:

ByteBlower.Protocol.Session.CreationFailed - When the destination IPv4 address cannot be reached

This method start sending Echo Requests in a loop.

The interval between Echo Request can be configured using the method EchoLoopIntervalSet()

If a limited number of Echo Request is desired, this can be configured using the method EchoLoopCountSet()

Note

This method call is (partially) non-blocking. The call will return as soon as the session is started an the loop is running or an error occurred during session initialization.

Note

The Destination IPv4 address must be configured (using RemoteAddressSet()) before sending Echo Requests

EchoLoopStop()

Stops sending Echo Requests in a loop.

This method stops sending Echo Requests in a loop. The loop can be started with EchoLoopStart()

Note

This method does not throw an exception if the loop was not started

Example

icmpEchoSession.EchoLoopStop()
EchoRequestSend()

Transmit an ICMP Echo Request.

Raises:

ByteBlower.Session.Unavailable - When the destination IPv4 address was not yet configured

Raises:

ByteBlower.Protocol.Session.CreationFailed - When the destination IPv4 address cannot be reached

This method sends one ICMP Echo Request.

Note

This method call is (partially) non-blocking. The call will not return as soon the session is setup and the request is sent or an error occurred (exception is thrown). The call does not wait until an Echo Reply is received.

Note

The Destination IPv4 address must be configured (using RemoteAddressSet()) before sending Echo Requests

EchoStatsClear()

Resets the ICMP Session statistics.

Deprecated since version 2.3.0: The recommended approach is to destruct this session and create a new one.

This method resets the ICMP Session statistics.

IdentifierGet()

Returns the ICMP Echo Request ICMPID.

Returns:

The ICMP Echo Request ICMP ID for this Session.

Return type:

int

This method returns the ICMP Echo Request ICMPID. This is also known as the Application ID

The Application ID is either generated randomly or is the one that has been provided with ICMPProtocol.SessionAdd()

Example

Returns the (integer) value of the ICMP ID (Application ID)

print(icmpEchoSession.IdentifierGet())
RemoteAddressGet()

Returns the ICMP Echo Request destination IPv4 address.

New in version 2.3.0.

Return type:

str

Returns:

The Destination IPv4 address for this session.

Raises:

ByteBlower.Session - When the destination IPv4 address was not yet configured

This method returns the IPv4 address which has been configured with RemoteAddressSet()

Example

print(icmpEchoSession.RemoteAddressGet())
RemoteAddressSet(inIPAddress)

Configure the destination IPv4 address.

New in version 2.3.0.

This method configures the destination IPv4 address for our ICMP Echo packets

The destination IPv4 address defines to where the ICMP Echo Requests will be sent or from where ICMP Echo Responses are / were received.

Parameters:

ipv4Address – The Destination IPv4 Address for this session.

Raises:

<python_error> - Invalid IPv4 address: When the value could not be interpreted as an IPv4 address

Example

icmpEchoSession.RemoteAddressSet('10.8.254.69')
SessionInfoGet()

Returns the session information.

New in version 2.3.0.

Returns:

The session information in an object.

Return type:

ICMPEchoSessionInfo

Example

The transmit loop is configured to transmit 12345 packets

icmpEchoSession.EchoLoopStart()
TtlGet()

Returns the current IPv4 time-to-live.

Returns:

IPv4 time-to-live for all ICMP Echo packets

Return type:

int

This method returns the current IPv4 TTL (time-to-live) for the ICMP Echo packets.

The TTL defines the maximum lifetime of an IPv4 (in this case ICMP) packet in the network. Every router that the packet passes decrements the TTL field in the packet. When the TTL reaches value 0 before it is delivered at its destination, it will be dropped. The router will respond to the sender with an ICMP packet type 11 (Time Exceeded).

Note

The IPv4 TTL applies for all ICMP Echo packets (Requests and Responses)

Default value: 255

New in version 1.8.18.

TtlSet(inTTL)

Configures the IPv4 time-to-live.

New in version 1.8.18.

Parameters:

ttl (int) – The IPv4 TTL you wish to configure. (Valid range: 0 to 255.) Default: 255

Raises:

<python_error> - bad lexical cast: When the value could not be interpreted as a valid integer

Raises:

ConfigError – When the value is out of range

This method configures the IPv4 TTL (time-to-live) for the ICMP Echo packets.

The TTL defines the maximum lifetime of an IPv4 (in this case ICMP) packet in the network. Every router that the packet passes decrements the TTL field in the packet. When the TTL reaches value 0 before it is delivered at its destination, it will be dropped. The router will respond to the sender with an ICMP packet type 11 (Time Exceeded).

Note

The IPv4 TTL applies for all ICMP Echo packets (Requests and Responses)

Note

The TTL only applies for this session, other sessions in this class:.ICMPProtocol` are not affected.

Example

Configure a TTL of 127 for the ICMP Request and Reply packets
icmpEchoSession.TtlSet(127)
TypeOfServiceGet()

Retrieves the ‘Type Of Service’ configuration of the IP layer.

New in version 2.5.0.

Returns:

The byte value of the ‘Type Of Service’ or ‘Traffic Class’ field. The default value is 0.

Return type:

int

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

Example

print(icmpEchoSession.TypeOfServiceGet())
TypeOfServiceSet(inTOS)

Configures the ‘Type Of Service’ used at the IP layer.

New in version 2.5.0.

Parameters:

tos (int) – The value of Type Of Service in the IP header

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase, thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example

icmpEchoSession.TypeOfServiceSet(16)
property thisown

The membership flag

class byteblowerll.byteblower.ICMPEchoSessionInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

RefreshTimestampGet()

Gets the timestamp on the server of when the session info was refreshed.

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

Example

print(icmpEchoSessionInfo.RefreshTimestampGet())
RxEchoRepliesGet()

Returns the ICMP Echo replies which were received for the session.

Returns:

The number of ICMP Echo replies which were received during the session

Return type:

int

Example

print(icmpEchoSessionInfo.RxEchoRepliesGet())
RxEchoRequestsGet()

Returns the ICMP Echo requests which were received for the session.

Returns:

The number of ICMP Echo requests which were received during the session

Return type:

int

Example

print(icmpEchoSessionInfo.RxEchoRequestsGet())
TxEchoRepliesGet()

Returns the ICMP Echo replies which were transmitted for the session.

Returns:

The number of ICMP Echo replies which were sent during the session

Return type:

int

Example

print(icmpEchoSessionInfo.TxEchoRepliesGet())
TxEchoRequestsGet()

Returns the ICMP Echo requests which were transmitted for the session.

Returns:

The number of ICMP Echo requests which were sent during the session

Return type:

int

Example

print(icmpEchoSessionInfo.TxEchoRequestsGet())
property thisown

The membership flag

class byteblowerll.byteblower.ICMPEchoSessionList(*args)

Bases: object

This is a List of multiple ICMPEchoSession objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ICMPProtocol(*args, **kwargs)

Bases: AbstractObject

The ICMP protocol is attached to the IPv4 protocol and allows the host to start ICMP sessions, through which it can communicate with the Layer3 IP network.

SessionAdd(*args)

Creates an ICMP Echo Session, through which this host can query the Layer3 IP network.

Parameters:

applicationId (int) – Provide an application id for this session. This should be unique across the host. If none is given, a random value is generated. Default: Random generate number

Returns:

The created echo session is immediately returned.

Return type:

ICMPEchoSession

See ICMPEchoSession for more information.

When an external tool connects to the ByteBlowerPort with an ICMP session (e.g. ping), that session will not be listed in SessionGet(). If you want such sessions to be listed there, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Example

This example creates an Echo session with a random application ID and returns this new object.

icmpEchoSession = icmpProtocol.SessionAdd()

Creates an ICMP Echo Session, through which this host can query the Layer3 IP network.

Parameters:

applicationId (int) – Provide an application id for this session. This should be unique across the host. If none is given, a random value is generated. Default: Random generate number

Returns:

The created echo session is immediately returned.

Return type:

ICMPEchoSession

See ICMPEchoSession for more information.

When an external tool connects to the ByteBlowerPort with an ICMP session (e.g. ping), that session will not be listed in SessionGet(). If you want such sessions to be listed there, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Example

This example creates an Echo session with a random application ID and returns this new object.

icmpEchoSession = icmpProtocol.SessionAdd()
SessionDestroy(inSession)

Removes an ICMP Session from the server

Parameters:

session (ICMPEchoSession) – Session to remove

SessionGet()

Returns the active list of ICMP Echo Sessions.

Returns:

A list of ICMPEchoSession objects

Return type:

ICMPEchoSessionList

Note

The ICMP Protocol may have more active sessions at server-side than listed here.

This list only returns the ICMPEchoSession objects for which a handle has been created at client-side. See below for more information.

When an external tool connects to the ByteBlowerPort with an ICMP session (e.g. ping), that session will not be listed here. If you want such sessions to be listed here, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Example

list = icmpProtocol.SessionGet()
property thisown

The membership flag

class byteblowerll.byteblower.ICMPv6EchoSession(*args, **kwargs)

Bases: AbstractObject

Session for handling ICMPv6 Echo Requests and Replies.

This Session uses the ICMPv6 protocol for receiving and / or transmitting ICMPv6 Echo Request and / or Replies An ICMPv6 session can be created using ICMPv6Protocol.SessionAdd()

Some use cases for this session are:

DUT validation

Verify some DUT behavioural items

  • Verify whether Echo Request / Replies are filtered out or not

  • Verify public / private connectivity for Routers, NAT gateways, …

DUT stability

Verify that Echo Replies are received during stability tests

DataSizeGet()

Returns the data size of our ICMPv6 Echo Requests.

Returns:

ICMPv6 Echo data size

Return type:

int

The data size of our ICMPv6 Echo Requests is the payload size of the packet

Default value: 56

Example

The ICMPv6 session has been configure to add 76 Bytes payload in the ICMPv6 Request packets

pritn(icmpEchoSession.DataSizeGet())
DataSizeSet(inDataSize)

Configures the data size.

Parameters:

datasize (int) – The ICMPv6 data size you wish to configure.

Raises:
  • TypeError – When the value could not be interpreted as a valid integer

  • ConfigError – When the value is out of range

This method configures the data size of our ICMPv6 Echo Requests

The data size of our ICMPv6 Echo Requests is the payload size of the packet

Valid range: 0 to <port_mdl> - <ICMPv6_header_size>. Where

<port_mdl>

Value of ByteBlowerPort.MDLGet()

<ICMPv6_header_size>

Ethernet header size (14) + IPv6 header size (40) + ICMPv6 header size (8)

Default value: 56

Example

Configure 92Bytes payload for the ICMP Request packets

icmpEchoSession.DataSizeSet(92)
EchoLoopCountGet()

Returns the Echo Request count.

Returns:

The number of ICMPv6 Echo Request packets in a loop

Return type:

int

This method returns the number of Echo Requests which will be transmitted when sending in a loop.

Default value: infinite

The actual value is <max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)

New in version 1.8.18.

Example

The transmit loop is configured to transmit 12345 packets

print(icmpEchoSession.EchoLoopCountGet())
EchoLoopCountSet(arg2)

Configures the Echo Request count.

New in version 1.8.18.

Parameters:

packetcount (int) – The number of ICMPv6 Echo Request packets to transmit

This method configures the number of Echo Requests which will be transmitted when sending in a loop.

The Echo Request Loop can be started using EchoLoopStart()

Default value: infinite The actual value is

<max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)

Raises:

python_error bad lexical cast: When the value could not be interpreted as a valid integer

Example

Configure the loop to transmit 500 ICMP Echo Request packets

icmpEchoSession.EchoLoopCountSet(500)
EchoLoopIntervalGet()

Returns the Echo Request interval.

Returns:

The interval between two ICMPv6 Echo Request packets [ns]

Return type:

int

This method returns the interval between subsequent Echo Request packets when sending in a loop.

The Echo Request Loop can be started using EchoLoopStart()

Note

The interval is always returned in nanoseconds resolution. No unit is added to the value.

Default value: 1s

Example

The transmit loop is configured with an interval of 625 microseconds

print(icmpEchoSession.EchoLoopIntervalGet())
EchoLoopIntervalSet(inTimeNs)

Configures the Echo Request interval.

Parameters:

loopInterval (int) – The interval between two ICMPv6 Echo Request packets [ns].

Raises:

TypeError – When the value is not an integer

This method configures the interval between subsequent Echo Request packets when sending in a loop.

The interval has a nanosecond resolution. You can provide a time unit for the loop interval value.

The Echo Request Loop can be started using EchoLoopStart()

Valid range: 0 to <max_uint64>

Where <max_uint64> 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)

Default value: 1s

Example

Configure an interval of 50 microseconds (50000 nanoseconds)
icmpEchoSession.EchoLoopIntervalSet(50000)
Configure an interval of 500 milliseconds
icmpEchoSession.EchoLoopIntervalSet(500000000)
Configure an interval of 1.25 milliseconds
icmpEchoSession.EchoLoopIntervalSet(1250000)
EchoLoopStart()

Starts sending Echo Requests in a loop.

Raises:

Session.Unavailable - When the destination IPv6 address was not yet configured

Raises:

Protocol.Session.CreationFailed - When the destination IPv6 address cannot be reached

This method start sending Echo Requests in a loop.

The interval between Echo Request can be configured using the method EchoLoopIntervalSet()

If a limited number of Echo Request is desired, this can be configured using the method EchoLoopCountSet()

Note

This method call is (partially) non-blocking. The call will return as soon as the session is started an the loop is running or an error occurred during session initialization.

Note

The Destination IPv6 address must be configured (using RemoteAddressSet()) before sending Echo Requests

EchoLoopStop()

Stops sending Echo Requests in a loop.

This method stops sending Echo Requests in a loop. The loop can be started with EchoLoopStart()

Note

This method does not throw an exception if the loop was not started

EchoRequestSend()

Transmit an ICMPv6 Echo Request.

Raises:

ByteBlower.Session.Unavailable - When the destination IPv6 address was not yet configured

Raises:

ByteBlower.Protocol.Session.CreationFailed - When the destination IPv6 address cannot be reached

This method sends one ICMPv6 Echo Request.

Note

This method call is (partially) non-blocking. The call will not return as soon the session is setup and the request is sent or an error occurred (exception is thrown). The call does not wait until an Echo Reply is received.

Note

The Destination IPv6 address must be configured (using RemoteAddressSet()) before sending Echo Requests

EchoStatisticsClear()

Resets the ICMPv6 Session statistics.

Deprecated since version 2.3.0.: The recommended approach is to destruct this session and create a new one.

This method resets the ICMPv6 Session statistics.

HopLimitGet()

Getting the ICMPv6 Echo Request HopLimit.

Returns:

The ICMPv6 Echo Request ICMPv6 HopLimit for this Session.

Return type:

int

Example

print(icmpEchoSession.HopLimitGet())
HopLimitSet(arg2)

Setting the ICMPv6 Echo Request HopLimit.

Parameters:

hopLimit (int) – The ICMPv6 Echo Request ICMPv6 HopLimit for this Session. The maximum legal value is 255.

The Hop Limit field is decremented when the packet is forwarded by a router.

Example

icmpEchoSession.HopLimitSet(123)
IdentifierGet()

Getting the ICMPv6 Echo Request Identifier (Application ID)

Returns:

The ICMPv6 Echo Request ICMPv6 Identifier for this Session.

Return type:

int

Example

Returns the (integer) value of the ICMP ID (Application ID)

print(icmpEchoSession.IdentifierGet())
RemoteAddressGet()

Returns the ICMPv6 Echo Request destination IPv6 address.

Returns:

The Destination IPv6 address for this session.

Return type:

str

Raises:

ByteBlower.Session - When the destination IPv6 address was not yet configured

New in version 2.3.0.

This method returns the IPv6 address which has been configured with RemoteAddressSet()

Example

print(icmpEchoSession.RemoteAddressGet())
RemoteAddressSet(inIPAddress)

Configure the destination IPv6 address.

New in version 2.3.0.

Parameters:

ipv6address (str) – The Destination IPv6 Address for this session.

Raises:

python_error: Invalid IPv6 address: When the value could not be interpreted as an IPv6 address

This method configures the destination IPv6 address for our ICMPv6 Echo packets

The destination IPv6 address defines to where the ICMPv6 Echo Requests will be sent or from where ICMPv6 Echo Responses are / were received.

Example

icmpEchoSession.RemoteAddressSet(2001:0db8:85a3:0042:1000:8a2e:0370:7334)
SessionInfoGet()

Returns the session information.

New in version 2.3.0.

Returns:

The ICMPv6 Echo session information.

Return type:

ICMPv6EchoSessionInfo

Example

The transmit loop is configured to transmit 12345 packets

print(icmpEchoSession.SessionInfoGet().DescriptionGet())
TrafficClassGet()

Retrieves the ‘Traffic Class’ configuration of the IP layer.

New in version 2.5.0.

Returns:

The byte value of the ‘Type Of Service’ or ‘Traffic Class’ field.

Return type:

int

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

The default value is 0.

Example

print(icmpEchoSession.TrafficClassGet())
TrafficClassSet(inTrafficClass)

Configures the ‘Traffic Class’ used at the IP layer.

New in version 2.5.0.

Parameters:

class (int) – The Traffic class to configure:

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase, thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example

icmpEchoSession.TrafficClassSet(16)
property thisown

The membership flag

class byteblowerll.byteblower.ICMPv6EchoSessionInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

RefreshTimestampGet()

Gets the timestamp on the server of when the session info was refreshed.

Returns:

Returns the timestamp of the refresh

Return type:

int

Example

print(icmpEchoSession.RefreshTimestampGet())
RxEchoRepliesGet()

Returns the ICMP Echo replies which were received for the session.

Returns:

The number of ICMP Echo replies which were received during the session

Return type:

int

Example

print(icmpEchoSession.RxEchoRepliesGet())
RxEchoRequestsGet()

Returns the ICMP Echo requests which were received for the session.

Returns:

The number of ICMP Echo requests which were received during the session

Return type:

int

Example

print(icmpEchoSession.RxEchoRequestsGet())
TxEchoRepliesGet()

Returns the ICMP Echo replies which were transmitted for the session.

Returns:

The number of ICMP Echo replies which were sent during the session

Return type:

int

Example

print(icmpEchoSession.TxEchoRepliesGet())
TxEchoRequestsGet()

Returns the ICMP Echo requests which were transmitted for the session.

Returns:

The number of ICMP Echo requests which were sent during the session

Return type:

int

Example

icmpEchoSession.TxEchoRequestsGet()
property thisown

The membership flag

class byteblowerll.byteblower.ICMPv6EchoSessionList(*args)

Bases: object

This is a List of multiple ICMPv6EchoSession objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ICMPv6Protocol(*args, **kwargs)

Bases: AbstractObject

ICMPv6 Protocol.

Every IPv6Configuration has a ICMPv6Protocol attached. With this class you can create a ICMPv6EchoSession to send Echo Requests

SessionAdd(*args)

Creates an ICMPv6 Echo Session, through which this host can query the Layer3 IP network.

Parameters:

id (int) – (optional) Application identifier

Returns:

The created echo session.

Return type:

ICMPv6EchoSession

See ICMPv6EchoSession for more information.

When an external tool connects to the ByteBlowerPort with an ICMPv6 session (e.g. ping6), that session will not be listed in SessionGet(). If you want such sessions to be listed there, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Parameters:

applicationId – Provide an ICMPv6 application id for this session. This should be unique across the host. If none is given, a random value is generated. Default: Random generate number

Example

This example creates an Echo session with a random application ID and returns this new object.

icmpEchoSession = icmpProtocol.SessionAdd()

Creates an ICMPv6 Echo Session, through which this host can query the Layer3 IP network.

Parameters:

id (int) – (optional) Application identifier

Returns:

The created echo session.

Return type:

ICMPv6EchoSession

See ICMPv6EchoSession for more information.

When an external tool connects to the ByteBlowerPort with an ICMPv6 session (e.g. ping6), that session will not be listed in SessionGet(). If you want such sessions to be listed there, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Parameters:

applicationId – Provide an ICMPv6 application id for this session. This should be unique across the host. If none is given, a random value is generated. Default: Random generate number

Example

This example creates an Echo session with a random application ID and returns this new object.

icmpEchoSession = icmpProtocol.SessionAdd()
SessionDestroy(inSession)

Remove an ICMPv6 Echo session

Parameters:

session (ICMPv6EchoSession) – ICMPv6 session to remove

SessionGet()

Returns the active list of ICMPv6 Echo Sessions.

Returns:

a list of ICMPv6EchoSession objects.

Return type:

ICMPv6EchoSessionList

Note

The ICMPv6 Protocol may have more active sessions at server-side than listed here. This list only returns the ICMPv6EchoSession objects for which a handle has been created at client-side. See below for more information.

When an external tool connects to the ByteBlowerPort with an ICMPv6 session (e.g. ping6), that session will not be listed here. If you want such sessions to be listed here, you will need to call SessionAdd() given the applicationId that is used by the external tool.

Example

list = icmpProtocol.SessionGet()
property thisown

The membership flag

class byteblowerll.byteblower.IGMPIPMulticastListen(inIGMPv3MemberSession)

Bases: object

MulticastSourcesGet()
MulticastSourcesSet(sourceList)
SourceFilterGet()
SourceFilterSet(filter)
property thisown

The membership flag

class byteblowerll.byteblower.IGMPJoin(*args)

Bases: object

property thisown

The membership flag

class byteblowerll.byteblower.IGMPLeave(*args)

Bases: object

property thisown

The membership flag

class byteblowerll.byteblower.IGMPMemberSession(*args, **kwargs)

Bases: SchedulableObject

Base class for IGMP member sessions

MulticastAddressGet()

Returns the multicast address for which this member session exists.

Return type:

str

Example

igmpAddress = session.MulticastAddressGet()
SessionInfoDestroy(inMemberSessionInfo)

Destroys the session statistics.

SessionInfoGet()

Returns the IGMP Session statistics for this session.

Return type:

IGMPMemberSessionInfo

Example

statistics = session.SessionInfoGet()
VersionGet()

Returns the IGMP version this member session serves.

Return type:

IGMPVersion

property thisown

The membership flag

class byteblowerll.byteblower.IGMPMemberSessionInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

InfoObject of the IGMPSession. Contains various stats of the IGMPSession

Example

sessionv1 = igmpProtocol.SessionV1Add()
igmpMemberSessionInfo = sessionv1.SessionInfoGet()
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Returns:

RefreshTimestamp in nanoseconds

Example

print(igmpMemberSessionInfo.RefreshTimestampGet())
RxGet()

Returns the number of IGMP messages received by this session.

Returns:

number of IGMP messages received by this session

Example

print(igmpMemberSessionInfo.RxGet())
RxQueriesGet()

Returns the number of received IGMP queries by this session.

Returns:

Number of IGMP v1 queries received

Example

print(igmpMemberSessionInfo.RxQueriesGet())
RxVersion1ReportsGet()

Returns the number of transmitted IGMP V2 reports by this session.

Returns:

Number of IGMP v1 reports received

print(igmpMemberSessionInfo.RxVersion1ReportsGet())
RxVersion2ReportsGet()

Returns the number of transmitted IGMP V2 reports by this session.

Returns:

Number of IGMP v2 reports received

print(igmpMemberSessionInfo.RxVersion2ReportsGet())
TxGet()

Returns the number of IGMP messages transmitted by this session.

Returns:

Number of IGMP messages transmitted

Example

print(igmpMemberSessionInfo.TxGet())
TxVersion1ReportsGet()

Returns the number of transmitted IGMP V1 reports by this session.

Returns:

Number of IGMP v1 reports transmitted

Example

print(igmpMemberSessionInfo.TxVersion1ReportsGet())
TxVersion2LeavesGet()

Returns the number of transmitted IGMP V2 leaves by this session.

Returns:

Number of IGMP v2 leaves transmitted

Example

print(igmpMemberSessionInfo.TxVersion2LeavesGet())
TxVersion2ReportsGet()

Returns the number of transmitted IGMP V2 reports by this session.

Returns:

Number of IGMP v2 reports transmitted

Example

print(igmpMemberSessionInfo.TxVersion2ReportsGet())
TxVersion3ReportsGet()

Returns the number of transmitted IGMP V3 reports by this session.

Returns:

Number of IGMP v3 reports transmitted

Example

print(igmpMemberSessionInfo.TxVersion3ReportsGet())

Gets the number of transmitted IGMPv3 reports

Return type:

int

property thisown

The membership flag

class byteblowerll.byteblower.IGMPProtocol(*args, **kwargs)

Bases: AbstractObject

The Internet Group Management Protocol (IGMP) Protocol for IPv4 manages multicast group membership for a given IPv4 host.

This class support three IGMP Protocol versions:

IGMPv1

:rfc:1112

IGMPv2

:rfc:2236. IGMPv2 allows group membership termination to be quickly reported to the routing protocol, which is important for high-bandwidth multicast groups and/or subnets with highly volatile group membership.

IGMPv3

:rfc:3376. Version 3 of IGMP adds support for “source filtering”, that is, the ability for a system to report interest in receiving packets only from specific source addresses, or from all but specific source addresses, sent to a particular multicast address. That information may be used by multicast routing protocols to avoid delivering multicast packets from specific sources to networks where there are no interested receivers.

ProtocolInfoDestroy(inIGMPProtocolInfo)

Removes the protocol statistics

Parameters:

stats (IGMPProtocolInfo) – Statistics object to destory

ProtocolInfoGet()

Returns the ProtocolInfo object that contains various stats on the IGMPProtocol

Return type:

IGMPProtocolInfo

Example

protocolInfo = icmpProtocol.ProtocolInfoGet()
SessionDestroy(*args)

Removes a given session

Parameters:

session (IGMPv1MemberSession | IGMPv2MemberSession | IGMPv3MemberSession | IGMPMemberSession) – IGMP session to stop

Removes a given session

Parameters:

session (IGMPv1MemberSession | IGMPv2MemberSession | IGMPv3MemberSession | IGMPMemberSession) – IGMP session to stop

Removes a given session

Parameters:

session (IGMPv1MemberSession | IGMPv2MemberSession | IGMPv3MemberSession | IGMPMemberSession) – IGMP session to stop

SessionV1Add(inGroupAddress)

Adding a IGMPv1 Session.

Return type:

IGMPv1MemberSession

Example

sessionv1 = icmpProtocol.SessionV1Add('235.0.0.1')
SessionV2Add(inGroupAddress)

Adding a IGMPv2 Session.

Return type:

IGMPv2MemberSession

Example

sessionv2 = icmpProtocol.SessionV2Add('235.0.0.1')
SessionV3Add(inGroupAddress)

Adding a IVMPv3 Session.

Return type:

IGMPv3MemberSession

Example

sessionv3 = icmpProtocol.SessionV3Add('235.0.0.1')
property thisown

The membership flag

class byteblowerll.byteblower.IGMPProtocolInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

Class: IGMPProtocolInfo

RefreshTimestampGet()

Gets the timestamp when these statistics were last updated

Returns:

The timestamp in nanoseconds since epoch

Return type:

int

RxGet()

Gets the number of received IGMP messages

Return type:

int

RxQueriesGet()

Gets the number of received IGMP queries

Return type:

int

RxReportsGet()

Gets the number of received IGMP reports

Return type:

int

RxVersion1QueriesGet()

Gets the number of received IGMPv1 queries

Return type:

int

RxVersion1ReportsGet()

Gets the number of received IGMPv1 reports

Return type:

int

RxVersion2LeavesGet()

Gets the number of received IGMPv2 leaves

Return type:

int

RxVersion2QueriesGet()

Gets the number of received IGMPv2 queries

Return type:

int

RxVersion2ReportsGet()

Gets the number of received IGMPv2 reports

Return type:

int

RxVersion3QueriesGet()

Gets the number of received IGMPv3 queries

Return type:

int

RxVersion3ReportsGet()

Gets the number of received IGMPv3 reports

Return type:

int

TxGet()

Gets the number of transmitted IGMP messages

Return type:

int

TxReportsGet()

Gets the number of transmitted IGMP reports

Return type:

int

TxVersion1ReportsGet()

Gets the number of transmitted IGMPv1 reports

Return type:

int

TxVersion2LeavesGet()

Gets the number of transmitted IGMPv2 leaves

Return type:

int

TxVersion2ReportsGet()

Gets the number of transmitted IGMPv2 reports

Return type:

int

TxVersion3ReportsGet()

Gets the number of transmitted IGMPv3 reports

Return type:

int

property thisown

The membership flag

class byteblowerll.byteblower.IGMPVersion

Bases: object

IGMPv1 = 1
IGMPv2 = 2
IGMPv3 = 3
byteblowerll.byteblower.IGMPVersionToString(inIGMPVersion)
class byteblowerll.byteblower.IGMPv1MemberSession(*args, **kwargs)

Bases: IGMPMemberSession

Join()

Joins the session

Leave()

Leaves the session

property thisown

The membership flag

class byteblowerll.byteblower.IGMPv2MemberSession(*args, **kwargs)

Bases: IGMPMemberSession

Join()

Joins the session

Leave()

Leaves the session

property thisown

The membership flag

class byteblowerll.byteblower.IGMPv3MemberSession(*args, **kwargs)

Bases: IGMPMemberSession

MulticastListen(inSourceFilter, inSourceList)

Starts listening for a specific IGMPv3 member session

Parameters:
  • filter (MulticastSourceFilter) – Whether to include or exclude the given source list

  • list (StringList) – list of multicast senders to include/exclude

SourceFilterModeGet()

Gets the include/exclude mode

Return type:

MulticastSourceFilter

SourceListGet()

Gets the source list.

Return type:

StringList

property thisown

The membership flag

class byteblowerll.byteblower.IPCPProtocolList(*args)

Bases: object

This is a List of multiple IPv4CPProtocol objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.IPv4CPProtocol(*args, **kwargs)

Bases: PPPNetworkControlProtocol

Internet Protocol Control Protocol.

Internet Protocol Control Protocol (IPCP) is a network control protocol for establishing and configuring Internet Protocol over a Point-to-Point Protocol link. IPCP is responsible for configuring, enabling, and disabling the IP protocol modules on both ends of the point-to-point link. IPCP uses the same packet exchange mechanism as the Link Control Protocol.

The implementation is conform :rfc:1332

Note

The RFC deprecated the IP-Addresses configuration option. ByteBlower does not provide the (optional) backward compatibility for this option.

Note

IP compression is not supported.

New in version 2.5.0.

Close()

Perform an administrative close on the IPCP protocol.

This event indicates that the link is not available for traffic.

In the closed state, the protocol will not come up when the PPP session is established. When the PPP/IPCP session was already established, the IPCP session will properly terminate the network layer.

See also :rfc:1661, section 4.3 for detailed information about the Close event.

IpAddressGet()

Returns local the IPv4 address.

This method returns the IP address to be used at the local end of the link. Before the IPCP protocol negotiated the IP address, this method will return the value configured with IpAddressSet(). After IP address negotiation with the remote peer, the method will return the IP address negotiated with the remote peer.

The latter will be either:

  • the same as the value configured with IpAddressSet()

    • if the remote peer accepted that address.

  • the address imposed by the remote peer: - if we requested that the peer provides the address

    • when the remote peer did not accept the requested IP address.

Returns:

The IP address to be used by the local peer.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
IpAddressPeerProvided()

Request the peer to provide an IP address.

During IP address negotiation, we will request to peer to provide an IP address.

Note

This method call will have the same effect as calling IpAddressSet() with <ipAddress> set to ‘0.0.0.0’.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
IpAddressRemoteGet()

Returns the IP address of the remote peer.

This method will return the IP address which has been requested by the remote peer during (the last) address negotiation.

Returns:

IP address of the remote peer of the last address negotiation. ‘0.0.0.0’ if no negotiation took place yet.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
IpAddressSet(inIPAddress)

Configures the IPv4 address to be used at the local end of the link.

During IP address negotiation, the given address will be proposed to the remote end of the link.

Parameters:

ipAddress – The IPv4 address to be used during negotiation at the local peer.

Note

The IPv4 address ‘0.0.0.0’ has a special meaning: This will request the remote peer to provide an IP address. See also IpAddressPeerProvided() for a convenience method.

Raises:

BadIPv4Address - When an incorrect IPv4 address string was provided.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Open()

Perform an administrative open on the IPCP protocol.

This event indicates that the link is administratively available for traffic.

In the opened state, the protocol will come up when the PPP session is established. When the PPP/IPCP session was already established, the IPCP will start negotiation.

See also :rfc:1661, section 4.3 for detailed information about the Open event.

property thisown

The membership flag

class byteblowerll.byteblower.IPv4Configuration(*args, **kwargs)

Bases: Layer3Configuration

Provides an interface for the IPv4 configuration on a ByteBlower port.

GatewayGet()

Returns the default gateway of the ByteBlower port.

Returns:

Default gateway of the ByteBlower port.

Return type:

str

Example

This example gets the gateway of the ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
GatewaySet(inGateway)

Sets the default gateway of the ByteBlower port.

Parameters:

gateway (str) – Gateway address string

Raises:

ConfigError – When an invalid IPv4 address is being set.

Example

This example sets the gateway of the ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
IpGet()

Retrieves the Ip address of the ByteBlower port.

Returns:

The IP address of the ByteBlower port.

Return type:

str

Example

This example returns the IP address on a ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
IpSet(inIPv4Address)

Sets the IP address of the ByteBlower port.

Parameters:

ipAddress (str) – IP address string. You can use “slash notation” (e.g. 10.1.1.2/24) to simulateously specify the address and netmask.

Raises:

ConfigError – When an invalid IPv4 address is being set.

Example

This example sets the IP address on a ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
NetmaskGet()

Gets the netmask of the ByteBlower port.

Returns:

Netmask of the ByteBlower port.

Return type:

str

Example

This example gets the netmask of the ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
NetmaskSet(inNetMask)

Sets the netmask of the ByteBlower port.

Parameters:

netmask (str) – Netmask address string

Example

This example sets the netmask of the ByteBlower port.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolArp(inIPAddress)

Performs MAC address resolution for a given IP address.

Parameters:

ipAddress (str) – IPv4 address to resolve

Returns:

Resolved MAC address

Return type:

str

Raises:

Sends an ARP request for the specified IP address, and returns the answer if an answer is received.

Note

This call does not make use of the an ARP cache. If you are only interested in resolving an IP then please use Resolve() which also makes use of the ARP cache.

Example

This example gets the MAC address for an IP address.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolArpAsync(inIPAddress)

Starts MAC address resolution for a given IP address.

New in version 2.2.0.

Parameters:

ip_address (str) – IPv4 address to resolve

Raises:

ConfigError – When an unusable IP address was given.

Sends an ARP request for the specified IP address, and returns immediately. To obtain the results of the ARP resolution, you can use ProtocolArp().

Note

This call does not make use of the an ARP cache. If you are only interested in resolving an IP then please use ResolveAsync() which also makes use of the ARP cache.

Example

This example triggers ARP resolution gets the MAC address for an IP address.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolDhcpGet()

Returns the DHCP protocol.

Return type:

DHCPv4Protocol

Example

This example gets the DHCP protocol object.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolGratuitousArpReply()

Sends a Gratuitous ARP (GARP) request.

New in version 2.5.0.

The GARP Request can be used for host presence announcement. This way, other devices on the network can learn the Layer2 and Layer3 information of the host

Example

This example sends a Gratuitous ARP request

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolGratuitousArpRequest()

Sends a Gratuitous ARP (GARP) request.

New in version 2.5.0.

The GARP Request can be used for host presence announcement. This way, other devices on the network can learn the Layer2 and Layer3 information of the host. This GARP Request is preferred over the GARP Reply

Example

This example sends a Gratuitous ARP request

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolIcmpGet()

Returns the ICMP protocol.

Return type:

ICMPProtocol

Example This example gets the ICMP protocol object.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ProtocolIgmpGet()

Returns the IGMP protocol.

Return type:

IGMPProtocol

Example

This example gets the IGMP protocol object.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Resolve(inIPAddress)

Resolve the MAC address for a given IP address.

Parameters:

ipAddress (str) – IPv4 address to resolve

Returns:

Resolved MAC address

Return type:

str

Raises:

The ByteBlower server stores an ARP cache per ByteBlower port. Resolving the IP for a port will search the ARP cache first. If no entry was found then an actual ARP request is performed. An entry in the ARP cache remains valid for 120 seconds.

Example

This example gets the MAC address for an IP address.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ResolveAsync(inIPAddress)

Start MAC address resolution for a given destination IP address.

New in version 2.2.0.

Parameters:

ipaddress (str) – IPv4 address to resolve

Raises:

ConfigError – When an unusable IP address was given.

The ByteBlower server stores an ARP cache per ByteBlower port. Resolving the IP for a port will search the ARP cache first. If no entry was found then an actual ARP request is performed. An entry in the ARP cache remains valid for 120 seconds.

This methods initiates the MAC address resolution. To obtain the actual results of the address resolution, please use Resolve().

Example

This example triggers address resolution gets the MAC address for the given IP address.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
property thisown

The membership flag

class byteblowerll.byteblower.IPv6CPProtocol(*args, **kwargs)

Bases: PPPNetworkControlProtocol

IP version 6 over PPPoE.

IPv6 Control Protocol (IPv6CP) is a network control protocol for establishing and configuring the IPv6 (see also Layer3.IPv6) over PPP . It forms IPv6 link-local addresses on PPP links. The IPv6 Control Protocol (IPV6CP) is responsible for configuring, enabling, and disabling the IPv6 protocol modules on both ends of the point-to-point link. IPV6CP uses the same packet exchange mechanism as the Link Control Protocol (LCP).

The implementation is conform :rfc:2472

New in version 2.5.0.

Close()

Perform an administrative close on the IPv6CP protocol.

This event indicates that the link is not available for traffic.

In the closed state, the protocol will not come up when the PPP session is established. When the PPP/IPv6CP session was already established, the IPv6CP session will properly terminate the network layer.

See also :rfc:1661, section 4.3 for detailed information about the Close event.

InterfaceIdentifierGet()

Returns the local IPv6 interface identifier.

This method returns the IPv6 interface identifier to be used at the local end of the link. The initial value is based on the local MAC address (from EthernetConfiguration.MacGet()).

After IPv6 interface identifier negotiation with the remote peer, the method will return the IPv6 interface identifier negotiated with the remote peer.

The latter will be either:

  • the initial value if the remote peer accepted that address.

  • the address imposed by the remote peer when the remote peer did not accept the requested address.

Returns:

The IPv6 interface identifier to be used by the local peer.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
InterfaceIdentifierRemoteGet()

Returns the IPv6 interface identifier of the remote peer.

This method will return the IPv6 interface identifier which has been requested by the remote peer during (the last) address negotiation.

Returns:

IPv6 interface identifier of the remote peer of the last address negotiation. ‘00:00:00:00:00:00:00:00’ if no negotiation took place yet.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Open()

Perform an administrative open on the IPv6CP protocol.

This event indicates that the link is administratively available for traffic.

In the opened state, the protocol will come up when the PPP session is established. When the PPP/IPv6CP session was already established, the IPv6CP will start negotiation.

See also :rfc:1661, section 4.3 for detailed information about the Open event.

property thisown

The membership flag

class byteblowerll.byteblower.IPv6CPProtocolList(*args)

Bases: object

This is a List of multiple IPv6CPProtocol objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.IPv6Configuration(*args, **kwargs)

Bases: Layer3Configuration

A class representing the IPv6 protocol that allows managing IPv6 settings, running IPv6 commands and accessing attached protocols.

Each ByteBlowerPort must be configured with a layer 3 protocol through the method ByteBlowerPort.Layer3IPv6Set(). If the IPv6 protocol is selected, this object is returned. Through it, the IPv6 protocol instance on that port can be configured.

It provides the following functionality:

  • Configure and read various IPv6 settings and values such as the IP address.

  • Execute IPv6 commands such as resolving IPv6 addresses (through NDP).

  • Access protocols attached to the IPv6 protocol such as DHCPv6 and ICMPv6 on which other settings can be configured and other commands can be executed.

GatewayAdvertisedGet()

Returns the current (preferred) gateway of this IPv6 protocol, set either manually or by performing DHCP or SLAAC.

New in version 2.1.0.

Return type:

StringList

The first time an IP address is added (either manually or by performing DHCP or SLAAC) the preferred gateway is also automatically detected. From that moment on, it can be retrieved by this method.

When no gateway is found when the IP is set (manually, through DHCP or SLAAC) the gateway is set to the null address (::). Every time this getter is called, IPv6 will look for router advertisements. If one is found, it will be updated automatically.

Once the preferred gateway is set using GatewayManualSet(), this value remains the preferred gateway until it is explicitly replaced. Performing DHCP or SLAAC again will not replace the manually set value. This may change in the future.

Example

This example retrieves the current gateway.

 port_layer3_config = self.port.Layer3IPv6Get()
 for link in port_layer3_config.GatewayAdvertisedGet():
     print(link)
GatewayGet()

Returns the current manual configured gateway of this IPv6 protocol…

New in version 2.1.0.

Deprecated since version 2.22.0.

GatewayManualGet()

Returns the current manual configured gateway of this IPv6 protocol…

New in version 2.22.0.

Return type:

str

Example

This example retrieves the current gateway.

print(port_layer3_config.GatewayManualGet())
GatewayManualSet(inGateway)

configures the manual gateway.

New in version 2.22.0.

Parameters:

gateway (str) – Gateway to set

Raises:

ConfigError – Setting one of the port’s own IP addresses as gateway is not possible and causes this exception.

The current IPv6 implementation is limited to a single gateway. This is the preferred gateway. This may change in the future.

Example

This example sets the current gateway.

 port_layer3_config.GatewayManualSet('fe80:0000:0000:0000:0290:0eff:fe1c:e44d')
GatewaySet(inGateway)

Configures the manual gateway.

New in version 2.1.0.

Deprecated since version 2.22.0.

IpDhcpGet()

Returns all IPv6 addresses that where obtained by the DHCPv6 protocol.

Returns:

A list of IPv6 addresses obtained during DHCP is returned. These addresses are returned using the full (i.e. uncompressed) representation and appended with their prefix lengths (see example). An empty list (i.e. empty string) is returned if no DHCP was performed yet or if it did not provided any IP addresses.

Return type:

StringList

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories:

  • manually added addresses

  • addresses obtained through the DHCP protocol

  • addresses obtained using stateless address autoconfiguration (SLAAC)

  • linklocal addresses.

This method returns all DHCP IPv6 addresses on the port. They are configured by retrieving the DHCP protocol using ProtocolDhcpGet() and executing DHCPv6Protocol.Perform().

Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.

Example

prints a list of DHCP-obtained IPv6 addresses.
 dhcpList = bbPort1_l3.IpDhcpGet()
 for ip_dhcp in dhcpList:
     print(ip_dhcp)
IpLinkLocalGet()

Returns the linklocal address which is based on the MAC address of the port.

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: - manually added addresses - addresses obtained through the DHCP protocol - addresses obtained using stateless address autoconfiguration (SLAAC) - linklocal addresses.

This method returns the link-local IPv6 address on the port. It uses the dedicated fe80::/64 prefix as the first half of the address and the modified EUI-64 number (based on the Ethernet MAC address) as the last half of the address.

Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the irst time when calling this method, the gateway property will be set updated automatically.

Returns:

The linklocal IPv6 address is returned. This address does always exist, even if no IPv6 gateway is present. The address is returned using the full (i.e. uncompressed) representation. The prefix length suffix (‘/64’) is omitted!

Return type:

str

Example

This example returns the link-local address of a port.

 bbPort1_l3 = port1.Layer3IPv6Set()
 print(bbPort1_l3.IpLinkLocalGet())
IpManualAdd(inIPv6Address)

Adds a manual IPv6 address to the port.

New in version 2.1.0.

Parameters:

address (str) – The IPv6 address you want to add. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, …. A custom prefix length can be provided by appending this argument with /<prefix length>, where <prefix length> can be a number between 0 and 128. If no such prefix length is appended, the default length of 64 is taken.

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: - manually added addresses - addresses obtained through the DHCP protocol - addresses obtained using stateless address autoconfiguration (SLAAC) - linklocal addresses.

This method adds such a manual IP address to the port. Note this method also adds the prefix derived from the specified address to the list of on-link prefixes.

If the IPv6 protocol is not yet initialized, calling this method the first time will do so. This initialization causes the host’s link-local address to be generated and looks for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::).

Example

This examples adds a global address address using default prefix length 64.

 bbPort1_l3 = port1.Layer3IPv6Set()
 bbPort1_l3.IpManualAdd('3000:3128::24/64')
IpManualClear()

Removes all manually added IP addresses from this port.

New in version 2.1.0.

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories:

  • manually added addresses

  • addresses obtained through the DHCP protocol

  • addresses obtained using stateless address autoconfiguration (SLAAC)

  • linklocal addresses.

This method removes all addresses in the first category.

Example

This example removes all manually added addresses from the port.

 port_layer3_config = self.port.Layer3IPv6Get()
 port_layer3_config.IpManualClear()
IpManualGet()

Returns all IPv6 addresses that where manually added by the user.

Returns:

A list of manually added IPv6 addresses is returned. These addresses are returned using the full (i.e. uncompressed) representation and appended with their prefix lengths (see example). An empty list (i.e. empty string) is returned if no addresses were added yet.

Return type:

StringList

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories:

  • manually added addresses

  • addresses obtained through the DHCP protocol

  • addresses obtained using stateless address autoconfiguration (SLAAC)

  • linklocal addresses.

This method returns all manual IPv6 addresses on the port.

Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically.

Example

Prints a list of manual IPv6 addresses
 port_layer3_config = self.port.Layer3IPv6Get()
 list = port_layer3_config.IpManualGet()
 for ip in list:
     print(ip)
IpManualRemove(inIPv6Address)

Removes a specified manually added IP address from this port.

New in version 2.1.0.

Parameters:

address (str) – The IPv6 address you want to remove. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, …. No prefix length suffix (e.g. ‘/64’) may be included!

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories:

  • manually added addresses

  • addresses obtained through the DHCP protocol

  • addresses obtained using stateless address autoconfiguration (SLAAC)

  • linklocal addresses.

This method removes the specified IPv6 address from the port if it was added manually before. If the address was not added manually, nothing is done.

Example

This example removes the specified address from the port if it was previously added.

 port_layer3_config.IpManualRemove('3000:3128::23/64')
IpStatelessGet()

Returns all IPv6 addresses that where obtained by stateless autoconfiguration.

Returns:

A list of IPv6 addresses obtained during stateless autoconfiguration (SLAAC) is returned. These addresses are returned using the full (i.e. uncompressed) representation and appended with their prefix lengths (see example). An empty list (i.e. empty string) is returned if no autoconfiguration was performed yet or if it did not provided any IP addresses.

Return type:

StringList

An IPv6 host can have multiple IPv6 addresses at the same time. ByteBlower divides these addresses in four categories: - manually added addresses - addresses obtained through the DHCP protocol - addresses obtained using stateless address autoconfiguration (SLAAC) - linklocal addresses.

This method returns all SLAAC IPv6 addresses on the port. They are configured by calling the StatelessAutoconfiguration() function.

Every time this getter is called, IPv6 synchronizes its state by looking for router advertisements. For example, if a router advertisements is found for the first time when calling this method, the gateway property will be set updated automatically. Example

prints the list of SLAAC-obtained IPv6 addresses
 bbPort1_l3.StatelessAutoconfiguration()
 statelessList = bbPort1_l3.IpStatelessGet()
 for ips in statelessList:
     print(ips)
NeighborDiscovery(inIPv6Address)

Resolves a destination IPv6 address by explicitly performing Neighbor Discovery.

Parameters:

address – The IPv6 address that must be resolved. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, … No prefix length suffix (e.g. ‘/64’) may be included!

Returns:

The layer 2 MAC address found for the provided IPv6 address.

Return type:

str

Raises:

AddressResolutionFailed – When nobody replies to the Neighbour Discovery request (i.e. neither the host itself or a forwarding router), this exception is thrown.

To use the neighbor cache first when resolving an IPv6 address, execute the Resolve() method. This may return significantly faster then this method.

Example

This simple example resolves a link-local IPv6 address. This example clearly shows that the host part of a link-local address is based on its layer 2 MAC address.

 port_layer3_config.NeighborDiscovery('fe80:0000:0000:0000:02ff:25ff:fe00:0001')
ProtocolDhcpGet()

Returns the DHCPv6 protocol attached to this protocol through which DHCP can be performed.

Return type:

DHCPv6Protocol

See DHCPv6Protocol for more configuration options. To actually perform DHCP, execute the DHCPv6Protocol.Perform() method on the returned object.

If the IPv6 protocol is not yet initialized, performing DHCP the first time will do so. This initialization causes the host’s link-local address to be generated and looks for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::) and no address is set.

Example

This example returns the DHCP object.

 port_layer3_config = self.port.Layer3IPv6Get()
 protocolDhcp = port_layer3_config.ProtocolDhcpGet()
ProtocolIcmpGet()

Returns the ICMPv6 protocol attached to this protocol that allows starting ICMP sessions.

Return type:

ICMPv6Protocol

See ICMPv6Protocol for more information on creating ICMP sessions.

Example

This example returns the ICMP object.

bbPort1_l3 = port1.Layer3IPv6Set()
protocol = bbPort1_l3.ProtocolIcmpGet()
ProtocolMldGet()

Returns the MLD protocol attached to the IPv6 protocol that allows multicast

Return type:

MLDProtocol

See MLDProtocol for more information.

Example

This example returns the MLD Protocol.

bbPort1_l3 = port1.Layer3IPv6Set()
protocol = bbPort1_l3.ProtocolMldGet()
Resolve(inIPv6Address)

Resolves a destination IPv6 address by looking in the neighbour cache or performing Neighbor Discovery.

Parameters:

address (str) – The IPv6 address that must be resolved. The IPv6 address may be written in any valid IPv6 addressing format. For example, removing leading zeros within a group, compressing adjacent groups of zeros, …. No prefix length suffix (e.g. ‘/64’) may be included!

Returns:

The layer 2 MAC address found for the provided IPv6 address.

Return type:

str

Raises:

AddressResolutionFailed – When the item is not present in the neighbor cache and nobody replies to the Neighbour Discovery request (i.e. neither the host itself or a forwarding router), this exception is thrown.

To force this host to perform the Neighbor Discovery algorithm and thus bypass the cache, execute the NeighborDiscovery() method.

Example

This simple example resolves a link-local IPv6 address. This example clearly shows that the host part of a link-local address is based on its layer 2 MAC address.

 dhcpv6 = port_l3.ProtocolDhcpGet()
 dhcpv6.Perform()
 port = port_l3.IpDhcpGet()
 dst_mac = self.port_1.Layer3IPv6Get().Resolve(port)
SelectSourceAddressFor(destination_ip)

Selects an appropriate IPv6 source address for a given destination address.

New in version 2.21.0.

Parameters:

address (str) – The destination address for which we want to select an appropriate source address.

Returns:

The appropriate source address for the given destination address.

Return type:

str

The ByteBlower implements source address selection according to the rules specified in RFC 6724 Section 5.

Example

Here we select a source address for a given IPv6 destination. The dst_ip and src_ip variables are strings representing an IPv6 address.

src_ip = ipv6.SelectSourceAddressFor(dst_ip)
StatelessAutoconfiguration()

Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address.

The stateless address autoconfiguration (SLAAC) is done in an asynchronous manner. It works through the IPv6 Neighbor Discovery Protocol (NDP). It creates an IP address based on the prefix information from incoming router advertisements (first 64 bits) and the hosts MAC address (last 64 bits).

Note

SLAAC and the NDP is also used to create the link-local IP address. This address has a fixed prefix (fe80::/64) and the same host part. This address is immediately generated when the IPv6 protocol is initialized and is not part of this call.

If the IPv6 protocol is not yet initialized, calling this method the first time will do so. This initialization sets the link-local address described above and listens for router advertisements to set the default gateway. If no router advertisement occurs, the gateway is set to the null address (::).

When no routing advertisement is found, no address is added.

Example

This example performs stateless address autoconfiguration on this host.

 bbPort1_l3 = port1.Layer3IPv6Set()
 bbPort1_l3.StatelessAutoconfiguration()
StatelessAutoconfigurationAsync()

Performs stateless address autoconfiguration (SLAAC) to configure IPv6 with, among others, a global IPv6 address.

New in version 2.3.0.

This is a asynchronous call so it will return immediately. If you want to wait until it has finished then call the StatelessAutoconfiguration() method after having called this method. This will also rethrow any exceptions that may have occured on the server side.

This method returns immediately.

Example

This example performs stateless address autoconfiguration on this host.

 port_layer3_config.StatelessAutoconfigurationAsync()
property thisown

The membership flag

exception byteblowerll.byteblower.InProgressError(*args)

Bases: DomainError

property thisown

The membership flag

exception byteblowerll.byteblower.InitializationError(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.Int64List(*args)

Bases: object

This is a List of multiple signed integers.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.Int64Pair(*args)

Bases: object

property first
property second
property thisown

The membership flag

class byteblowerll.byteblower.Int64StringMap(*args)

Bases: object

asdict()
find(x)
has_key(key)
items()
iterator()
iteritems()
iterkeys()
itervalues()
key_iterator()
keys()
lower_bound(x)
swap(v)
property thisown

The membership flag

upper_bound(x)
value_iterator()
values()
class byteblowerll.byteblower.IntegerList(*args)

Bases: object

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.Latency(*args, **kwargs)

Bases: TaggedRx

Base class for Latency receive side triggers.

property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasic(*args, **kwargs)

Bases: Latency

Receive-side packet processor which calculates latency on the incoming frames, matching a filter.

The basic latency processor extends the basic trigger. It provides additional information like latency and jitter. See ResultGet() for more information.

This latency calculation is always active and starts processing frames as soon as it is created. Processing continues until the packet processor is destructed.

The transmit time stamp of a packet is obtained from a time tag in the frame. This tag is configured on the FrameTagTx, which can be obtained via Frame.FrameTagTimeGet().

Note

The initial (empty) filter string accepts all incoming frames. See FilterSet() for filtering information.

A basic latency object can be created via a ByteBlowerPort, using ByteBlowerPort.RxLatencyBasicAdd()

This packet processor processes frames received on the ByteBlower interface where its parent ByteBlowerPort is located.

Example

Receive all frames on “trunk-1-45” of some server, matching UDP source or destination port 49523.

latencyTrigger = port.RxLatencyBasicAdd()
latencyTrigger.FilterSet('ip dst 1.1.1.2 and udp port 4096')
FilterGet()

Returns the current installed BPF filter string.

The filter string can be configured using FilterSet()

Returns:

The current BPF filter string

Example

Suppose we configured the trigger with filter string: where $ipv4_1 and $ipv4_2 are IPv4Configuration objects and $frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

print(latencyTrigger.FilterGet())
FilterSet(arg2)

Sets a BPF filter on a RX object.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Parameters:

bpfString – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ByteBlower.Rx.* - When the {server-side} RX object could not be resolved.

Raises:

ByteBlower.Rx.Filter.CompilationFailed - When an invalid BPF filter string is given.

Raises:

ByteBlower.InvalidFilter - When an invalid BPF filter string is given.

Example

This will filter only UDP traffic. Set the filter on packets that match:

  • source and destination IPv4 address

  • UDP traffic with given destination and source UDP port

  • (layer2) frame length (without CRC!)

latencyTrigger.FilterSet('ip dst 1.1.1.2 and udp port 4096')
ResultClear()

Resets the counter values to zero and empties the ResultHistory.

Example

latencyTrigger.ResultClear()
ResultGet()

Returns the current result counters.

Return type:

LatencyBasicResultSnapshot

Example

result = latencyTrigger.ResultGet()
ResultHistoryGet()

Returns the current trigger history counters.

Return type:

LatencyBasicResultHistory

Example

resultHistory = latencyTrigger.ResultHistoryGet()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicList(*args)

Bases: object

This is a List of multiple LatencyBasic objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicMobile(*args, **kwargs)

Bases: Latency

Receive-side packet processor which calculates latency on the incoming frames, matching a filter.

New in version 2.6.0.

The basic latency processor extends the basic trigger. It provides additional information like latency and jitter. See ResultGet() for more information.

The transmit time stamp of a packet is obtained from a time tag in the frame. This tag is configured on the FrameTagTx, which can be obtained via Frame.FrameTagTimeGet().

A basic latency object can be created via a WirelessEndpoint, using WirelessEndpoint.RxLatencyBasicAdd()

Example

latencyTrigger = wirelessEndpoint.RxLatencyBasicAdd()
latencyTrigger.FilterUdpSourcePortSet(4096)
DurationGet()

Returns the duration for which the trigger will be active.

Example

print(latencyMobileTrigger.DurationGet())
DurationSet(inDuration)

Sets the duration for which the trigger will be active.

Configures how long the trigger will listen for incoming packets.

Example

Listen for 10 minutes

latencyMobileTrigger.DurationSet(10*1000000000)
FilterSourceAddressGet()

Returns the source address field of the packet filter.

Example

print(latencyMobileTrigger.FilterSourceAddressGet())
FilterSourceAddressSet(inAddress)

Sets the source address field of the packet filter.

Example

latencyMobileTrigger.FilterSourceAddressSet('10.8.1.2')
FilterUdpDestinationPortGet()

Returns the destination port field of the packet filter.

Example

print(latencyMobileTrigger.FilterUdpDestinationPortGet())
FilterUdpDestinationPortSet(inPort)

Sets the destination port field of the packet filter.

Example

latencyMobileTrigger.FilterUdpDestinationPortSet(4096)
FilterUdpSourcePortGet()

Returns the source port field of the packet filter.

Example

print(latencyMobileTrigger.FilterUdpSourcePortGet())
FilterUdpSourcePortSet(inPort)

Sets the source port field of the packet filter.

Example

latencyMobileTrigger.FilterUdpSourcePortSet(4096)
ResultClear()

Resets the counter values to zero and empties the ResultHistory.

Example

latencyMobileTrigger.ResultClear()
ResultGet()

Returns the current result counters.

This method will return an object of LatencyBasicResultSnapshot. It will contain all the current Cumulative counters. To update the counters, call Refresh on this object.

Return type:

LatencyBasicResultSnapshot

Example

latencyMobileTrigger.ResultGet()
ResultHistoryGet()

Returns the current History counters.

This method returns a LatencyBasicResultHistory Object. This will contain the Cumulative and the Interval counters over time. Use this to create results over time.

Return type:

LatencyBasicResultHistory

Example

resultHistory = latencyMobileTrigger.ResultHistoryGet()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicMobileList(*args)

Bases: object

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicResultData(*args, **kwargs)

Bases: AbstractObject

Receive-side latency result set.

The result set contains the latency information of since the object is created or refreshed.

A basic trigger result data snapshot object can be created via a LatencyBasicResultHistory, using LatencyBasic.ResultHistoryGet

Note

The information is not updated until Refresh is called.

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

latencyTrigger = port.RxLatencyBasicAdd()
latencyTrigger.FilterSet('udp port 67')
#...
latencyResultData = latencyTrigger.ResultHistoryGet().CumulativeLatestGet()
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(latencyResultData.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(latencyResultData.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(latencyResultData.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

Return type:

int

New in version 2.3.0.

Example

This example gets interval duration of this result snapshot [NS]

print(latencyResultData.IntervalDurationGet())
JitterGet()

Gets the jitter [ns] measured in this snapshot.

Return type:

int

Example

This example gets the jitter measured in this snapshot

print(latencyResultData.JitterGet())
LatencyAverageGet()

Gets the average latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the average latency measured in this snapshot

print(latencyResultData.LatencyAverageGet())
LatencyMaximumGet()

Gets the maximum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the maximum latency measured in this snapshot

print(latencyResultData.LatencyMaximumGet())
LatencyMinimumGet()

Gets the minimum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the minimum latency measured in this snapshot

print(latencyResultData.LatencyMinimumGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(latencyResultData.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count of invalid packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(latencyResultData.PacketCountInvalidGet())
PacketCountValidGet()

Gets the received packet count of valid packets.

Return type:

int

Example

This example gets the received valid packet counter

print(latencyResultData.PacketCountValidGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(latencyResultData.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

 print(latencyResultData.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(latencyResultData.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicResultDataList(*args)

Bases: object

This is a List of multiple LatencyBasicResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side latency result history.

The history contains the latency information in time since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object.

Note

See History result for more information.

A basic latency result snapshot object can be created via a LatencyBasic, using LatencyBasic.ResultHistoryGet()

New in version 2.1.0.

Example

Receive all frames on “trunk-1-2” of some server

latencyTrigger = port.RxLatencyBasicAdd()
latency_historyResult.latencyTrigger.ResultHistoryGet()
Clear()

Clear the history.

With each Refresh, interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, you can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

Clear the History.

latency_historyResult.Clear()
CumulativeGet()

Returns a list of available cumulative counters.

Returns:

a list of LatencyBasicResultData objects

Return type:

LatencyBasicResultDataList

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

This example gets the available cumulative results

counterList = latency_historyResult.CumulativeGet()
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

cumulative counter object at the specified index

Return type:

LatencyBasicResultData

Example

This example gets the available cumulative counters at index 1

resultData = latency_historyResult.CumulativeGetByIndex(0)
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

LatencyBasicResultData

Example

This example gets the cumulative counter at timestamp 1432805398000000000 ns

result_data = latency_historyResult.CumulativeGetByTime(timestamp)
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.0.

Return type:

LatencyBasicResultData

Example

This example gets the latest closed Cumulative counter object

resultData = latency_historyResult.CumulativeLatestGet()
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(latency_historyResult.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Returns:

list of LatencyBasicResultData objects containing the Interval counters

Return type:

LatencyBasicResultDataList

Each result object contains interval counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

This example gets the available interval results

listInterval = latency_historyResult.IntervalGet()
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

LatencyBasicResultData

Example

This example gets the available interval counters at index 1

latencyData = latency_historyResult.IntervalGetByIndex(0)
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

LatencyBasicResultData

Example

This example gets the Interval counters at timestamp 1432805398000000000 ns

interval = latency_historyResult.IntervalGetByTime(timestamp)
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.0.

Return type:

LatencyBasicResultData

Example

This example gets the latest closed Interval counter object

interval = latency_historyResult.IntervalLatestGet()
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

print(latency_historyResult.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history was refreshed.

This is the timestamp on the server when the last time Refresh was called on this object.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

Example

This example gets the Refresh timestamp

print(latency_historyResult.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

Returns:

The length of the server sample buffer

Return type:

int

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

print(latency_historyResult.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

Parameters:

length (int) – Number of samples to keep in the server-side buffer

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

resultData = latency_historyResult.SamplingBufferLengthSet(6)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Return type:

int

Example

print(latency_historyResult.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

duration (int) – Duration in nanoseconds per sample

Warning

The previously collected history will be invalidated.

Example

latency_historyResult.SamplingIntervalDurationSet(1000000000)
property thisown

The membership flag

class byteblowerll.byteblower.LatencyBasicResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side latency result set.

Return type:

int

The result set contains the latency information of since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object

Note

See What’s new in API v2 for more information.

A basic latency result snapshot object can be created via a LatencyBasic, using LatencyBasic.ResultGet()

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

latencyTrigger = port.RxLatencyBasicAdd()
latency_result = latencyTrigger.ResultGet()
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(latency_result.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(latency_result.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(latency_result.FramesizeMaximumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(latency_result.IntervalDurationGet())
JitterGet()

Gets the jitter [ns] measured in this snapshot.

Return type:

int

The jitter is defined as the standard deviation of the measured latency.

Example

This example gets the jitter measured in this snapshot

print(latency_result.JitterGet())
LatencyAverageGet()

Gets the average latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the average latency measured in this snapshot

print(latency_result.LatencyAverageGet())
LatencyMaximumGet()

Gets the maximum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the maximum latency measured in this snapshot

print(latency_result.LatencyMaximumGet())
LatencyMinimumGet()

Gets the minimum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the minimum latency measured in this snapshot

print(latency_result.LatencyMinimumGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(latency_result.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count of invalid packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(latency_result.PacketCountInvalidGet())
PacketCountValidGet()

Gets the received packet count of valid packets.

Return type:

int

Example

This example gets the received valid packet counter

print(latency_result.PacketCountValidGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Example

print(latency_result.RefreshTimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(latency_result.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(latency_result.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(latency_result.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistribution(*args, **kwargs)

Bases: Latency

Receive-side packet processor which calculates distribution of latency on the incoming frames, matching a filter.

This latency distribution calculation is always active and starts processing frames as soon as it is created. Processing continues until the packet processor is destructed.

The transmit time stamp of a packet is obtained from a time tag in the frame. This tag is configured on the FrameTag.Tx, which can be obtained via :meth:.Frame.FrameTagTimeGet`.

Note

The initial (empty) filter string accepts all incoming frames. See FilterSet() for filtering information.

A latency distribution object can be created via a ByteBlowerPort, using ByteBlowerPort.RxLatencyDistributionAdd()

This packet processor processes frames received on the ByteBlower interface where its parent ByteBlowerPort is located.

Example

Receive all frames on “trunk-1-45” of some server, matching UDP source or destination port 49523.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
BucketCountGet()

Return the number of buckets which will count in the range.

Return type:

int

The bucket count is 1000 by default. When the range spans less than 1000ns, the number of buckets will be reduced.

BucketWidthGet()

Return the size of the of buckets which are in the range.

Return type:

int

The range is divided into a 1000 buckets. A bucket cannot be less than 1 nanosecond in size. When this would happen, the number of buckets is reduced accordingly.

FilterGet()

Returns the current installed BPF filter string.

Returns:

The current BPF filter string

Return type:

str

The filter string can be configured using FilterSet()

Example

Suppose we configured the trigger with filter string: where ipv4_1 and ipv4_2 are IPv4Configuration objects and frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

print(trigger.FilterGet())
FilterSet(inFilter)

Sets a BPF filter on a RX object.

Parameters:

bpf (str) – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ConfigError – When an invalid BPF filter string is given.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Example This will filter only UDP traffic. Set the filter on packets that match:

  • source and destination IPv4 address

  • UDP traffic with given destination and source UDP port

  • (layer2) frame length (without CRC!)

bpf_filter = 'ip dst {} and udp port {}'.format(dst_ip, udp_dest)
trigger.FilterSet(bpf_filter)
FrameTagSet(fromFrameTagTx)

Configure the FrameTag.Rx to match the given FrameTagTx.

New in version 1.8.18.

Parameters:

tag (FrameTagTx) – The FrameTagTx to obtain the metrics and format configuration from.

Raises:

ByteBlower.Server.NotSupported - Unsupported Server Capability: ‘Manage TX/RX Frame Tag placement’: When a transmitted frame tag with unsupported metrics and/or format is given.

Raises:

python_error - “FrameTag is of incorrect Type”: When a transmitted frame tag of invalid type is given (sequence vs. time)

This method takes a FrameTagTx and applies its metrics and format configuration on this trigger’s FrameTagRx.

Note

The transmitted frame tag type (sequence number, time stamp, …) must match the receiver frame tag type that is used for this trigger.

The transmitted frame tag (sequence number, timestamp) can be obtained from the Frame (Frame.FrameTagSequenceGet(), resp. Frame.FrameTagTimeGet())

Example

This example applies the transmitted time tag configuration on the receiver’s time tag:

   outOfSequence_trigger.FrameTagSet(frameTag)
RangeGet()

Returns the current configured range for the latency distribution.

Returns:

A tuple of the minimum and maximum value for the range.

Return type:

Int64Pair

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeGet())
RangeMaximumGet()

Returns the current configured maximum of range for the latency distribution.

Return type:

int

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeMaximumGet())
RangeMinimumGet()

Returns the current configured minimum of range for the latency distribution.

Return type:

int

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeMinimumGet())
RangeSet(rangeStartNs, rangeEndNs)

Configures the range for which the Latency Distribution will measure the latency and create a distribution.

Parameters:

range (Int64Pair) – A tuple consisting of the minimum and maximum value for the range. The unit is in nanoseconds. The Maximum value is excluded in the range.

Raises:

ConfigError – ‘LAT001’: When trying to configure an invalid range.

Default value: [0, 1s[

Note

Nanosecond resolution is supported for versions 1.8.24 and beyond (older versions only supported up to microsecond resolution).

Bug

An incorrect exception is thrown when an invalid range is given.

Example

This will set the range from 0 to 5seconds.

trigger.RangeSet(0, 100)
ResultClear()

Resets the counter values to zero.

Example

trigger.ResultClear()
ResultGet()

Returns the current result counters.

Return type:

LatencyDistributionResultSnapshot

Example

snapshot = trigger.ResultGet()
ResultHistoryGet()

Returns the current result counters over time.

Return type:

LatencyDistributionResultHistory

Example

latencyDistributionHistory = trigger.ResultHistoryGet()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionList(*args)

Bases: object

This is a List of multiple LatencyDistribution objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionMobile(*args, **kwargs)

Bases: Latency

Receive-side packet processor which calculates distribution of latency on the incoming frames, matching a filter.

New in version 2.13.0.

This latency distribution calculation is always active and starts processing frames as soon as it is created. Processing continues until the packet processor is destructed.

The transmit time stamp of a packet is obtained from a time tag in the frame. This tag is configured on the FrameTag.Tx, which can be obtained via :meth:.Frame.FrameTagTimeGet`.

A latency distribution object can be created via a WirelessEndpoint, using WirelessEndpoint.RxLatencyDistributionAdd()

This packet processor processes frames received on the ByteBlower interface where its parent WirelessEndpoint is located.

Example

Receive all frames on “trunk-1-45” of some server, matching UDP source or destination port 49523.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
wireless_endpoint = server.DeviceGet('aa-89bb54-c04')
trigger = wireless_endpoint.RxLatencyDistributionAdd()
# Do the rest of the test
# ...
result = trigger.ResultGet()
# parse the results
# ...
wireless_endpoint.RxLatencyDistributionRemove(trigger)
BucketCountGet()

Return the number of buckets which will count in the range.

Return type:

int

The bucket count is 1000 by default. When the range spans less than 1000ns, the number of buckets will be reduced.

BucketWidthGet()

Return the size of the of buckets which are in the range.

Return type:

int

The range is divided into a 1000 buckets. A bucket cannot be less than 1 nanosecond in size. When this would happen, the number of buckets is reduced accordingly.

DurationGet()

Returns the duration for which the trigger will be active.

Return type:

int

Example

print(latencyMobileTrigger.DurationGet())
DurationSet(inDuration)

Sets the duration for which the trigger will be active.

Parameters:

duration (int) – Duration in nanoseconds for which this trigger should listen

Configures how long the trigger will listen for incoming packets.

Example

Listen for 10 minutes

latencyMobileTrigger.DurationSet(10*1000000000)
FilterGet()

The BPF style filter based on the UDP source and destination configuration

Return type:

str

FilterSourceAddressGet()

Returns the source (source) address field of the packet filter.

Return type:

str

Example

print(trigger.FilterSourceAddressGet())
FilterSourceAddressSet(inAddress)

Sets the source (source) address field of the packet filter.

Parameters:

address (str) – Source IP address on which the Endpoint must filter.

Example

trigger.FilterSourceAddressSet('1.1.1.1')
FilterUdpDestinationPortGet()

Returns the destination (destination) port field of the packet filter.

Return type:

int

Example

print(trigger.FilterUdpDestinationPortGet())
FilterUdpDestinationPortSet(inPort)

Sets the destination (destination) port field of the packet filter.

Parameters:

port (int) – UDP destination port number on which the Endpoint must listen

Example

triggerMobile.FilterUdpDestinationPortSet(4096)
FilterUdpSourcePortGet()

Returns the source (source) port field of the packet filter.

Return type:

int

Example

print(trigger.FilterUdpSourcePortGet())
FilterUdpSourcePortSet(inPort)

Sets the source (source) port field of the packet filter.

Parameters:

port (int) – UDP source port number for which the Endpoint must listen

Example

triggerMobile.FilterUdpSourcePortSet(4096)
RangeGet()

Returns the current configured range for the latency distribution.

Returns:

A tuple of the minimum and maximum value for the range.

Return type:

Int64Pair

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeGet())
RangeMaximumGet()

Returns the current configured maximum of range for the latency distribution.

Return type:

int

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeMaximumGet())
RangeMinimumGet()

Returns the current configured minimum of range for the latency distribution.

Return type:

int

Example

Suppose the range has been configured for [0,750ms[

print(trigger.RangeMinimumGet())
RangeSet(rangeStartNs, rangeEndNs)

Configures the range for which the Latency Distribution will measure the latency and create a distribution.

Parameters:

range (Int64Pair) – A tuple consisting of the minimum and maximum value for the range. The unit is in nanoseconds. The Maximum value is excluded in the range.

Raises:

ConfigError – ‘LAT001’: When trying to configure an invalid range.

Default value: [0, 1s[

Bug

An incorrect exception is thrown when an invalid range is given.

Example

This will set the range from 0 to 5seconds.

trigger.RangeSet(0, 5000000000)
ResultClear()

Resets the counter values to zero.

Example

trigger.ResultClear()
ResultGet()

Returns the cumulative result.

Return type:

LatencyDistributionResultSnapshot

Example

print(trigger.ResultGet())
ResultHistoryGet()

Returns the interval and cumulative results over time..

New in version 2.20.0.

Return type:

LatencyDistributionResultHistory

Example

print(trigger.ResultHistoryGet())
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionMobileList(*args)

Bases: object

This is a List of multiple LatencyDistributionMobile objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionResultData(*args, **kwargs)

Bases: AbstractObject

The latency distribution result.

New in version 2.20.0.

BucketCountGet()

Returns the number of buckets in which the range is divided.

Return type:

int

Example

print(latencyDistributionSnapshot.BucketCountGet())
BucketWidthGet()

Returns the width in nanoseconds of a bucket.

Return type:

int

Example

print(latencyDistributionSnapshot.BucketWidthGet())
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(latencyDistributionSnapshot.ByteCountGet())
FramesizeMaximumGet()

Gets the largest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

print(latencyDistributionSnapshot.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the smallest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest frame size received in this snapshot.

print(latencyDistributionSnapshot.FramesizeMinimumGet())
IntervalDurationGet()

Returns the duration of this snapshot in nanoseconds

Return type:

int

Example

print(latencyDistributionSnapshot.IntervalDurationGet())
JitterGet()

Gets the jitter [ns] measured in this snapshot.

Return type:

int

Example

This example gets the jitter measured in this snapshot

print(latencyDistributionSnapshot.JitterGet())
LatencyAverageGet()

Gets the average latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the average latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyAverageGet())
LatencyMaximumGet()

Gets the maximum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the maximum latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyMaximumGet())
LatencyMinimumGet()

Gets the minimum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the minimum latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyMinimumGet())
PacketCountAboveMaximumGet()

Returns the number of packets arrived with a latency above the given range.

Return type:

int

Example

print(latencyDistributionSnapshot.PacketCountAboveMaximumGet())
PacketCountBelowMinimumGet()

Returns the number of packets arrived with a latency below the given range.

Return type:

int

Example

print(latencyDistributionSnapshot.PacketCountBelowMinimumGet())
PacketCountBucketsGet()

Returns the number of packets received per bucket.

Return type:

Int64List

Example

print(latencyDistributionSnapshot.PacketCountBucketsGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(latencyDistributionSnapshot.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count of invalid packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(latencyDistributionSnapshot.PacketCountInvalidGet())
PacketCountValidGet()

Gets the received packet count of valid packets.

Return type:

int

Example

This example gets the received valid packet counter

print(latencyDistributionSnapshot.PacketCountValidGet())
RangeMaximumGet()

Returns the exclusive maximum of the range configured.

Returns:

The lower bound of the configured range for this Latency Distribution

Return type:

int

Example

print(latencyDistributionSnapshot.RangeMaximumGet())
RangeMinimumGet()

Returns the inclusive minimum of the range configured.

Return type:

int

Returns:

The lower bound of the configured range on the LatencyDistribution object.

Example

print(latencyDistributionSnapshot.RangeMinimumGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(latencyDistributionSnapshot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(latencyDistributionSnapshot.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(latencyDistributionSnapshot.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionResultDataList(*args)

Bases: object

This is a List of multiple LatencyDistributionResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side latency result history.

The history contains the latency information in time since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object.

Note

See History result for more information

A basic latency result snapshot object can be created via a LatencyBasic, using LatencyBasic.ResultHistoryGet()

New in version 2.1.0.

Example

Receive all frames on “trunk-1-2” of some server

latencyTrigger = port.RxLatencyDistributionAdd()
latency_historyResult.latencyTrigger.ResultHistoryGet()
Clear()

Clear the history.

With each Refresh, interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, you can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

Clear the History.

latency_historyResult.Clear()
CumulativeCompletedGet()
CumulativeGet()

Returns a list of available cumulative counters.

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Returns:

a list of LatencyDistributionResultData objects

Return type:

LatencyDistributionResultDataList

Example

This example gets the available cumulative results

counterList = latency_historyResult.CumulativeGet()
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

cumulative counter object at the specified index

Return type:

LatencyDistributionResultData

Example

This example gets the available cumulative counters at index 1

resultData = latency_historyResult.CumulativeGetByIndex(0)
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp.

Parameters:

timestamp – timestamp in nanoseconds

Return type:

LatencyDistributionResultData

New in version 2.2.0.

Example

This example gets the cumulative counter at timestamp 1432805398000000000 ns

result_data = latency_historyResult.CumulativeGetByTime(timestamp)
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

Return type:

LatencyDistributionResultData

New in version 2.2.0.

Example

This example gets the latest closed Cumulative counter object

resultData = latency_historyResult.CumulativeLatestGet()
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Example

print(latency_historyResult.CumulativeLengthGet())
IntervalCompletedGet()
IntervalGet()

Returns a list of available interval results.

Each result object contains interval counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Returns:

list of LatencyDistributionResultData objects containing the Interval counters

Return type:

LatencyDistributionResultDataList

Example

This example gets the available interval results

listInterval = latency_historyResult.IntervalGet()
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

LatencyDistributionResultData

Example

This example gets the available interval counters at index 1

latencyData = latency_historyResult.IntervalGetByIndex(0)
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

LatencyDistributionResultData

New in version 2.2.0.

Example

This example gets the Interval counters at timestamp 1432805398000000000 ns

interval = latency_historyResult.IntervalGetByTime(timestamp)
IntervalLatestGet()

Returns the latest closed item of the interval list.

Return type:

LatencyDistributionResultData

New in version 2.2.0.

Example

This example gets the latest closed Interval counter object

Interval = latency_historyResult.IntervalLatestGet()
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Example

print(latency_historyResult.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history was refreshed.

This is the timestamp on the server when the last time Refresh was called on this object.

Returns:

Timestamp in nanoseconds since epoch

Example

This example gets the Refresh timestamp

print(latency_historyResult.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Returns:

The length of the server sample buffer

Example

print(latency_historyResult.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

New in version 2.3.0.

Example

resultData = latency_historyResult.SamplingBufferLengthSet(6)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Example

print(latency_historyResult.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

Warning

The previously collected history will be invalidated.

New in version 2.3.0.

Example

latency_historyResult.SamplingIntervalDurationSet(1000000000)
property thisown

The membership flag

class byteblowerll.byteblower.LatencyDistributionResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

The latency distribution result.

Note

The information is not updated until Refresh is called on this object

Note

See What’s new in API v2 for more information.

BucketCountGet()

Returns the number of buckets in which the range is divided.

Return type:

int

Example

print(latencyDistributionSnapshot.BucketCountGet())
BucketWidthGet()

Returns the width in nanoseconds of a bucket.

Return type:

int

Example

print(latencyDistributionSnapshot.BucketWidthGet())
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(latencyDistributionSnapshot.ByteCountGet())
FramesizeMaximumGet()

Gets the largest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

print(latencyDistributionSnapshot.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the smallest frame size received in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest frame size received in this snapshot.

print(latencyDistributionSnapshot.FramesizeMinimumGet())
JitterGet()

Gets the jitter [ns] measured in this snapshot.

Return type:

int

Example

This example gets the jitter measured in this snapshot

print(latencyDistributionSnapshot.JitterGet())
LatencyAverageGet()

Gets the average latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the average latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyAverageGet())
LatencyMaximumGet()

Gets the maximum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the maximum latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyMaximumGet())
LatencyMinimumGet()

Gets the minimum latency [ns] measured in this snapshot.

Return type:

int

Example

This example gets the minimum latency measured in this snapshot

print(latencyDistributionSnapshot.LatencyMinimumGet())
PacketCountAboveMaximumGet()

Returns the number of packets arrived with a latency above the given range.

Return type:

int

Example

print(latencyDistributionSnapshot.PacketCountAboveMaximumGet())
PacketCountBelowMinimumGet()

Returns the number of packets arrived with a latency below the given range.

Return type:

int

Example

print(latencyDistributionSnapshot.PacketCountBelowMinimumGet())
PacketCountBucketsGet()

Returns the number of packets received per bucket.

Return type:

Int64List

Example

print(latencyDistributionSnapshot.PacketCountBucketsGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(latencyDistributionSnapshot.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count of invalid packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(latencyDistributionSnapshot.PacketCountInvalidGet())
PacketCountValidGet()

Gets the received packet count of valid packets.

Return type:

int

Example

This example gets the received valid packet counter

print(latencyDistributionSnapshot.PacketCountValidGet())
RangeMaximumGet()

Returns the exclusive maximum of the range configured.

Returns:

The lower bound of the configured range for this Latency Distribution

Return type:

int

Example

print(latencyDistributionSnapshot.RangeMaximumGet())
RangeMinimumGet()

Returns the inclusive minimum of the range configured.

Return type:

int

Returns:

The lower bound of the configured range on the LatencyDistribution object.

Example

print(latencyDistributionSnapshot.RangeMinimumGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(latencyDistributionSnapshot.RefreshTimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(latencyDistributionSnapshot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(latencyDistributionSnapshot.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(latencyDistributionSnapshot.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.Layer25Configuration(*args, **kwargs)

Bases: AbstractObject

Base class for the allowed Layer2.5 configuration objects

property thisown

The membership flag

class byteblowerll.byteblower.Layer25PPPoEList(*args)

Bases: object

This is a List of multiple PPPoEClient objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.Layer25VlanList(*args)

Bases: object

This is a List of multiple VLANTag objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.Layer2Configuration(*args, **kwargs)

Bases: AbstractObject

Base class for the allowed Layer2 configuration objects

property thisown

The membership flag

class byteblowerll.byteblower.Layer3Configuration(*args, **kwargs)

Bases: AbstractObject

Base class for the allowed Layer3 configuration objects

property thisown

The membership flag

class byteblowerll.byteblower.LinkStatus

Bases: object

Link status object

Offline = 0

The ByteBlower interface is offline

Online = 1

The ByteBlower interface is fully up and running

Unknown = 3

The ByteBlower Interface has an unknown status.

Unplugged = 2

The ByteBlower Interface is not plugged in

class byteblowerll.byteblower.LinkType

Bases: object

Ethernet = 0
USB = 1
class byteblowerll.byteblower.LogLevel

Bases: object

Critical = 4
Debug = 0
Error = 3
Info = 1
Warning = 2
class byteblowerll.byteblower.MLDMulticastListenerSession(*args, **kwargs)

Bases: SchedulableObject

MulticastAddressGet()

Returns the Multicast IPv6 address for which this session exists.

Return type:

str

SessionInfoDestroy(inMulticastListenerSessionInfo)

Cleanup the session info.

Parameters:

session (MLDMulticastListenerSessionInfo) – Session to remove.

SessionInfoGet()
Return type:

MLDMulticastListenerSessionInfo

VersionGet()
Return type:

MLDVersion

property thisown

The membership flag

class byteblowerll.byteblower.MLDMulticastListenerSessionInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

RefreshTimestampGet()

Retuns the timestamp when the info was last refreshed.

Returns:

RefreshTimestamp in nanoseconds

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RxGet()

Returns the number of received MLD messages by this session.

Returns:

Number of MLD messages received

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RxListenerQueriesGet()

Returns the number of received MLD queries by this session.

Returns:

Number of MLD v1 queries received

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RxVersion1ListenerReportsGet()

Returns the number of received MLD v1 Listener reports by this session.

Returns:

Number of MLD v1 Listener reports received

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
TxGet()

Returns the number of transmitted MLD messages by this session.

Returns:

Number of MLD messages Transmitted

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
TxVersion1ListenerDonesGet()

Returns the number of received MLD V1 Listeners done by this session.

Returns:

Number of transmitted MLD v1 Listener dones

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
TxVersion1ListenerReportsGet()

Returns the number of transmitted MLD V1 reports by this session.

Returns:

Number of transmitted MLD v1 reports

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
TxVersion2ListenerReportsGet()

Returns the number of received MLD queries by this session.

Returns:

Number of transmitted MLD v2 Listener reports

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
property thisown

The membership flag

class byteblowerll.byteblower.MLDProtocol(*args, **kwargs)

Bases: AbstractObject

The Multicast Listener Discovery Protocol (MLD) Protocol for IPv6 manages multicast address listening for a given IPv6 host.

This class support two MLD Protocol versions:

MLDv1

RFC 2710

MLDv2

RFC 3810.

Version 2 of MLD adds support for ‘source filtering’, that is, the ability for a system to report interest in receiving packets only from specific source addresses, or from all but specific source addresses, sent to a particular multicast address. That information may be used by multicast routing protocols to avoid delivering multicast packets from specific sources to networks where there are no interested receivers.

ProtocolInfoDestroy(inMLDProtocolInfo)

Removes/Destroys the MLD protocol statistics

Parameters:

info (MLDProtocolInfo) – ProtocolInfo object to destroy

This will invalidate the MLDProtocolInfo object given. One should not try to access the destroyed object.

ProtocolInfoGet()

Gets the MLD protocol statistics

Return type:

MLDProtocolInfo

SessionDestroy(*args)

Returns the active list of MLD sessions.

Parameters:

session (MLDv1MulticastListenerSession | MLDv2MulticastListenerSession) – Session to destroy

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

Returns the active list of MLD sessions.

Parameters:

session (MLDv1MulticastListenerSession | MLDv2MulticastListenerSession) – Session to destroy

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
SessionV1Add(inMulticastAddress)

Create a MLDv1 session.

Return type:

MLDv1MulticastListenerSession

Example

SessionV2Add(inMulticastAddress)

Create a MLDv2 session.

Return type:

MLDv2MulticastListenerSession

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
property thisown

The membership flag

class byteblowerll.byteblower.MLDProtocolInfo(*args, **kwargs)

Bases: AbstractRefreshableResult

This object contains MLD statistics

RefreshTimestampGet()

Returns the timestamp on the server when the statistics were refreshed.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

This is the timestamp on the server when the last time Refresh was called on this object.

RxGet()

The number of MLD messages received

Return type:

int

RxListenerQueriesGet()

The number of MLD Listener Queries received

Return type:

int

RxListenerReportsGet()

The number of MLD Listener Reports received

Return type:

int

RxVersion1ListenerDonesGet()

The number of MLDv1 Listener Done messages received

Return type:

int

RxVersion1ListenerQueriesGet()

The number of MLDv1 Listener Query messages received

Return type:

int

RxVersion1ListenerReportsGet()

The number of MLDv1 Listener Report messages received

Return type:

int

RxVersion2ListenerQueriesGet()

The number of MLDv2 Listener Query messages received

Return type:

int

RxVersion2ListenerReportsGet()

The number of MLDv2 Listener Report messages received

Return type:

int

TxGet()
TxListenerReportsGet()
TxVersion1ListenerDonesGet()

The number of MLDv1 Listener Done messages transmitted

Return type:

int

TxVersion1ListenerReportsGet()

The number of MLDv1 Listener Report messages transmitted

Return type:

int

TxVersion2ListenerReportsGet()

The number of MLDv2 Listener Report messages transmitted

Return type:

int

property thisown

The membership flag

class byteblowerll.byteblower.MLDVersion

Bases: object

MLDv1 = 1
MLDv2 = 2
byteblowerll.byteblower.MLDVersionToString(inMLDVersion)
class byteblowerll.byteblower.MLDv1MulticastListenerSession(*args, **kwargs)

Bases: MLDMulticastListenerSession

ListeningStart()

Starts listening for this Multicast session

ListeningStop()

Stops listening for this Multicast session

property thisown

The membership flag

class byteblowerll.byteblower.MLDv1StartListening(arg2)

Bases: object

property thisown

The membership flag

class byteblowerll.byteblower.MLDv1StopListening(arg2)

Bases: object

property thisown

The membership flag

class byteblowerll.byteblower.MLDv2IPMulticastListen(arg2)

Bases: object

MulticastSourcesGet()
MulticastSourcesSet(sourceList)
SourceFilterGet()
SourceFilterSet(filter)
property thisown

The membership flag

class byteblowerll.byteblower.MLDv2MulticastListenerSession(*args, **kwargs)

Bases: MLDMulticastListenerSession

MulticastListen(inSourceFilter, inSourceList)
Parameters:
  • sourceFilter (MulticastSourceFilter) – Will the source list be included or excluded?

  • sourceList (StringList) – List of addresses to include or exclude

SourceFilterModeGet()
Return type:

MulticastSourceFilter

SourceListGet()
Return type:

StringList

property thisown

The membership flag

class byteblowerll.byteblower.MeetingPoint(*args, **kwargs)

Bases: AbstractObject

A MeetingPoint is a server that controls a set of ByteBlower Endpoints.

ByteBlower Endpoints can connect to a MeetingPoint by using the ByteBlower Endpoint App.

Example

Typical usage flow
instance = ByteBlower.InstanceGet()

meetingpoint = instance.MeetingPointAdd('byteblower-1.byteblower.com')

device = meetingpoint.DeviceGet('1234-1345-123')

stream = device.TxStreamAdd()
# ...

device.Lock(True)
device.Prepare()
# ...
DeviceDestroy(device)

Destroys the representation for a given Endpoint object.

Parameters:

endpoint (WirelessEndpoint) – Endpoint to release

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
endpoint = meetingpoint.DeviceGet('1189-456dad-45654')

meetingpoint.DeviceDestroy(endpoint)

# the endpoint variable is invalid now
del(endpoint)
DeviceGet(mobileDeviceId)

Returns the Endpoint that matches the given Endpoint UUID.

Parameters:

endpoint_uuid (str) – The UUID of the ByteBlower Endpoint to fetch.

Returns:

The ByteBlower Endpoint proxy object for the Endpoint identified by the given UUID

Return type:

WirelessEndpoint

Raises:

ConfigError – When no Endpoint is known with the given UUID

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
endpoint = meetingpoint.DeviceGet('1189-456dad-45654')
DeviceIdentifiersGet()

Returns the list of device identifiers of the Endpoints connected to the MeetingPoint.

Returns:

A list of device identifiers

Return type:

StringList

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
device_list = meetingpoint.DeviceIdentifiersGet()
DeviceListGet()

Returns the list of devices that are connected to the MeetingPoint.

Returns:

A list with all known WirelessEndpoints

Return type:

WirelessEndpointList

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
endpointlist = meetingpoint.DeviceListGet()
for endpoint in endpointlist:
    print(endpoint.DescriptionGet())
DeviceListLengthGet()

Returns the number of devices that are connected to the MeetingPoint.

Return type:

int

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
meetingpoint.DeviceListLengthGet()
DevicesPrepare(inDevices)

Prepare all the given ByteBlower Endpoints.

Parameters:

endpoints (WirelessEndpointList) – a list of Endpoints to start.

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
device_1 = meetingpoint.DeviceGet('123-123-1')
device_2 = meetingpoint.DeviceGet('123-123-2')

device_list = WirelessEndpointList()
device_list.append(device_1)
device_list.append(device_2)

meetingpoint.device_list()
DevicesPrepareAsync(inDevices)

Prepares all the given ByteBlower Endpoints.

Parameters:

endpoints (WirelessEndpointList) – A list of ByteBlower Endpoints to prepare.

After the MeetingPoint is informed about the wish to prepare the endpoints the API directly returns. Call DevicesPrepare() to wait until all devices are prepared.

Example

Prepare a set of ByteBlower Endpoints at once.
meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
device_1 = meetingpoint.DeviceGet('123-123-1')
device_2 = meetingpoint.DeviceGet('123-123-2')

device_list = WirelessEndpointList()
device_list.append(device_1)
device_list.append(device_2)

meetingpoint.DevicesPrepareAsync(device_list)

# do something else
# ...

# Wait for the preparation to complete...
meetingpoint.DevicesPrepare(device_list)

# ... continue
DevicesStart(inDevices)

Starts all the given ByteBlower Endpoints.

Parameters:

endpoints (WirelessEndpointList) – a list on which to start the traffic, triggers and HTTPClients

Returns:

Timestamp when the Endpoints will start in nanoseconds since epoch

Return type:

int

The timestamp returned is in the clock domain of the ByteBlower MeetingPoint. In order to correctly compare the timestamps, one should compare it with the value returnd by TimestampGet().

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
device_1 = meetingpoint.DeviceGet('123-123-1')
device_2 = meetingpoint.DeviceGet('123-123-2')

# Configure the devices
#...

device_list = WirelessEndpointList()
device_list.append(device_1)
device_list.append(device_2)

start_time meetingpoint.DevicesStart(device_list)
DevicesStartAll()

Starts all the known ByteBlower Endpoints.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

The timestamp returned is in the clock domain of the ByteBlower MeetingPoint. In order to correctly compare the timestamps, one should compare it with the value returnd by TimestampGet().

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
# Configure some Endpoints
# ...
start_time = meetingpoint.DevicesStartAll()
ResultsRefreshAll()

Refreshes all configured objects on this MeetingPoint.

Refreshing will transfer all known data from the ByteBlower MeetingPoint towards this API instance.

Note

This will not request the results to be transferred from ByteBlower Endpoints to the ByteBlower MeetingPoint.

ServiceInfoGet()

Returns the service information of the MeetingPoint daemon.

New in version 2.6.0.

Returns:

An object representing the service information

Return type:

MeetingPointServiceInfo

Example

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
info = meetingpoint.ServiceInfoGet()
print(info.DescriptionGet())
TimestampGet()

Returns the current timestamp on the server.

Returns:

Timestamp in nanoseconds since epoch.

Return type:

int

New in version 2.3.0.

Retrieves the current timestamp of the server in nanoseconds. This can be used to calculate the offset between two servers to compare results.

Example

Get the current time from a MeetingPoint
meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
print(meetingpoint.TimestampGet())
# Returns 1432805398000000000
UsersGet()

Shows which ByteBlower Endpoints of the (shared) MeetingPoint are currently used by which clients.

Returns:

A list of UserMobile objects

Return type:

UserMobileList

This method gives an overview of how a MeetingPoint is currently used. It displays which client connections (whether from GUI scenario runs or API sessions) have created WirelessEndpoint objects.

Such a client connection to a meetingpoint is represented by this very MeetingPoint type! As soon as some client instance (e.g. a Tcl shell or a GUI) on some client computer creates such meetingpoint object, a connection is established to that shared server.

Multiple client instances can be active on the same host. For example, a single host may be running a GUI scenario, two Tcl scripts and an interactive Tcl session at the same time. Similarly, a single client instance may have multiple parallel connections to the same server, by calling ByteBlower.MeetingPointAdd() multiple times for the same server URL or IP.

Client connections are identified by the client’s hostname. This means that all server connections from all client instances on a single host will all be different ‘users’, but will have the same string representation. If they use the same ByteBlower Endpoints, that hostname will simply appear multiple times.

As soon as a specific MeetingPoint (representing a client connection) creates a first WirelessEndpoint, it is ‘using’ that WirelessEndpoint. The MeetingPoint is no longer used when all ByteBlower Endpoints created by that server on it are destroyed. Ports can be destroyed in the following ways:

  • Explicitly, by calling DeviceDestroy().

  • By destroying the MeetingPoint for that port. This is also what happens when a GUI finishes or cancels a scenario.

  • By destroying that client instances root ByteBlower object. This is also what happens when a client process (GUI or API) is killed.

Example

Assume three client instances are currently connected to this server. The first runs on John’s PC, the second runs on Jane’s PC and the last one is a second client instance connecting John’s PC. Note the non-trunking interface is used by multiple client instances!

meetingpoint = byteblower_instance.MeetingPointAdd('byteblower-1.byteblower.com')
users = meetingpoint.UsersGet()
property thisown

The membership flag

class byteblowerll.byteblower.MeetingPointLicense(*args, **kwargs)

Bases: AbstractObject

This class represents the license information of the connected MeetingPoint.

New in version 2.6.0.

The license is configured onto the security hardware at installation or during a license upgrade procedure. It contains information about allowed features and persistence of the license.

Example

Querying the MeetingPoint license through the API.
from byteblowerll import byteblower as api

api_instance = api.ByteBlower.InstanceGet()
meetingpoint = api_instance.MeetingPointAdd('byteblower-1.excentis.com')
service_info = meetingpoint.ServiceInfoGet()

license_info = service_info.LicenseGet()

print(license_info.DescriptionGet())
NumberOfWirelessEndpointsGet()

The maximum number of ByteBlower Endpoints that can be used simultaneously

Returns:

number of ByteBlower Endpoints

Return type:

int

An Endpoint is considered being in use when it is owned by an API instance. This is typically the case when the Endpoint is being prepared to run a test.

print(meetingpointLicense.NumberOfWirelessEndpointsGet())
SerialGet()

Retrieves the serial number of the security module.

Returns:

The serial number of the ByteBlower security module.

Return type:

str

The Security Serial number is one of the unique identifiers for a ByteBlower Server chassis. When reaching out to ByteBlower Support, this number might be requested the query regards the ByteBlower server.

Example

print(meetingpointLicense.SerialGet())
TimeAllowedGet()

The number of minutes the MeetingPoint can run on the license.

Returns:

Number of minutes the MeetingPoint can run.

Return type:

int

If the value is set to 4294967295, the license is permanent and the number should be treated as infinity. The TimeUsed counter will not increase.

Example

print(meetingpointLicense.TimeAllowedGet())
TimeConsumedGet()

The number of minutes the MeetingPoint has run on the license.

Returns:

Number of minutes the MeetingPoint has used of the maximum allowed

Return type:

int

This value has only a meaning when the license is a temporary (demo) license.

Example

print(meetingpointLicense.TimeConsumedGet())
VersionGet()

Retrieves the version number of the MeetingPoint license

Returns:

the version of the license

Return type:

int

To support more features, the license formats can change. In order to differentiate between the formats, this version number is used.

Example

print(meetingpointLicense.VersionGet())
property thisown

The membership flag

class byteblowerll.byteblower.MeetingPointList(*args)

Bases: object

This is a List of multiple MeetingPoint objects.

It can be iterated just like a normal Python list.

append(x)
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.MeetingPointServiceInfo(*args, **kwargs)

Bases: ServiceInfo

This class contains information on the MeetingPoint System.

With this object you can get information concerning the Type / version / IP or hostname etc… information.

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(service_info.DescriptionGet())

New in version 2.6.0.

ConnectionHostGet()

Returns the host (either registered name or IP address) used to connect to the MeetingPoint.

Return type:

str

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(service_info.ConnectionHostGet())
ConnectionIPAddressGet()

Returns the MeetingPoint management IP address used in this connection

Return type:

str

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.ConnectionIPAddressGet())
ConnectionPortNumberGet()

Returns the TCP port number of the MeetingPoint service daemon.

Returns:

The TCP Port number used by the daemon

Return type:

int

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.ConnectionPortNumberGet())
LicenseGet()

Returns a license object for the MeetingPoint.

Return type:

MeetingPointLicense

Each physical ByteBlower Meetingpoint (represented by this type of object) has a specific ByteBlower License.

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
license = meetingpointService.LicenseGet()
print(license.DescriptionGet())
ManagementIPAddressGet()

Returns all management IP addresses of the MeetingPoint.

Returns:

List of management IP addresses

Return type:

StringList

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.ManagementIPAddressGet()[0])
property thisown

The membership flag

exception byteblowerll.byteblower.MeetingPointUnreachable(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.ModifierType

Bases: object

GrowingSize = 0
MultiBurst = 2
NormalDistributionTiming = 3
RandomSize = 1
byteblowerll.byteblower.MulticastFilterToString(inMulticastFilter)
class byteblowerll.byteblower.MulticastSourceFilter

Bases: object

Exclude = 0
Include = 1
class byteblowerll.byteblower.MultipleBurstModifier(*args, **kwargs)

Bases: AbstractModifier

BurstSizeGet()

Retrieves the number of frames in one burst.

Returns:

Returns the number of frames in one burst

Return type:

int

Example

retrieve the burstsize
from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
BurstSizeSet(inBurstSize)

Sets the number of frames to send in one burst.

Parameters:

burstsize – the size of the burst

Example

Set the burstsize to 100
from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
InterBurstGapGet()

Returns the time (ns) between the end of start of the next burst.

Return type:

int

Example

Get the gap between 2 bursts
from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
InterBurstGapSet(inInterBurstGap)

Sets the time (ns) between the end of one burst and the start of the next burst.

Parameters:

interburstgap (int) – The gap between 2 burst in ns

Example

Set the gap at 1ms
from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Set the gap at 10ms
from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfo(*args, **kwargs)

Bases: AbstractObject

Network information of the Endpoint.

New in version 2.6.0.

Contains all usefull network information of an Endpoint

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
for interface in networkInfo.InterfacesGet():
    print(interface.DescriptionGet())
BSSIDGet()

Returns the BSSID

Deprecated since version 2.16.0.

Return type:

str

This is the first BSSID discovered by the endpoint. If your device has more than 1 connected wireless interface. One of these will be shown here

If you want to see the others, please use InterfaceGet()

See: NetworkInterface.WiFiBssidGet

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.BSSIDGet())
IPv4Get()

Returns a list of IPv4 addresses.

Deprecated since version 2.16.0.

Return type:

StringList

This is a convenient method that will return the list of IPv4 addresses of the first interface. If you want the IP of a specific interface use the InterfaceGet() method to retrieve them.

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.IPv4Get()[0])
IPv6GlobalGet()

Returns a list of IPv6 global addresses.

Deprecated since version 2.16.0.

Return type:

StringList

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.IPv6GlobalGet()[0])
IPv6LinkLocalGet()

Returns a list of IPv6 linklocal addresses.

Deprecated since version 2.16.0.

Return type:

StringList

This is a convenient method to get a list of the IPv6 linkLocal addresses. If your ByteBlower Endpoint has 2 active interfaces, only the first will be returned. One can use InterfaceGet() to retrieve the interfaces

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.IPv6LinkLocalGet()[0])
InterfaceGet()

Returns a list of NetworkInterfaces

This list contains all the NetworkInterfaces detected on the device. Be aware that there are more networkinterfaces than you would expect.

Returns:

a list of NetworkInterface objects

Return type:

NetworkInterfaceList

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.InterfaceGet()[0].NameGet())
SSIDGet()

Returns the SSID

Deprecated since version 2.16.0.

Return type:

str

This is the first SSID discovered by the endpoint. If your device has more than 1 connected wireless interface. One of these will be shown here

If you want to see the others, please use InterfaceGet()

See: NetworkInterface.WiFiSsidGet

Example

endpoint = meetingpoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812')
deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoGet()
print(networkInfo.SSIDGet())
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfoMonitor(*args, **kwargs)

Bases: AbstractObject

Monitor to collect the NetworkInfo over time

New in version 2.11.0.

Example

deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoMonitorAdd()
ResultHistoryGet()

Returns the result history of the network monitor

Returns:

The history object for the network monitor

Return type:

NetworkInfoMonitorResultHistory

Example

print(monitor.ResultHistoryGet().DescriptionGet())
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfoMonitorList(*args)

Bases: object

This is a List of multiple NetworkInfoMonitor objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfoMonitorResultData(*args, **kwargs)

Bases: AbstractObject

Result snapshot for the network information.

New in version 2.11.0.

Example

deviceInfo = endpoint.DeviceInfoGet()
monitor = deviceInfo.NetworkInfoMonitorAdd()
history = monitor.ResultHistoryGet()
for item in history.IntervalGet():
    print(item.DescriptionGet())
InterfaceGet()

Returns a list of network interfaces available on the device

Returns:

List of network interfaces

Return type:

NetworkInfoMonitorResultList

Example

     interfaces = interval.InterfacesGet()
     for interface in interfaces:
         print(interface.DescriptionGet()
IntervalDurationGet()

Duration in nanoseconds of the interval

Returns:

Duration in nanoseconds

Return type:

int

Example

     print(interval.IntervalDurationGet())
TimestampGet()

Time in nanoseconds when the data was retrieved

Returns:

Timestamp

Return type:

int

Example

print(interval.TimestampGet())
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfoMonitorResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

History for the network info monitor representing the results over time

New in version 2.11.0.

Example

deviceInfo = endpoint.DeviceInfoGet()
networkInfo = deviceInfo.NetworkInfoMonitorAdd()
history = networkInfo.ResultHistoryGet()
print(history.DescriptionGet())
Clear()

Clears all results of the monitor

Example

history.Clear()
IntervalGet()

Returns the collected intervals

Returns:

A list of the collected NetworkInfoMonitorResultData objects

Return type:

NetworkInfoMonitorResultList

Example

history.Refresh()
for interval in history.IntervalGet():
    print(interval.DescriptionGet())
IntervalGetByIndex(index)

Return an interval as specified by the index in the list

Parameters:

index (int) – number of the index in the list

Raises:

DomainError – When the index is out of range

Returns:

The specified interval snapshot

Return type:

NetworkInfoMonitorResultData

Example

history.Refresh()
interval = history.IntervalGetByIndex(1):
     print(interval.DescriptionGet())
IntervalGetByTime(timestamp)

Return an interval as specified by the timestamp it was created

Parameters:

timestamp (int) – A timestamp in nanoseconds rounded to the second

Raises:

DomainError – When the timestamp is out of range

Returns:

The specified interval snapshot

Return type:

NetworkInfoMonitorResultData

Example

history.Refresh()
interval = history.IntervalGetByTime(1568194819000000000):
     print(interval.DescriptionGet())
IntervalLatestGet()

Return the last interval snapshot created

Returns:

The specified interval snapshot

Return type:

NetworkInfoMonitorResultData

Example

history.Refresh()
interval = history.IntervalLatestGet():
     print(interval.DescriptionGet())
IntervalLengthGet()

Returns the number of collected interval snapshots

Returns:

number of interval snapshots

Return type:

int

Example

history.Refresh()
     print(history.IntervalLengthGet())
RefreshTimestampGet()

Time in nanoseconds when the data was last retrieved

Returns:

Timestamp

Return type:

int

Example

history.Refresh()
print(history.RefreshTimestampGet())
SamplingIntervalDurationGet()

Returns the duration of one result interval

Returns:

The duration in nanoseconds

Return type:

int

Example

print(history.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one result interval

Parameters:

duration (int) – The duration in nanoseconds (default: 1 second)

Example

history.SamplingIntervalDurationSet(2000000000)
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInfoMonitorResultList(*args)

Bases: object

This is a List of multiple NetworkInfoMonitorResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInterface(*args, **kwargs)

Bases: AbstractObject

NetworkInterface information of the ByteBlower Endpoint.

Represents a network interface of a endpoint.

New in version 2.6.0.

Example

deviceInfo = endpoint.DeviceInfoGet()
etworkInfo = deviceInfo.NetworkInfoGet()
networkInterface = networkInfo.InterfaceGet()[0]
DisplayNameGet()

Returns the display name of the interface.

Return type:

str

Example

print(networkInterface.DisplayNameGet())
IPv4Get()

Returns a list of IPv4 addresses of this interface.

Return type:

StringList

Example

print(networkInterface.IPv4Get())
IPv6GlobalGet()

Returns a list of the Global IPv6 addresses of this interface.

Returns:

a list of IPv6 global IP addresses

Return type:

StringList

Example

print(networkInterface.IPv6GlobalGet())
IPv6LinkLocalGet()

Returns a list of the LinkLocal addresses of this interface.

Return type:

StringList

Example

print(networkInterface.IPv6LinkLocalGet())
MacGet()

Returns the MAC address of the interface.

Return type:

str

On some platforms (e.g. iOS) this isn’t allowed so the NULL MAC address will be returned (00:00:00:00:00:00).

When the Endpoint application is not allowed to query this information due to the permission not granted, the returned MAC address might be the address: 02:00:00:00:00:00

Example

print(networkInterface.MacGet())
NameGet()

Returns the name of the interface.

Return type:

str

Example

print(networkInterface.NameGet())
SpeedGet()

Returns the announced maximum speed of the interface

Returns:

The link speed of the network interface in bits/s

Return type:

int

When the interface is down or does not have a link speed, this method will return -1.

If the interface is a Wi-Fi interface with an active connection, the transmit speed as given by WiFiTxRateGet() will be returned.

Example

print(networkInterface.SpeedGet())
# prints e.g. 1000000000
TypeGet()

Returns the type of a network interface.

Returns:

The type of the network interface

Return type:

NetworkInterfaceType

This can be used to distinguish e.g. Wi-Fi interfaces from others

Example

print(networkInterface.TypeGet() == NetworkInterfaceType.WiFi)
WiFiBssidGet()

Returns the BSSID of the current Wi-Fi connection

Returns:

The BSSID of the network interface in colon-delimited format

Return type:

str

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return the NULL MAC- address (00:00:00:00:00:00)

When the location permission is not granted to the Endpoint application, the system can return the BSSID address of 02:00:00:00:00:00 Example

print(networkInterface.WiFiBssidGet())
# prints e.g. 00:bb:1b:00:12:22
WiFiChannelGet()

Returns the channel of the current Wi-Fi connection

Returns:

The channel of the network interface

Return type:

int

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return -1

Example

print(networkInterface.WiFiChannelGet())
# prints e.g. 9
WiFiRssiGet()

Returns the RSSI of the current Wi-Fi connection

Returns:

The RSSI of the network interface in dBm

Return type:

int

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return -127

Example

print(networkInterface.WiFiRssiGet())
# prints e.g. -67
WiFiRxRateGet()

Returns the announced maximum receive speed of the current Wi-Fi connection

Returns:

The maximum receive speed of the network interface in bits/s

Return type:

int

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return -1

Example

print(networkInterface.WiFiRxRateGet())
# prints e.g. 54000000
WiFiSsidGet()

Returns the SSID of the current Wi-Fi connection

Returns:

The SSID of the network interface

Return type:

str

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return an empty string

Example

print(networkInterface.WiFiSsidGet())
# Prints e.g. MyFavoriteNetwork
WiFiTxRateGet()

Returns the announced maximum transmit speed of the current Wi-Fi connection

Returns:

The maximum transmit speed of the network interface in bits/s

Return type:

int

When the interface is not a Wi-Fi interface or when the interface is not connected to a wireless network, the method will return -1

Example

print(networkInterface.WiFiTxRateGet())
# prints e.g. 54000000
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInterfaceList(*args)

Bases: object

This is a List of multiple NetworkInterface objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.NetworkInterfaceType

Bases: object

Ethernet = 2

The interface is a typical 802.3 wired ethernet interface

Loopback = 1

The interface is a (software) loopback interface

Unknown = 0
WiFi = 3

The interface uses the IEEE 802.11 protocol family

byteblowerll.byteblower.NetworkInterfaceTypeToString(t)
class byteblowerll.byteblower.NormalDistributionTimingModifier(*args, **kwargs)

Bases: AbstractModifier

VarianceGet()

Retrieves the variance of the normal distribution

Returns:

Returns the number of frames in one burst

Return type:

int

VarianceSet(inVariance)

Sets the variance of the normal distribution

Parameters:

variance (int) – the number of frames in one burst

property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequence(*args, **kwargs)

Bases: TaggedRx

Receive-side packet processor which checks out-of-sequence on the incoming frames, matching a filter.

This out-of-sequence detection is always active and starts processing frames as soon as it is created. Processing continues until the packet processor is destructed.

The sequence number of a packet is obtained from an out-of-sequence tag in the frame. This tag is configured on the FrameTagTx, which can be obtained via Frame.FrameTagSequenceGet().

Note

The initial (empty) filter string accepts all incoming frames. See FilterSet() for filtering information.

A basic out-of-sequence object can be created via a ByteBlowerPort, using ByteBlowerPort.RxOutOfSequenceBasicAdd()

This packet processor processes frames received on the ByteBlower interface where its parent ByteBlowerPort is located.

Example

Receive all frames on “trunk-1-33” of some server, matching UDP source or destination port 123.

outOfSequence_trigger = port.RxOutOfSequenceBasicAdd()
outOfSequence_trigger.FilterSet('udp port 4096')
FilterGet()

Returns the current installed BPF filter string.

Returns:

The current BPF filter string

Return type:

str

The filter string can be configured using FilterSet()

Example

Suppose we configured the trigger with filter string: where $ipv4_1 and $ipv4_2 are IPv4Configuration objects and $frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

print(outOfSequence_trigger.FilterGet())
FilterSet(arg2)

Sets a BPF filter on a RX object.

Parameters:

bpf (str) – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ConfigError – When an invalid BPF filter string is given.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Example

This will filter only UDP traffic. Set the filter on packets that match:

  • source and destination IPv4 address

  • UDP traffic with given destination and source UDP port

  • (layer2) frame length (without CRC!)

outOfSequence_trigger.FilterSet('ip dst 1.1.1.1 and udp port 4096')
ResultClear()

Resets the counter values to zero and empties the ResultHistory.

Example

resultHistory = outOfSequence_trigger.ResultClear()
ResultGet()

Returns the current accumulated trigger results.

Returns:

The current cumulative snapshot contianing the latest counters.

Return type:

OutOfSequenceResultSnapshot

Example

print(outOfSequence_trigger.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the history of the results.

Returns:

The history is returned containing the cumulative and interval trigger counters of the last 5 seconds.

Return type:

OutOfSequenceResultHistory

Example

resultHistory = outOfSequence_trigger.ResultHistoryGet()
property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequenceList(*args)

Bases: object

This is a List of multiple OutOfSequence objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequenceResultData(*args, **kwargs)

Bases: AbstractObject

Non-refreshable object containing the out-of-sequence results.

BiggestSequenceNumberGapGet()

Gets the largest burst of consecutive missing packets for this snapshot.

New in version 2.21.0.

Return type:

int

ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(outOfSequenceresultData.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(outOfSequenceresultData.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(outOfSequenceresultData.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(outOfSequenceresultData.IntervalDurationGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(outOfSequenceresultData.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count for the invalid/corrupted packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(outOfSequenceresultData.PacketCountInvalidGet())
PacketCountMissingGet()

Gets the number of missing packets (missing sequence numbers) in this snapshot.

New in version 2.21.0.

Return type:

int

This can be used as an indicator of packet loss.

PacketCountOutOfSequenceGet()

Gets the received packet count which were out of sequence.

Return type:

int

Example

This example gets the received out of sequence packet counter

print(outOfSequenceresultData.PacketCountOutOfSequenceGet())
PacketCountValidGet()

Gets the received packet count which for packets which were not corrupted.

Return type:

int

Example

This example gets the valid packet counter

print(outOfSequenceresultData.PacketCountValidGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(outOfSequenceresultData.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(outOfSequenceresultData.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(outOfSequenceresultData.PacketCountGet())
property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequenceResultDataList(*args)

Bases: object

This is a List of multiple OutOfSequenceResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequenceResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side out-of-sequence result history.

New in version 2.1.0.

Note

The information is not updated until Refresh is called on this object.

Note

See History result for more information

A OutOfSequence history result object can be created via a OutOfSequence, using OutOfSequence.ResultHistoryGet()

Example

Receive all frames and check sequence on “trunk-1-2” of some server, matching UDP source or destination port 67.

outOfSequence_trigger = port.RxOutOfSequenceBasicAdd()
outOfSequence_trigger.FilterSet('udp port 4096')
#...
outOfSequenceHistoryResult= outOfSequence_trigger.ResultHistoryGet()
Clear()

Clear the history.

With each Refresh interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, you can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

Clear the History.

outOfSequenceHistoryResult.Clear()
CumulativeGet()

Returns a list of available cumulative counters.

Returns:

list of OutOfSequenceResultData containing the Cumulative counters

Return type:

OutOfSequenceResultDataList

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

This example gets the available cumulative results

print(outOfSequenceHistoryResult.CumulativeGet()[0].DescriptionGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

cumulative counter object at the specified index

Return type:

OutOfSequenceResultData

Example This example gets the available cumulative counters at index 1

print(outOfSequenceHistoryResult.CumulativeGetByIndex(0).DescriptionGet())
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

OutOfSequenceResultData

Example

This example gets the cumulative counter at timestamp 1432805398000000000 ns

print(outOfSequenceHistoryResult.CumulativeGetByTime(1432805398000000000).DescriptionGet())
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.0.

Return type:

OutOfSequenceResultData

Example

This example gets the latest closed Cumulative counter object

print(outOfSequenceHistoryResult.CumulativeLatestGet().DescriptionGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(outOfSequenceHistoryResult.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Each result object contains interval counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Returns:

a list of OutOfSequenceResultData containing the Interval counters

Return type:

OutOfSequenceResultDataList

Example

This example gets the available interval results

print(outOfSequenceHistoryResult.IntervalGet()[0].DescriptionGet())
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

OutOfSequenceResultData

Example

This example gets the available interval counters at index 1

print(outOfSequenceHistoryResult.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

OutOfSequenceResultData

New in version 2.2.0.

Example

This example gets the Interval counters at timestamp 1432805398000000000 ns

interval = outOfSequenceHistoryResult.IntervalGetByTime(1432805398000000000)
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.0.

Return type:

OutOfSequenceResultData

Example

This example gets the latest closed Interval counter object

print(outOfSequenceHistoryResult.IntervalLatestGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

     print(outOfSequenceHistoryResult.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history was refreshed.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

This is the timestamp on the server when the last time Refresh was called on this object.

Example

This example gets the Refresh timestamp

print(outOfSequenceHistoryResult.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Returns:

The length of the server sample buffer

Example

print(outOfSequenceHistoryResult.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

outOfSequenceHistoryResult.SamplingBufferLengthGet(6)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Return type:

int

Example

   print(outOfSequenceHistoryResult.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

interval (int) – Duration of a sample in nanosconds

Warning

The previously collected history will be invalidated.

Example

print(outOfSequenceHistoryResult.SamplingIntervalDurationSet(1000000000))
property thisown

The membership flag

class byteblowerll.byteblower.OutOfSequenceResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Refreshable object containing the out-of-sequence results.

BiggestSequenceNumberGapGet()

Gets the largest burst of consecutive missing packets for this snapshot.

New in version 2.21.0.

Return type:

int

ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(outOfSequenceResult.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(outOfSequenceResult.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.6.4.

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(outOfSequenceResult.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(outOfSequenceResult.IntervalDurationGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(outOfSequenceResult.PacketCountGet())
PacketCountInvalidGet()

Gets the received packet count for the invalid/corrupted packets.

Return type:

int

Example

This example gets the received invalid packet counter

print(outOfSequenceResult.PacketCountInvalidGet())
PacketCountMissingGet()

Gets the number of missing packets (missing sequence numbers) in this snapshot.

New in version 2.21.0.

Return type:

int

This can be used as an indicator of packet loss.

PacketCountOutOfSequenceGet()

Gets the received packet count which were out of sequence.

Return type:

int

Example

This example gets the received out of sequence packet counter

print(outOfSequenceResult.PacketCountOutOfSequenceGet())
PacketCountValidGet()

Gets the received packet count for packets which were not corrupted.

Return type:

int

Example

This example gets the valid packet counter

print(outOfSequenceResult.PacketCountValidGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(outOfSequenceResult.RefreshTimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(outOfSequenceResult.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(outOfSequenceResult.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(outOfSequenceResult.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.PAPProtocol(*args, **kwargs)

Bases: PPPAuthProtocol

Represents the Password Authentication Protocol

PPP defines an extensible Link Control Protocol, which allows negotiation of an Authentication Protocol for authenticating its peer before allowing Network Layer protocols to transmit over the link.

This class provides the Password Authentication protocol as described per RFC 1334, section 2

The Password Authentication Protocol (PAP) provides a simple method for the peer to establish its identity using a 2-way handshake. This is done only upon initial link establishment.

After the Link Establishment phase is complete, an Id/Password pair is repeatedly sent by the peer to the authenticator until authentication is acknowledged or the connection is terminated.

PAP is not a strong authentication method. Passwords are sent over the circuit “ in the clear “, and there is no protection from playback or repeated trial and error attacks. The peer is in control of the frequency and timing of the attempts.

By default, authentication is not mandatory. If authentication of the link is desired, an implementation MUST specify the Authentication-Protocol Configuration Option during Link Establishment phase.

New in version 2.5.0.

GetPPPProtocol(*args)
PasswordGet()

Returns the configured password.

Returns:

password

Return type:

str

Todo

Real Example

PasswordSet(inPassword)

Configures the password on the Password authentication Protocol ( PAP )

The password will be transmitted plaintext over the wire.

Parameters:

password (str) – The password for the given Peer-ID

Todo

Real Example

PeerIDGet()

Returns the configured Peer-ID.

Returns:

peerID

Example

Todo

Real Example

PeerIDSet(inUserId)

Configures the Peer-ID on the Password authentication Protocol ( PAP )

Parameters:

peerID – The new Peer-ID

Todo

Real Example

property thisown

The membership flag

class byteblowerll.byteblower.PAPProtocolList(*args)

Bases: object

append(x)
assign(n, x)
back()
begin()
capacity()
clear()
empty()
end()
erase(*args)
front()
get_allocator()
insert(*args)
iterator()
pop()
pop_back()
push_back(x)
rbegin()
rend()
reserve(n)
resize(*args)
size()
swap(v)
property thisown

The membership flag

class byteblowerll.byteblower.PPPAuthProtocol(*args, **kwargs)

Bases: AbstractObject

property thisown

The membership flag

class byteblowerll.byteblower.PPPNetworkControlProtocol(*args, **kwargs)

Bases: AbstractObject

property thisown

The membership flag

class byteblowerll.byteblower.PPPProtocol(*args, **kwargs)

Bases: AbstractObject

The Point-to-Point Protocol (PPP) provides a standard method for transporting multi-protocol datagrams over point-to-point links. PPP is comprised of three main components:

  1. A method for encapsulating multi-protocol datagrams.

  2. A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.

  3. A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols.

The implementation is conform RFC 1661.

New in version 2.5.0.

AuthProtocolChapAdd()

This method will add the Challenge-handshake Authentication Protocol.

Return type:

CHAPProtocol

AuthProtocolChapGet()

This method will return the current configured Challenge-Handshake Authentication Protocols.

Return type:

CHAPProtocolList

AuthProtocolPapAdd()

This method will add the Password Authentication Protocol.

Return type:

PAPProtocol

AuthProtocolPapGet()

This method will return the current configured Password Authentication Protocols.

Return type:

PAPProtocolList

NcpIpcpAdd()

This method will add support for an IPv6 Control Protocol.

IPCP is the Internet Protocol Control Protocol.

Returns:

The IPCP NCP object is returned. The object types is Layer2.Ppp.NetworkControl.Ipcp.

Example

Todo

Real Example

NcpIpcpGet()

This method will return the current configured Internet Protocol Control Protocols (IPCP).

Return type:

IPv4CPProtocol

Example

Todo

Real Example

NcpIpv6cpAdd()

This method will add support for an IPv4 Control Protocol.

IPv6CP is the Internet Protocol Control Protocol for IPv6.

Return type:

IPv6CPProtocol

Example

Todo

Real Example

NcpIpv6cpGet()

This method will return the current configured IPv6 Control Protocols (IPv6CP).

Return type:

IPv6CPProtocol

Todo

Real Example

PortGet(*args)
property thisown

The membership flag

class byteblowerll.byteblower.PPPoEClient(*args, **kwargs)

Bases: Layer25Configuration

A PPPoE client which allows you to setup Layer3 connectivity.

PPP over Ethernet (PPPoE) provides the ability to connect a network of hosts over a simple bridging access device to a remote Access Concentrator.

The client implements the PPPoE protocol as per RFC 2516.

The associated PPP Protocol has support for multiple authentication protocols. Layer3 connectivity includes IPv4 and IPv6 .

New in version 2.5.0.

PppGet()

Returns the associated PPP Protocol object.

Returns the PPP ( Point-to-Point ) Protocol which is transmitted over Ethernet ( PPPoE ). Through this object, you can configure the AuthProtocol.

Return type:

PPPProtocol

Example

# TODO
ServerGet()
ServiceNameGet()

This method will return the Requested Service Name for the PPPoE client.

Returns:

PPPoE Service Name which the client requests.

Return type:

str

Todo

Real Example

ServiceNameSet(inServiceName)

This method will set the Requested Service Name for the PPPoE client.

Parameters:

serviceName (str) – PPPoE Service Name which the client requests.

Example

Todo

Real Example

SessionIdGet()

This method will return the PPPoE SessionID of the last started PPPoE Session.

Returns:

False if No session started yet, else the PPPoE SessionID of the last started session.

Start()

This will Start the PPPoE client.

This method will start the PPPoE session, setup PPP, authenticate using the configured authentication protocol and setup the currently configured network control protocols.

Raises:

SessionUnavailable - When something unexpectedly happened during PPPoE session initiation.

Raises:

LinkEstablishmentTimeout - When PPP network layer was not configured within reasonable timeout.

Returns:

PPPoE Session ID

Todo

Real Example

StartAsync()

Starts the PPPoE client.

This call will initiate the start of the PPPoE client but will not wait for the result.

StatusGet()

Returns the current status of the PPPoE connection.

Possible states are:

Initial

PPPoE not yet started

Discovering

PPPoE discovery message sent

Requesting

PPPoE request sent

SessionActive

PPPoE session is active

Terminated

PPPoE session has been terminated

Returns:

Current PPPoE Status

Example

# TODO
Terminate()

This will Terminate the PPPoE client.

Termination will properly terminate all PPPoE and PPP related protocols, from higher-layers to lower-layers, starting from the network control protocol (i.e. IPCP or IPv6CP ).

property thisown

The membership flag

class byteblowerll.byteblower.PPPoEStatus

Bases: object

Discovering = 1
Initial = 0
Requesting = 2
SessionActive = 3
Terminated = 4
class byteblowerll.byteblower.PacketDump(*args, **kwargs)

Bases: AbstractObject

Utility for dumping ByteBlower network traffic to a pcap file.

A PacketDump object is created for a ByteBlower interface and can be configured with a BPF filter and a maximum snapshot length.

Example

packetDump = interface.PacketDumpCreate()
packetDump.Start('packetDump.pcap')
while (packetDump.FileSizeGet()) < 1000000000:
    time.sleep(10)
packetDump.Stop()
FileNameGet()

Returns file name of the target pcap file.

Return type:

str

 print(packetDump.FileNameGet())
FileSizeGet()

Returns current size of the target pcap file.

Returns:

The current size of the captured file in bytes.

Return type:

int

 print(packetDump.FileSizeGet())
FilterGet()

Returns the BPF filter.

Return type:

str

Example

 print(packetDump.FilterGet())
FilterSet(value)

Configures a BPF filter so that only packets that match the filter will be captured.

Parameters:

filter (str) – BPF filter

Example

 packetDump.FilterSet('udp port 4096')
SnapshotLengthGet()

Returns the maximum number of bytes that can be captured for each packet.

Return type:

int

Example

 print(packetDump.SnapshotLengthGet())
SnapshotLengthSet(value)

Configure the maximum number of bytes that can be captured for each packet.

Parameters:

length (int) – Maximum number of bytes per captured packet

 packetDump.SnapshotLengthSet(100000)
Start(filename)

Start capturing packets.

Parameters:

filename – Location of where the pcap file should be stored.

Note

if the file already existsit will be overwritten.

 packetDump.Start('packetDump.pcap')
Stop()

Stop capturing packets.

 packetDump.Stop()
property thisown

The membership flag

byteblowerll.byteblower.ParseEthernetEncoding(inEthernetEncoding)
byteblowerll.byteblower.ParseHTTPRequestMethodFromString(inHTTPRequestMethod)
byteblowerll.byteblower.ParseHTTPRequestStatusFromString(inStr)
byteblowerll.byteblower.ParseHTTPRequestTypeFromString(s)
byteblowerll.byteblower.ParseIGMPVersion(inIGMPVersion)
byteblowerll.byteblower.ParseLinkStatus(arg1)
byteblowerll.byteblower.ParseLinkType(arg1)
byteblowerll.byteblower.ParseMLDVersion(inMLDVersion)
byteblowerll.byteblower.ParseMulticastFilter(inMulticastFilter)
byteblowerll.byteblower.ParsePhysicalInterfaceType(inString)
byteblowerll.byteblower.ParseRequestStartType(inStr)
byteblowerll.byteblower.ParseTCPCongestionAvoidanceAlgorithmFromString(inValue)
byteblowerll.byteblower.ParseTCPConnectionStateFromString(inState)
byteblowerll.byteblower.ParseTimeUnitFromString(arg1)
class byteblowerll.byteblower.PhysicalInterface(*args, **kwargs)

Bases: AbstractObject

ByteBlowerInterfaceCountGet()

Returns the number of ByteBlower Interfaces on this Physical Interface

Return type:

int

ByteBlowerInterfaceGet()

Returns ByteBlower Interfaces on this Physical Interface

Return type:

ByteBlowerInterfaceList

IdGet()

Returns the ID for this Physical Interface

Return type:

int

LinkStatusGet()

Returns the physical link status of this Physical Interface

Return type:

LinkStatus

LinkTypeGet()

Returns the physical link type of this Physical Interface

Return type:

LinkType

MacAddressGet()

Returns the MAC Address of this Physical Interface

Return type:

str

NameGet()
ProductNameGet()

Returns the ProductName of the NIC on the server

Return type:

str

TypeGet()

Returns the name for this Physical Interface

Return type:

PhysicalInterfaceType

VendorNameGet()

Returns the VendorName of the NIC on the server

Return type:

str

property thisown

The membership flag

class byteblowerll.byteblower.PhysicalInterfaceList(*args)

Bases: object

This is a List of multiple PhysicalInterface objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.PhysicalInterfaceType

Bases: object

NonTrunk = 1
NonTrunkUSB = 2
Trunk = 0
exception byteblowerll.byteblower.PortNumberAlreadyUsed(*args)

Bases: ConfigError

property thisown

The membership flag

class byteblowerll.byteblower.RequestStartType

Bases: object

Direct = 0

Send out the HTTP Request as soon the HTTP Client is started

Scheduled = 1

Only start the HTTP Request when the port or schedule is started

exception byteblowerll.byteblower.ResponseTimeout(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.ResultDataType

Bases: object

Cumulative = 0
Interval = 1
class byteblowerll.byteblower.RetransmissionPolicy

Bases: object

FixedTiming = 2

Every DHCP retry will use the same timout value

RfcSuggested = 1

The retransmission algorithm used is the one from RFC 2131

Unknown = 0
class byteblowerll.byteblower.Role

Bases: object

Client = 0

The HTTP Session info object originates from a HTTP Client

Server = 1

The HTTP Session info object originates from a HTTP Server

exception byteblowerll.byteblower.RouterRequired(*args)

Bases: InitializationError

property thisown

The membership flag

exception byteblowerll.byteblower.RouterSolicitationFailed(*args)

Bases: InitializationError

property thisown

The membership flag

class byteblowerll.byteblower.Rx(*args, **kwargs)

Bases: AbstractObject

Base class for Frame blasting receive side triggers.

property thisown

The membership flag

class byteblowerll.byteblower.SchedulableObject(*args, **kwargs)

Bases: AbstractObject

ScheduleGet()
ScheduleRemove(inSchedule)
ScheduleRemoveAll()
ScheduleStart()
ScheduleStop()
ServerGet()
property thisown

The membership flag

class byteblowerll.byteblower.Schedule(*args, **kwargs)

Bases: AbstractObject

This class contains the base functionality to configure a scheduled action.

InitialTimeToWaitGet()

Returns the time when the action is scheduled. This time is set using InitialTimeToWaitSet() At that time, the first frame will be sent.

Returns:

The initial time to wait in nanoseconds.

Return type:

int

InitialTimeToWaitSet(ns)

Sets the time when the action will be scheduled. That is, when the first frame will be sent.

Parameters:

time (int) – The time when the action will be scheduled. Valid range: 0 to max_uint64 [ns]

Sets the initial time to wait before the first frame will be sent. By default, the unit has a nanosecond resolution. But you can also provide a time unit.

The schedule can be started using Start()

Example

Set the initial time to wait to 9 nanoseconds
schedule.InitialTimeToWaitSet(9)
Prepare()

This method will prepare all the schedule, but NOT start it.

Example

Preparing the schedule

schedule.Prepare()
Start()

Starts the scheduled action.

The first packet will be sent after the initial time to wait.

Stop()

Stops the running scheduled action.

If the action has not been started, nothing will happen.

property thisown

The membership flag

class byteblowerll.byteblower.ScheduleGroup(*args, **kwargs)

Bases: AbstractObject

A collection of schedulable objects that can be started.

Schedulable items are:

  • HTTPClient

  • ICMPEchoSession

  • ICMPv6EchoSession

  • Igmp Join

  • Igmp Leave

  • Igmp IpMulticastListen

  • Mld StartListening

  • Mld StopListening

  • Mld Ipv6MulticastListen

  • Stream

Example

remove all members from the group

scheduleGroup = bbInstance.ScheduleGroupCreate()
scheduleGroup.MembersAdd(httpClient)
MembersAdd(*args)

This method will add a Schedulable object to the ScheduleGroup.

Parameters:

schedulableObject (Schedule | HTTPClient | Stream) – The schedule to add to the ScheduleGroup.

Example

add a HTTPClient to the group

scheduleGroup.MembersAdd(igmp)

Example

add multiple schedulable objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

This method will add a Schedulable object to the ScheduleGroup.

Parameters:

schedulableObject (Schedule | HTTPClient | Stream) – The schedule to add to the ScheduleGroup.

Example

add a HTTPClient to the group

scheduleGroup.MembersAdd(igmp)

Example

add multiple schedulable objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

This method will add a Schedulable object to the ScheduleGroup.

Parameters:

schedulableObject (Schedule | HTTPClient | Stream) – The schedule to add to the ScheduleGroup.

Example

add a HTTPClient to the group

scheduleGroup.MembersAdd(igmp)

Example

add multiple schedulable objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
MembersClear()

This method will remove all members from the schedulegroup.

Example

remove all members from the group

scheduleGroup.MembersClear()
MembersGet()

Returns a list of ToopOIDs of the members of this group.

Returns:

List of schedulable objects in order of addition. Possible empty. Their individual object types depend on the types used in MembersAdd():

Return type:

AbstractObjectList

Example

return the ObjectID of the members

print(scheduleGroup.MembersGet()[0].DescriptionGet())
MembersLengthGet()

This method returns the number of members in the scheduleGroup.

Returns:

Size of memberlist

Return type:

int

Example

add a HTTPClient to the group

print(scheduleGroup.MembersLengthGet())
MembersRemove(*args)

This method will remove s SchedulableObject from the group.

Parameters:

object (Schedule | GroupSchedulableObject | HTTPClient | Stream) – The object which will be removed from this group.

Example

Removing an IGMP from a ScheduleGroup
scheduleGroup.MembersRemove(igmp)

Example

remove multiple objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

This method will remove s SchedulableObject from the group.

Parameters:

object (Schedule | GroupSchedulableObject | HTTPClient | Stream) – The object which will be removed from this group.

Example

Removing an IGMP from a ScheduleGroup
scheduleGroup.MembersRemove(igmp)

Example

remove multiple objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

This method will remove s SchedulableObject from the group.

Parameters:

object (Schedule | GroupSchedulableObject | HTTPClient | Stream) – The object which will be removed from this group.

Example

Removing an IGMP from a ScheduleGroup
scheduleGroup.MembersRemove(igmp)

Example

remove multiple objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO

This method will remove s SchedulableObject from the group.

Parameters:

object (Schedule | GroupSchedulableObject | HTTPClient | Stream) – The object which will be removed from this group.

Example

Removing an IGMP from a ScheduleGroup
scheduleGroup.MembersRemove(igmp)

Example

remove multiple objects at once

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Prepare()

This method will prepare all the schedules, but NOT start them.

Raises:

If - one of the Schedules fail to prepare, the others are canceled and an exception is thrown. This exception will contain onformation about the object which caused it.

Example

Preparing the scheduleGroup

scheduleGroup.Prepare()
Start()

Start the schedules.

The Schedules must be in the prepared state.

Raises:

ConfigError – ScheduleNotPrepared The schedulegroup must be prepared before it can be started.

Example

Start the ScheduleGroup

scheduleGroup.Start()
StatusGet()

Returns the status of the ScheduleGroup.

Returns:

The status

Return type:

ScheduleGroupStatus

Example

Start the scheduleGroup

print(scheduleGroup.StatusGet())
Stop()

This method will stop the schedules.

Raises:

ConfigError – ScheduleNotRunning One can only stop a schedule that is running.

Example

Stop the scheduleGroup

scheduleGroup.stop()
property thisown

The membership flag

class byteblowerll.byteblower.ScheduleGroupList(*args)

Bases: object

This is a List of multiple ScheduleGroup objects.

It can be iterated just like a normal Python list.

append(x)
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.ScheduleGroupStatus

Bases: object

Configuration = 0
Error = 4
Prepared = 1
Started = 2
Stopped = 3
class byteblowerll.byteblower.ScheduleList(*args)

Bases: object

This is a List of multiple Schedule objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.SequenceNumberFormat

Bases: object

SequenceNumber_0 = 0
SequenceNumber_0_CRC = 1
class byteblowerll.byteblower.ServiceInfo(*args, **kwargs)

Bases: AbstractObject

This class is an abstract base class to hold specific ServiceInfo objects

MachineIDGet()

Returns a unique identifier for the machine where the connected service runs on.

:rtype:str

The machineID is a unique ID for the machine (the physical server), and generated at install time. If the server is re-installed, a new ID will be generated.

If both a ByteBlower Server and ByteBlower MeetingPoint service are running on the same physical server, this call will return the same ID.

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(service_info.MachineIDGet())
SeriesGet()

Returns the series of the connected chassis.

Returns:

A string ‘<X>’, where <X> is the series value (e.g. 1000).

Return type:

str

Note

For a ByteBlower MeetingPoint, this method will always return “1000”

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.SeriesGet())
ServiceIDGet()

Returns a unique service identifier for the connected service.

Return type:

str

The serviceID is a unique ID for the service and is generated when the service boots for the first time. If one doesn’t re-install the system, the ID will be the same. It’s persistent across reboots. A physical server can have other services running. With this ID one can identify each service and together with the MachineID one can see if those services are running on the same Physical Server.

Both the ByteBlower Server and ByteBlower MeetingPoint service do have a ServiceID, which are different from each other.

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(service_info.ServiceIDGet())
TypeGet()

Retrieves the type of the ByteBlower service.

Returns:

The ByteBlower service type

Return type:

str

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.TypeGet())
# prints "MeetingPoint"
VersionGet()

Returns the software version of the connected service daemon.

Return type:

str

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
service_info = meetingpoint.ServiceInfoGet()
print(meetingpointService.VersionGet())
property thisown

The membership flag

class byteblowerll.byteblower.Stream(*args, **kwargs)

Bases: AbstractObject

A ByteBlower stream is an object representing a stream of ByteBlower frames (Frame) used for transmission on a ByteBlower port.

A ByteBlower stream contains the following data:

Frames

A list of Frame objects

NumberOfFrames

The number of frames the stream should transmit

InterFrameGap

The interval between 2 transmitted frames

InitialTimeToWait

An initial time to wait, if needed

TimingModifier

A timing modifier

Example

A typical stream usage flow
stream = port.TxStreamAdd()
stream.NumberOfFramesSet(1000)
stream.InterFrameGapSet(1000000)

frame = stream.FrameAdd()
# Configure the frame ...

stream.Start()
FrameAdd()

Adds a frame to the stream.

Returns:

The freshly added frame

Return type:

Frame

Example

This example adds a frame to a stream.

Add a frame to the stream.
frame = stream.FrameAdd()
FrameDestroy(inFrame)

Removes a frame from the stream

Parameters:

frame (Frame) – The frame object to remove

Example

Iterate over the added frames and print their description
stream.FrameDestroy(frame1)
FrameGet()

Returns list of frames on this stream.

Returns:

A list of added Frame objects.

Return type:

FrameList

Example

Iterate over the added frames and print their description
for frame in stream.FrameGet():
    print(frame.DescriptionGet())
GrowingSizeModifierAdd()

Adds a Growing Size modifier to the stream

Deprecated since version 2.3.0: This is deprecated. Please use Frame.ModifierSizeGrowingSet()

Returns:

The freshly created growing size modifier

Return type:

StreamGrowingSizeModifier

Note

The name for this function is actually wrong. A new size modifier will replace existing size modifiers

InitialTimeToWaitGet()

Returns the time to wait before the first frame will be sent.

Returns:

The initial time to wait in nanoseconds.

Return type:

int

Example

This example gets the current initial time to wait from a stream.

Print the initial time to wait for a stream
print(stream.InitialTimeToWaitGet())
InitialTimeToWaitSet(initTimeToWait)

Sets a delay before sending the first frame.

Parameters:

duration (int) – The duration in nanoseconds

Example

sets initial time to wait to 2 seconds
stream.InitialTimeToWaitSet(wait)
InterFrameGapGet()

Returns the inter-frame gap for the stream.

Returns:

The inter-frame gap is returned in nanoseconds.

Return type:

int

Example

print the inter frame gap of the stream
print(stream.InterFrameGapGet())
InterFrameGapSet(interFrameGap)

Sets the inter-frame gap for the stream.

Parameters:

duration (int) – Duration in nanoseconds

Example

This example sets the inter-frame gap on a stream.

Configure the stream to send 10 frames per second
stream.InterFrameGapSet(inter_frame_gap)
ModifierFrameDestroy()

Destroys a frame modifier (e.g. size-modfier).

Parameters:

modifier (StreamGrowingSizeModifier|StreamRandomSizeModifier) – Modifier to remove

ModifierFrameGet()

Gets the configured frame modifier

Returns:

The current frame modifier.

Return type:

StreamGrowingSizeModifier|StreamRandomSizeModifier

ModifierTimingDestroy()

Removes a timing modifier

Parameters:

modifier (NormalDistributionTimingModifier | MultipleBurstModifier) – Modifier to remove

ModifierTimingGet()

Gets the configured timing modifier

Returns:

Configured timing modifier

Return type:

NormalDistributionTimingModifier | MultipleBurstModifier

MultipleBurstModifierAdd()

Sets a burst modifier on the stream.

Returns:

The freshly created modifier

Return type:

MultipleBurstModifier

This timing modifier will cause the stream to send bursty traffic. See MultipleBurstModifier for configurable parameters.

Note

The actual name of this method is wrong, a new modifier will remove a previous one.

NormalDistributionTimingModifierAdd()

Sets a normal distribution modifier on the stream.

Returns:

The freshly created modifier

Return type:

NormalDistributionTimingModifier

See NormalDistributionTimingModifier for configurable parameters.

Note

The actual name of this method is wrong, a new modifier will remove a previous one.

Example

prints the number of frames configured on the stream.
normalDistribution = port.NormalDistributionTimingModifierAdd()
NumberOfFramesGet()

Gets the configured number of frames the stream needs to transmit

Returns:

The configured number of frames

Return type:

int

Example

prints the number of frames configured on the stream.
print(stream.NumberOfFramesGet())
NumberOfFramesSet(nof)

Sets the number of frames the stream needs to transmit.

This defines the number of frames a stream will send. -1 means continues.

Parameters:

count (int) – The number of frames to set. Use -1 to send infinitely.

Note

when count is set -1, keep in mind to stop the stream using Stop()

Example

This example sets the frame count of the stream.

Set the number frames to transmit to 1000
stream.NumberOfFramesAdd(1000)
RandomSizeModifierAdd()

Adds a Random Size modifier to the stream

Deprecated since version 2.3.0: This is deprecated. Please use Frame.ModifierSizeRandomSet()

Note

The name for this function is actually wrong. A new size modifier will replace existing size modifiers

Returns:

The freshly created random size modifier

Return type:

StreamRandomSizeModifier

ResultClear()

Resets the current result counters to zero and empties the ResultHistory.

New in version 2.1.0.

Calling this method causes the StreamResultSnapshot and the StreamResultHistory to be reset.

All counters will be set to zero and all historic data in the history will be removed.

Example

shows how ResultClear() affects the results from ResultGet()
stream.ResultClear()
ResultGet()

Returns the current result counters.

Returns:

The current cumulative stream result counters

Return type:

StreamResultSnapshot

Example

print(stream.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the current History counters.

Return type:

StreamResultHistory

Example

print(stream.ResultHistoryGet().DescriptionGet())
Start()

Starts the stream.

The stream will be started when this method is called. This will also cause the results for the stream and attached frames to be cleared. The objects of the types below will thus be cleared.

Example

stream.Start()
StatusGet()

Returns status information.

Return type:

StreamRuntimeStatus

Example

stream.StatusGet()
Stop()

Stops the stream.

Example

stream.Stop()
property thisown

The membership flag

class byteblowerll.byteblower.StreamGrowingSizeModifier(*args, **kwargs)

Bases: object

A frame size modifier which will increase the size of the frame between a minimum and maximum value.

ByteBlower allows different modifiers on a flow. Some modifiers work on the timing parameters of a frame, others on the size or content. The StreamGrowingSizeModifier is a modifier which modifies the size of the frames added to the Stream on which this Modifier is added.

A StreamGrowingSizeModifier will increment the frame size with a configured amount of bytes. The following parameters can be configured:

Minimum size

the minimum frame size. This size will be used when the Stream is started.

Maximum size

the maximum frame size. It this limit isreached, the modifier will return to the minimum size again.

Step size

the amount of bytes the size will increase. By default, a frame will grow with one byte but this parameter allows larger step sizes.

Iteration

this paramter defines the number of times the same frame size is iterated before increasing to the next frame size.

So, a stream with a StreamModifierGrowingSize installed, will start sending frames with a <Minimum size> size, will send this size <Iteration> times, increase the size with <Step size> bytes until the <Maximum size> is reached.

If the maximum size is reached, the next size is calculated as follows:

<next size> = <Minimum size>
  • ( <current size> + <Step size> - <Maximum size> )

All sizes define a frame size, excluding the 4 bytes Ethernet checksum.

The frame size modifier will change the sizes of the Frames added to the stream. It the original frame size is longer, the size will truncated to the requested frame size. If automatic checksum calculations have been enabled on the Frame, they will be recalculated. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

If the original frame size of a Frame is too short, the Frame will be padded with zero-value bytes.

If multiple frames are added to a TxStream which is configured with a StreamModifierGrowingSize, the frames are sent alternately, while the modifier is applied on all of them. E.g.

{Frame A , size X}, {Frame B, size X}, {Frame A, size X+1}, {Frame B, size X+1}, …

Note

It is possible that the maximum size is never reached. Depending on both the <Step size> and the TxStream configuration (NumberOfFrames), the maximum size will never be used.

IterationGet()

Method to get the current configured iteration.

Returns:

The iteration which will be used for a growing size flow.

Example

This example show how to retrieve the current iteration.

print(growingSizeModifier.IterationGet())
IterationSet(inIteration)

Sets the number of times the same frame size will be used.

A Frame can be sent with the same frame size multiple times before the size is increased to the next value. This parameter defines the iteration count.

Parameters:

iteration – Number of times the same frame size will be used before the frame size is increased to the next value. Default: 1

Example

This example demonstrates an iteration of 10, before going to the next frame size.

growingSizeModifier.IterationSet(10)
MaximumGet()

Method to get the current configured maximum frame size.

Returns:

The maximum frame size which will be used for a growing size flow.

Example

This example show how to retrieve the current maximum frame size.

print(growingSizeModifier.MaximumGet())
MaximumSet(inMaxSize)

Sets the maximum size of a Frame of a growing size flow. This defines the maximum frame size of the stream.

Parameters:

maximum – Maximum byte length of the Frame. This value must be at least 61 bytes, and maximum 8192. The value must also be bigger than the <Minimum size> configured. Default: 1514

Raises:

python_error - Maximum too big or too small.

Example

This example will set the maximum frame size to 128 bytes.

growingSizeModifier.MaximumSet(128)
MinimumGet()

Method to get the current configured minimum frame size.

Returns:

The minimum frame size which will be used for a growing size flow.

Example

This example show how to retrieve the current minimum frame size.

print(growingSizeModifier.MinimumGet())
MinimumSet(inMinSize)

Sets the Minimum size of a Frame of a growing size flow.

This defines the minimal frame size of the stream. This frame size will be used when a Tx.Stream is started.

Parameters:

minimum – Minimum byte length of the Frame. This value must be at least 60 bytes, and maximum 8191. The value must also be less than the <Maximum size> configured. Default: 60

Raises:

python_error: Minimum too small or too big.

Example

This example will set the minimum frame size to 128 bytes.

print(growingSizeModifier.MinimumSet(128))
ReCommitValues(inFrame)
StepGet()

Method to get the current configured step size.

Returns:

The step size which will be used for a growing size flow.

Example

This example show how to retrieve the current step size.

print(growingSizeModifier.StepGet())
StepSet(inStep)

Sets the number of bytes a frame will grow in one step.

Each time the modifier needs to adapt the size of the frame, the size will be incremented with <Step size> bytes.

Parameters:

step – This parameter defines the amount of bytes the frame will grow. Default: 1

Raises:

python_error - An error is returned when the value is less than 1.

Example

This example demonstrates a step size of 10 bytes:

growingSizeModifier.StepSet(10)
property thisown

The membership flag

class byteblowerll.byteblower.StreamList(*args)

Bases: object

This is a List of multiple Stream objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.StreamMobile(*args, **kwargs)

Bases: AbstractObject

A StreamMobile object configures a stream of frames that will be transmitted by a WirelessEndpoint.

New in version 2.6.0.

The StreamMobile object allows you to add frame objects (FrameMobile) and configure parameters like the number of frames that will be transmitted, the inter-frame gap and the initial time to wait before transmission.

Example

Typical usage flow
frame_size = 1000  # bytes

stream = wirelessEndpoint.TxStreamAdd()
stream.NumberOfFramesSet(100)

# Transmit at 10 frames per second, which is 100 milliseconds per frame
stream.InterFrameGapSet(10000000)

stream.DestinationAddressSet('192.168.0.2')
stream.DestinationPortSet(4000)
stream.SourcePortSet(4001)

# Add a frame
frame = stream.FrameAdd()

# ... configure the frame, see FrameMobile documentation for this.
DestinationAddressGet()

Returns the destination address in the IP header of the frames that will be transmitted.

Returns:

the Destination IP address the frames will be sent to

Return type:

str

Example

print(stream.DestinationAddressGet())
DestinationAddressSet(inAddress)

Sets the destination address in the IP header of the frames that will be transmitted.

Parameters:

address (str) – The destination IPv4 or IPv6 address to send the frames to.

Example

set an IPv4 destination
stream.DestinationAddressSet('192.168.0.4')
DestinationPortGet()

Returns the destination port in the UDP header of the frames that will be transmitted.

Returns:

The UDP destination port that will be used.

Return type:

int

Example

print(stream.DestinationPortGet())
DestinationPortSet(inDestinationPort)

Sets the destination port in the UDP header of the frames that will be transmitted.

Parameters:

portnumber (int) – UDP destination port to send the frame to (1-65535)

Example

stream.DestinationPortSet(4000)
FrameAdd()

Adds a frame to the stream.

Returns:

The newly created frame

Return type:

FrameMobile

Example

This example adds a frame to a stream.
stream.FrameAdd()
FrameDestroy(inFrame)
FrameGet()

Returns list of frames on this stream.

Returns:

A list of all configured frames on the stream

Return type:

FrameMobileList

Example

prints all configured frames on a stream
for frame in stream.FrameGet():
    print(frame.DescriptionGet())
InitialTimeToWaitGet()

Returns the time to wait before the first frame will be sent.

Returns:

The initial time to wait in nanoseconds.

Return type:

int

Example

get the current initial time to wait
print(stream.InitialTimeToWaitGet())
InitialTimeToWaitSet(initTimeToWait)

Sets a delay before sending the first frame.

Parameters:

duration (int) – The amount of time to wait before sending the first frame Unit is in nanoseconds

Example

set the initial time to wait to 2 seconds
stream.InitialTimeToWaitSet(wait)
InterFrameGapGet()

Returns the inter-frame gap for the stream.

Returns:

The inter-frame gap is returned in nanoseconds.

Return type:

int

Example

prints the inter-frame gap of a stream
print(stream.InterFrameGapGet())
InterFrameGapSet(interFrameGap)

Sets the inter-frame gap for the stream.

Parameters:

duration (int) – duration in nanoseconds

Example

Set the inter-frame gap to 100ms
stream.InterFrameGapSet(gap)
NumberOfFramesGet()

Returns the number of frames that will be transmitted by a stream.

Returns:

the number of frames that will be transmitted by the stream

Return type:

int

Example

prints the number of frames to be transmitted by a stream
print(stream.NumberOfFramesGet())
NumberOfFramesSet(nof)

Sets the number of frames sent by a stream.

Parameters:

count (int) – The number of frames to send.

This method configures the number of frames a stream will transmit.

Example

This example sets the frame count of the stream.
stream.NumberOfFramesSet(1000)
ResultClear()

Clears the results.

Note

This affects the all results for a stream.

Example

Resets the current result counters to zero.
stream.ResultClear()
ResultGet()

Returns the current result counters.

Returns:

The cumulative results for the stream

Return type:

StreamResultSnapshot

Example

print(stream.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the current History counters.

Returns:

The history counters for the stream

Return type:

StreamResultHistory

history = stream.ResultHistoryGet()
SourcePortGet()

Returns the source port in the UDP header of the frames that will be transmitted.

Returns:

The UDP source port

Return type:

int

Example

This example gets the UDP source port of a stream
print('UDP source:', stream.SourcePortGet())
SourcePortSet(inPort)

Sets the source port in the UDP header of the frames that will be transmitted.

Parameters:

port (int) – The UDP source port number for the transmitted frames (1-65535)

Example

stream.SourcePortSet(8000)
TypeOfServiceGet()

Returns the type-of-service field (or TOS bits) in the IP header of the frames that will be transmitted.

Returns:

The contents of the Type-Of-Service field.

Return type:

int

Example

This example gets the current TOS field.
print('TOS set to:', stream.TypeOfServiceGet())
TypeOfServiceSet(inTos)

Sets the type-of-service field (or TOS bits) in the IP header of the frames that will be transmitted.

Parameters:

tos (int) – The contents of the type-of-service field in the IP header

Example

stream.TypeOfServiceSet(2)
property thisown

The membership flag

class byteblowerll.byteblower.StreamMobileList(*args)

Bases: object

This is a List of multiple StreamMobile objects.

It can be iterated just like a normal Python list.

iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.StreamRandomSizeModifier(*args, **kwargs)

Bases: object

A frame size modifier which will change the size of the frame randomly between a minimum and maximum value.

Deprecated since version 2.3.0: This functionality is replaced by the FrameSizeModifierRandom, see Frame.ModifierSizeRandomSet() for more information.

ByteBlower allows different modifiers on a flow. Some modifiers work on the timing parameters of a frame, others on the size or content. The StreamModifierRandomSize is a modifier which modifies the size of the frames added to the Stream on which this Modifier is added.

A StreamModifierRandomSize will change the frame size randomly. The following parameters can be configured:

Minimum size

the minimum frame size.

Maximum size

the maximum frame size.

So, a stream with a StreamModifierRandomSize installed, will start sending frames with a size randomly chosen between <Minimum size> size and <Maximum size> size. Each time a frame is sent, a new size is selected.

All sizes are without the additional 4 bytes Ethernet checksum.

The frame size modifier will change the sizes of the Frames added to the stream. If the original frame size is bigger, the size will truncated to the requested frame size. If automatic checksum calculations have been enabled on the Frame, they will be recalculated. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

If the original frame size of a Frame is too short, the Frame will be padded with zero-value bytes.

If multiple frames are added to a TxStream which is configured with a StreamModifierRandomSize, the frames are sent alternately, while the modifier is applied on all of them.

MaximumGet()

Method to get the current configured maximum frame size.

Returns:

The maximum frame size which will be used for a random size flow.

Example

This example show how to retrieve the current maximum frame size.

print(RandomSizeModifier.MaximumGet())
MaximumSet(inMaximum)

Sets the Maximum size of a Frame of a flow with StreamModifierRandomSize.

This defines the maximum frame size of the stream.

Parameters:

maximum – Maximum byte length of the Frame. This value must be at least 61 bytes, and maximum 8192. The value must also be bigger than the <Minimum size> configured. Default: 1514

Raises:

python_error: Maximum too small or too big.

Example

This example will set the maximum frame size to 128 bytes.

RandomSizeModifier.MaximumSet(128)
MinimumGet()

Method to get the currently configured minimum frame size.

Returns:

The minimum frame size which will be used for a random size flow.

Example

This example show how to retrieve the current minimum frame size.

print(RandomSizeModifier.MinimumGet())
MinimumSet(inMinimum)

Sets the Minimum size of a Frame of a flow with StreamModifierRandomSize.

This defines the minimal frame size of the stream.

Parameters:

minimum – Minimum byte length of the Frame. This value must be at least 60 bytes, and maximum 8191. The value must also be less than the <Maximum size> configured. Default: 60

Raises:

python_error: Minimum too small or too big.

Example

This example will set the minimum frame size to 128 bytes.

RandomSizeModifier.MinimumSet(128)
property thisown

The membership flag

class byteblowerll.byteblower.StreamResultData(*args, **kwargs)

Bases: AbstractObject

ByteCountGet()

Gets the current transmitted bytes.

Return type:

int

Example

This example gets the transmitted bytes

 print(streamData.ByteCountGet())
FramesizeMaximumGet()

Gets the largest framesize transmitted in this snapshot.

New in version 2.6.4.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

Get the largest framesize transmitted in this snapshot
 print(streamData.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the smallest framesize transmitted in this snapshot

New in version 2.6.4.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest framesize transmitted in this snapshot.

 print(streamData.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

 print(streamData.IntervalDurationGet())
PacketCountGet()

Gets the transmitted packets.

Return type:

int

Example

Get the transmitted packets
 print(streamData.PacketCountGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

Gets the timestamp of the first transmitted packet in this snapshot
 print(streamData.TimestampLastGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

 print(streamData.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last transmitted packet in this snapshot

 print(streamData.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.StreamResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Sender-side transmit result history.

New in version 2.1.0.

The history contains the sender information in time since the object is created or refreshed.

..note:: The information is not updated until Refresh

is called on this object.

A Stream history result object can be created via a Stream, using Stream.ResultHistoryGet()

Note

See History result for more information

Example

Get the counters per sampling interval for the stream result history.

stream_result_history = stream.ResultHistoryGet()
print(stream_snapshot.TimestampFirstGet())
Clear()

Clear the history.

With each Refresh interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, you can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

Clear the History.

stream_result_history.Clear()
CumulativeGet()

Returns a list of available cumulative counters.

Returns:

a list of StreamResultData objects containing the Cumulative counters

Return type:

StreamResultList

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example This example gets the available accumulated results

print(stream_result_history.CumulativeGet()[0].DescriptionGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

cumulative counter object at the specified index

Return type:

StreamResultData

Example

This example gets the available cumulative counters at index 1

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
print(stream_snapshot.CumulativeGetByIndex(1).DescriptionGet())
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

StreamResultData

Example

This example gets the cumulative counter at timestamp 1432805398000000000 ns

print(stream_result_history.CumulativeGetByTime(1432805398000000000))
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.0.

Return type:

StreamResultData

Example

This example gets the latest closed Cumulative counter object

 print(stream_result_history.CumulativeLatestGet().DescriptionGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(stream_result_history.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Returns:

A list of StreamResultData containing the Interval counters

Return type:

StreamResultList

Each result object contains interval counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

This example gets the available interval results

stream_result_history.IntervalGet()
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

StreamResultData

Example

This example gets the available interval counters at index 1

 print(stream_result_history.IntervalGetByIndex(1).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Return type:

StreamResultData

Example

This example gets the Interval counters at timestamp 1432805398000000000 ns

interval = stream_result_history.IntervalGetByTime(1432805398000000000)
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.0.

Return type:

StreamResultData

Example

This example gets the latest closed Interval counter object

 print(stream_result_history.IntervalLatestGet().DescriptionGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

 print(stream_result_history.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history was refreshed.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

This is the timestamp on the server when the last time Refresh was called on this object.

Example

This example gets the Refresh timestamp

 print(stream_result_history.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

Returns:

The length of the server sample buffer

Return type:

int

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

 print(stream_result_history.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

Parameters:

length (int) – Number of samples to keep in the server-side buffer

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

 stream_result_history.SamplingBufferLengthSet(5)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

int Duration in nanoseconds

Return type:

int

Example

 print(stream_result_history.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

duration (int) – Duration of a single snapshot in nanoseconds

Warning

The previously collected history will be invalidated.

Example

 stream_result_history.SamplingIntervalDurationSet(3000000)
property thisown

The membership flag

class byteblowerll.byteblower.StreamResultList(*args)

Bases: object

This is a List of multiple StreamResultData objects.

It can be iterated just like a normal Python list.

iterator()
property thisown

The membership flag

class byteblowerll.byteblower.StreamResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

ByteCountGet()

Gets the current transmitted bytes.

Return type:

int

Example

This example gets the transmitted bytes

print(stream_snapshot.ByteCountGet())
FramesizeMaximumGet()

Gets the largest frame size transmitted in this snapshot.

New in version 2.5.0.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

print(stream_snapshot.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the smallest frame size transmitted in this snapshot.

New in version 2.5.0.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the smallest frame size transmitted in this snapshot.

print(stream_snapshot.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(stream_snapshot.IntervalDurationGet())
PacketCountGet()

Gets the transmitted packets.

Return type:

int

Example

This example gets the transmitted packets

print(stream_snapshot.PacketCountGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(stream_snapshot.RefreshTimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first transmitted packet in this snapshot

 print(stream_snapshot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(stream_snapshot.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last transmitted packet in this snapshot

 print(stream_snapshot.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.StreamRuntimeStatus(*args, **kwargs)

Bases: AbstractRefreshableResult

Status information about a Stream

A stream has some runtime status information:

Is the stream running (StatusGet())?

If not, was there an error (ErrorStatusGet())?

If so, where did the error came from (ErrorSourceGet())?

Example

# stream is configured to transmit for 1 second

status = stream.StatusGet()
print('Stream stopped?', status.StatusGet() == TransmitStatus.INACTIVE)

stream.Start()

status.Refresh()
print('Stream started?', status.StatusGet() == TransmitStatus.ACTIVE)   

time.sleep(1)

status.Refresh()
print('Stream stopped?', status.StatusGet() == TransmitStatus.INACTIVE)   
ErrorSourceGet()

Returns error source information.

Returns:

The source of the error.

Return type:

TransmitErrorSource

If ErrorStatusGet() does not return TransmitErrorStatus.NONE, the returned value of this method will indicate a reason why the error state is returned.

ErrorStatusGet()

Returns error information.

Returns:

The error information of the stream if applicable.

Return type:

TransmitErrorStatus

A stream can finish without issues, but can also run into error conditions. One of those error conditions is e.g. Out-Of-Resources. This means that one tries to transmit e.g. more than 1Gbps over a 1Gbps link.

RefreshTimestampGet()

Returns the timestamp when the information was last queried on the server.

Returns:

The timestamp since epoch in nanoseconds

Return type:

int

# ...
status_object = stream.StatusGet()
print(status_object.RefreshTimestampGet())
# Prints: 1559736027345545000

time.sleep(1)

print(status_object.RefreshTimestampGet())
# Prints: 1559736028345545000
StatusGet()

Returns the stream status.

Returns:

The current status of the stream.

Return type:

TransmitStatus

This way one can determine if a stream is still running or whether the stream finished

property thisown

The membership flag

transmit_error_source_INTERFACE_HARDWARE = 1
transmit_error_source_NONE = 0
transmit_error_source_SCHEDULING_CONFLICT = 2
transmit_error_source_TXUSER = 3
transmit_error_source_UNKNOWN = -1
transmit_error_status_NONE = 0
transmit_error_status_OUT_OF_RESOURCES = 1
transmit_error_status_UNKNOWN = -1
transmit_status_ACTIVE = 1
transmit_status_INACTIVE = 0
transmit_status_UNKNOWN = -1
class byteblowerll.byteblower.StringList(*args)

Bases: object

This is a List of multiple string objects.

It can be iterated just like a normal Python list.

append(x)
clear()
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.SwigPyIterator(*args, **kwargs)

Bases: object

advance(n)
copy()
decr(n=1)
distance(x)
equal(x)
incr(n=1)
next()
previous()
property thisown

The membership flag

value()
exception byteblowerll.byteblower.TCPAlreadyConnected(*args)

Bases: InitializationError

property thisown

The membership flag

class byteblowerll.byteblower.TCPCongestionAvoidanceAlgorithm

Bases: object

NewReno = 1
NewRenoWithCubic = 2
No_Algorithm = 0
Sack = 3
SackWithCubic = 4
exception byteblowerll.byteblower.TCPConnectionAborted(*args)

Bases: DomainError

property thisown

The membership flag

exception byteblowerll.byteblower.TCPConnectionRefused(*args)

Bases: InitializationError

property thisown

The membership flag

exception byteblowerll.byteblower.TCPConnectionResetByPeer(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.TCPConnectionState

Bases: object

The state of the TCP Connection

CLOSED = 1

Closed

CLOSE_WAIT = 9
CLOSING = 8

Closing

ESTABLISHED = 5

Established

FIN_WAIT_1 = 6

FIN wait (number 1)

FIN_WAIT_2 = 7

FIN wait (number 2)

LAST_ACK = 10
LISTEN = 2

Listen

SYN_RECEIVED = 3

SYN received

SYN_SENT = 4

SYN Sent

TIME_WAIT = 11
exception byteblowerll.byteblower.TCPConnectionTimeout(*args)

Bases: InitializationError

property thisown

The membership flag

class byteblowerll.byteblower.TCPResultData(*args, **kwargs)

Bases: AbstractObject

Contains static TCP result counters.

CongestionWindowCurrentGet()

Returns the current TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultData.CongestionWindowCurrentGet())
CongestionWindowMaximumGet()

Returns the largest recorded TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultData.CongestionWindowMaximumGet())
CongestionWindowMinimumGet()

Returns the smallest recorded TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultData.CongestionWindowMinimumGet())
ConnectionStateGet()

Returns the current TCP connection state.

Return type:

TCPConnectionState

Example

 print(tcpResultData.ConnectionStateGet())
FlightSizeCurrentGet()

Returns the number of bytes that are currently in-flight.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultData.FlightSizeCurrentGet())O
FlightSizeMaximumGet()

Returns the largest recorded flight-size.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultData.FlightSizeMaximumGet())
FlightSizeMinimumGet()

Returns the smallest recorded flight-size.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultData.FlightSizeMinimumGet())
IntervalDurationGet()

Returns nanosecond duration between when result objects are created.

Return type:

int

Example

print(tcpResultData.IntervalDurationGet())
NumberOfFinReceivedGet()

Returns the number of TCP FIN segments that have been received.

Return type:

int

Example

print(tcpResultData.NumberOfFinReceivedGet())
NumberOfFinSentGet()

Returns the number of TCP FIN segments that have been sent.

Return type:

int

Example

print(tcpResultData.NumberOfFinSentGet())
NumberOfSynReceivedGet()

Returns the number of TCP SYN segments that have been received.

Return type:

int

Example

print(tcpResultData.NumberOfSynReceivedGet())
NumberOfSynSentGet()

Returns the number of TCP SYN segments that have been sent.

Return type:

int

Example

print(tcpResultData.NumberOfSynSentGet())
ReceiverWindowCurrentGet()

Returns the current TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultData.ReceiverWindowCurrentGet())
ReceiverWindowMaximumGet()

Returns the largest recorded TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultData.ReceiverWindowMaximumGet())
ReceiverWindowMinimumGet()

Returns the smallest recorded TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultData.ReceiverWindowMinimumGet())
RetransmissionCountFastGet()

Returns the total number of fast retranmissions.

Example

print(tcpResultData.RetransmissionCountFastGet())
RetransmissionCountSlowGet()

Returns the total number of timeout retranmissions.

Return type:

int

Example

print(tcpResultData.RetransmissionCountSlowGet())
RetransmissionCountTotalGet()

Returns the total number of retranmissions.

Return type:

int

Example

print(tcpResultData.RetransmissionCountTotalGet())
RoundTripTimeAverageGet()

Returns the average round-trip time (RTT) in nanoseconds.

New in version 2.22.0.

Return type:

int

Example

print(tcpResultData.RoundTripTimeAverageGet())
RoundTripTimeCurrentGet()

Returns the current round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultData.RoundTripTimeCurrentGet())
RoundTripTimeMaximumGet()

Returns the largest recorded round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultData.RoundTripTimeMaximumGet())
RoundTripTimeMinimumGet()

Returns the smallest recorded round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultData.RoundTripTimeMinimumGet())
RxByteCountHeaderGet()

Returns the number of received TCP header bytes.

Return type:

int

Example

print(tcpResultData.RxByteCountHeaderGet())
RxByteCountPayloadGet()

Returns the number of received TCP payload bytes.

Return type:

int

Example

print(tcpResultData.RxByteCountPayloadGet())
RxByteCountTotalGet()

Returns the total number of bytes received on the current TCP connection.

Return type:

int

This is the sum of the received TCP header and payload bytes.

Example

print(tcpResultData.RxByteCountTotalGet())
RxLocalCongestionNotificationCountGet()

Returns the number of segments received with an explicit congestion notification.

New in version 2.22.0.

RxRemoteCongestionNotificationCountGet()

Returns the number of segments received with an explicit congestion notification.

New in version 2.22.0.

RxSegmentCountOutOfOrderGet()

Returns the number of segments that were received out of order.

Return type:

int

Example

print(tcpResultData.RxSegmentCountOutOfOrderGet())
RxSegmentCountTotalGet()

Returns the total number of received segments.

Return type:

int

Example

print(tcpResultData.RxSegmentCountTotalGet())
RxTimestampLastGet()

Returns a nanosecond timestamp for when this TCP connection received its last TCP segment.

Return type:

int

Example

print(tcpResultData.RxTimestampLastGet())
SlowStartThresholdCurrentGet()

Returns the current TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultData.SlowStartThresholdCurrentGet())
SlowStartThresholdMaximumGet()

Returns the largest recorded TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultData.SlowStartThresholdMaximumGet())
SlowStartThresholdMinimumGet()

Returns the smallest recorded TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultData.SlowStartThresholdMinimumGet())
TimestampEstablishedGet()

Returns a nanosecond timestamp for when this TCP connection entered the established state.

Return type:

int

Example

print(tcpResultData.TimestampEstablishedGet())
TimestampFinReceivedGet()

Returns a nanosecond timestamp for when this TCP connection received the TCP-FIN segment.

Return type:

int

Example

print(tcpResultData.TimestampFinReceivedGet())
TimestampFinSentGet()

Returns a nanosecond timestamp for when this TCP connection sent the TCP-FIN segment.

Return type:

int

Example

print(tcpResultData.TimestampFinSentGet())
TimestampGet()

Returns the nanosecond timestamp for when this result object was created.

Return type:

int

Example

print(tcpResultData.TimestampGet())
TimestampSynReceivedGet()

Returns a nanosecond timestamp for when this TCP connection received the TCP-SYN segment.

Return type:

int

Example

print(tcpResultData.TimestampSynReceivedGet())
TimestampSynSentGet()

Returns a nanosecond timestamp for when this TCP connection sent the TCP-SYN segment.

Return type:

int

Example

print(tcpResultData.TimestampSynSentGet())
TxByteCountHeaderGet()

Returns the number of transmitted TCP header bytes.

Return type:

int

Example

print(tcpResultData.TxByteCountHeaderGet())
TxByteCountPayloadGet()

Returns the number of transmitted TCP payload bytes.

Return type:

int

Example

print(tcpResultData.TxByteCountPayloadGet())
TxByteCountTotalGet()

Returns the total number of bytes transmitted on the current TCP connection.

Return type:

int

This is the sum of the tranmitted TCP header and payload bytes.

Example

print(tcpResultData.TxByteCountTotalGet())
TxSegmentCountTotalGet()

Returns the total number of transmitted segments.

Return type:

int

Example

print(tcpResultData.RxSegmentCountTotalGet())
TxTimestampLastGet()

Returns a nanosecond timestamp for when this TCP connection sent its last TCP segment.

Return type:

int

Example

print(tcpResultData.TxTimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.TCPResultDataList(*args)

Bases: object

This is a List of multiple TCPResultData objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TCPResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Interface that allows you to obtain the cumulative and interval result data objects regarding TCP stats.

At fixed time intervals, ByteBlower takes Interval and Cumulative stats of the TCP session. Only a fixed number of stats ( use SamplingBufferLengthGet() to know how many ) are kept in memory at the ByteBlower server. Using the ‘Refresh()’ method those stats are transfered to the client pc where they are stored until you clear them ( Clear() ).

The interval duration of such a historyObject can be obtained using SamplingIntervalDurationGet()

Clear()

Clears the history.

With each invocation of ‘Refresh()’, interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, you can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

tcpResultHistory.Clear()
CumulativeGet()
Returns:

a list of TCPResultData containing the Cumulative counters

Return type:

TCPResultDataList

Returns a list of recent TCP result objects containing cumulative counters.

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

resultList = tcpResultHistory.CumulativeGet()
CumulativeGetByIndex(index)

Returns a list of recent TCP result objects containing cumulative counters.

Parameters:

index (int) – index of the cumulative snapshot to query

Returns:

The queried Cumulative snapshot

Return type:

TCPResultData

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

print(tcpResultHistory.CumulativeGetByIndex(0).DescriptionGet())
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp nanoseconds.

New in version 2.2.0.

Parameters:

timestamp (int) – Timestamps in nanoseconds since epoch selecting a cumulative snapshot

Return type:

TCPResultData

Example

This example gets the available cumulative counters

print(tcpResultHistory.CumulativeGetByTime(timestamp).DescriptionGet())
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.0.

Return type:

TCPResultData

Example

This example gets the available cumulative counters

print(tcpResultHistory.CumulativeLatestGet())
CumulativeLengthGet()

Returns a list of recent TCP result objects containing cumulative counters.

Returns:

The length of the cumulative list

Return type:

int

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet().

Example

print(tcpResultHistory.CumulativeLengthGet())
IntervalGet()

Returns a list of recent TCP result objects containing interval counters.

Returns:

a list of TCPResultData containing the Interval counters

Return type:

TCPResultDataList

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The duration of the interval can be obtained using SamplingIntervalDurationGet().

Example

intervalCounterList = tcpResultHistory.IntervalGetByTime(time).Intervalget()
IntervalGetByIndex(index)

Returns a list of recent TCP result objects containing interval counters.

Parameters:

index (int) – The index of the interval snapshot to be queried.

Return type:

TCPResultData

Each result object contains the counters only for a specific time interval. The duration of the interval can be obtained using SamplingIntervalDurationGet().

Example

print(tcpResultHistory.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp in nanoseconds.

New in version 2.2.0.

Return type:

TCPResultData

Example

This example gets the available interval counters

print(tcpResultHistory.IntervalGetByTime(timestamp).DescriptionGet())
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.0.

Return type:

TCPResultData

Example

This example gets the available interval counters

print(tcpResultHistory.IntervalLatestGet().DescriptionGet())
IntervalLengthGet()

Returns a list of recent TCP result objects containing interval counters.

Returns:

The length of the Interval list

Return type:

int

Each result object contains the counters only for a specific time interval. The duration of the interval can be obtained using SamplingIntervalDurationGet().

Example

print(tcpResultHistory.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp on the server when the current history is requested.

Returns:

Timestamp in nanoseconds since epoch

Return type:

int

This is the timestamp on the server when the last time ‘Refresh()’ was called.

Example

print(tcpResultHistory.RefreshTimestampGet())
SamplingBufferLengthGet()

Number of samples to keep in the buffer at server-side.

Returns:

The length of the server sample buffer

Return type:

int

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

print(tcpResultHistory.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

Parameters:

samples (int) – The number of samples to keep in the Server buffer

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

tcpResultHistory.SamplingBufferLengthSet(6)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Return type:

int

Example

print(tcpResultHistory.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

interval (int) – The duration in nanoseconds for a single sample

Example

tcpResultHistory.SamplingIntervalDurationSet(1000000000)
property thisown

The membership flag

class byteblowerll.byteblower.TCPResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Contains TCP result counters.

You can refresh the counters by calling the Refresh method on this object.

CongestionWindowCurrentGet()

Returns the current TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultSnapshot.CongestionWindowCurrentGet())
CongestionWindowMaximumGet()

Returns the largest recorded TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultSnapshot.CongestionWindowMaximumGet())
CongestionWindowMinimumGet()

Returns the smallest recorded TCP congestion window (CWND).

Return type:

int

The congestion window is the maximum number of bytes that we are allowed to send before receiving a new TCP ACK.

Example

print(tcpResultSnapshot.CongestionWindowMinimumGet())
ConnectionStateGet()

Returns the current TCP connection state.

Return type:

TCPConnectionState

Example

 print(tcpResultSnapshot.ConnectionStateGet())
FlightSizeCurrentGet()

Returns the number of bytes that are currently in-flight.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultSnapshot.FlightSizeCurrentGet())
FlightSizeMaximumGet()

Returns the largest recorded flight-size.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultSnapshot.FlightSizeMaximumGet())
FlightSizeMinimumGet()

Returns the smallest recorded flight-size.

Return type:

int

The flight size is the number of bytes that has been transmitted but not yet acknowledged.

Example

print(tcpResultSnapshot.FlightSizeMinimumGet())
IntervalDurationGet()

Returns nanosecond duration between when result objects are created.

Return type:

int

Example

print(tcpResultSnapshot.IntervalDurationGet())
NumberOfFinReceivedGet()

Returns the number of TCP FIN segments that have been received.

Return type:

int

Example

print(tcpResultSnapshot.NumberOfFinReceivedGet())
NumberOfFinSentGet()

Returns the number of TCP FIN segments that have been sent.

Return type:

int

Example

print(tcpResultSnapshot.NumberOfFinSentGet())
NumberOfSynReceivedGet()

Returns the number of TCP SYN segments that have been received.

Return type:

int

Example

print(tcpResultSnapshot.NumberOfSynReceivedGet())
NumberOfSynSentGet()

Returns the number of TCP SYN segments that have been sent.

Return type:

int

Example

print(tcpResultSnapshot.NumberOfSynSentGet())
ReceiverWindowCurrentGet()

Returns the current TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultSnapshot.ReceiverWindowCurrentGet())
ReceiverWindowMaximumGet()

Returns the largest recorded TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultSnapshot.ReceiverWindowMaximumGet())
ReceiverWindowMinimumGet()

Returns the smallest recorded TCP receiver window (RWND).

Return type:

int

The receiver window is the maximum number of bytes that the remote connection is currently able to receive.

Example

print(tcpResultSnapshot.ReceiverWindowMinimumGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(tcpResultSnapshot.RefreshTimestampGet())
RetransmissionCountFastGet()

Returns the total number of fast retranmissions.

Return type:

int

Example

print(tcpResultSnapshot.RetransmissionCountFastGet())
RetransmissionCountSlowGet()

Returns the total number of timeout retranmissions.

Return type:

int

Example

print(tcpResultSnapshot.RetransmissionCountSlowGet())
RetransmissionCountTotalGet()

Returns the total number of retranmissions.

Return type:

int

Example

print(tcpResultSnapshot.RetransmissionCountTotalGet())
RoundTripTimeAverageGet()

Returns the average round-trip time (RTT) in nanoseconds.

New in version 2.22.0.

Return type:

int

Example

print(tcpResultSnapshot.RoundTripTimeAverageGet())
RoundTripTimeCurrentGet()

Returns the current round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultSnapshot.RoundTripTimeCurrentGet())
RoundTripTimeMaximumGet()

Returns the largest recorded round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultSnapshot.RoundTripTimeMaximumGet())
RoundTripTimeMinimumGet()

Returns the smallest recorded round-trip time (RTT) in nanoseconds.

Return type:

int

Example

print(tcpResultSnapshot.RoundTripTimeMinimumGet())
RxByteCountHeaderGet()

Returns the number of received TCP header bytes.

Return type:

int

Example

print(tcpResultSnapshot.RxByteCountHeaderGet())
RxByteCountPayloadGet()

Returns the number of received TCP payload bytes.

Return type:

int

Example

print(tcpResultSnapshot.RxByteCountPayloadGet())
RxByteCountTotalGet()

Returns the total number of bytes received on the current TCP connection.

Return type:

int

This is the sum of the received TCP header and payload bytes.

Example

print(tcpResultSnapshot.RxByteCountTotalGet())
RxLocalCongestionNotificationCountGet()

Returns the number of segments received with an explicit congestion notification.

New in version 2.22.0.

RxRemoteCongestionNotificationCountGet()

Returns the number of segments received with an explicit congestion notification.

New in version 2.22.0.

RxSegmentCountOutOfOrderGet()

Returns the number of segments that were received out of order.

Return type:

int

Example

print(tcpResultSnapshot.RxSegmentCountOutOfOrderGet())
RxSegmentCountTotalGet()

Returns the total number of received segments.

Return type:

int

Example

print(tcpResultSnapshot.RxSegmentCountTotalGet())
RxTimestampLastGet()

Returns a nanosecond timestamp for when this TCP connection received its last TCP segment.

Return type:

int

Example

print(tcpResultSnapshot.RxTimestampLastGet())
SlowStartThresholdCurrentGet()

Returns the current TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultSnapshot.SlowStartThresholdCurrentGet())
SlowStartThresholdMaximumGet()

Returns the largest recorded TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultSnapshot.SlowStartThresholdMaximumGet())
SlowStartThresholdMinimumGet()

Returns the smallest recorded TCP slow-start threshold (SSTHRESH).

Return type:

int

The slow-start threshold indicates the congestion window value where the congestion avoidance algorithm switches from “slow-start”-mode to “congestion-avoidance”-mode.

Example

print(tcpResultSnapshot.SlowStartThresholdMinimumGet())
TimestampEstablishedGet()

Returns a nanosecond timestamp for when this TCP connection entered the established state.

Return type:

int

Example

print(tcpResultSnapshot.TimestampEstablishedGet())
TimestampFinReceivedGet()

Returns a nanosecond timestamp for when this TCP connection received the TCP-FIN segment.

Return type:

int

Example

print(tcpResultSnapshot.TimestampFinReceivedGet())
TimestampFinSentGet()

Returns a nanosecond timestamp for when this TCP connection sent the TCP-FIN segment.

Return type:

int

Example

print(tcpResultSnapshot.TimestampFinSentGet())
TimestampGet()

Returns the nanosecond timestamp for when this result object was created.

Return type:

int

Example

print(tcpResultSnapshot.TimestampGet())
TimestampSynReceivedGet()

Returns a nanosecond timestamp for when this TCP connection received the TCP-SYN segment.

Return type:

int

Example

print(tcpResultSnapshot.TimestampSynReceivedGet())
TimestampSynSentGet()

Returns a nanosecond timestamp for when this TCP connection sent the TCP-SYN segment.

Return type:

int

Example

print(tcpResultSnapshot.TimestampSynSentGet())
TxByteCountHeaderGet()

Returns the number of transmitted TCP header bytes.

Return type:

int

Example

print(tcpResultSnapshot.TxByteCountHeaderGet())
TxByteCountPayloadGet()

Returns the number of transmitted TCP payload bytes.

Return type:

int

Example

print(tcpResultSnapshot.TxByteCountPayloadGet())
TxByteCountTotalGet()

Returns the total number of bytes transmitted on the current TCP connection.

Return type:

int

This is the sum of the tranmitted TCP header and payload bytes.

Example

print(tcpResultSnapshot.TxByteCountTotalGet())
TxSegmentCountTotalGet()

Returns the total number of transmitted segments.

Return type:

int

Example

print(tcpResultSnapshot.TxSegmentCountTotalGet())
TxTimestampLastGet()

Returns a nanosecond timestamp for when this TCP connection sent its last TCP segment.

Return type:

int

Example

print(tcpResultSnapshot.TxTimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.TCPSessionInfo(*args, **kwargs)

Bases: AbstractObject

Class containing info about the TCP session.

Example

tcpSessionInfo = httpSessionInfo.TcpSessionInfoGet()
# print an integer which indicates a certain State
print(tcpSessionInfo.ConnectionStateGet())
CongestionAvoidanceAlgorithmGet()

Returns the congestion avoidance algorithm used in this TCP session.

Return type:

TCPCongestionAvoidanceAlgorithm

Example

print(tcpSessionInfo.CongestionAvoidanceAlgorithmGet() == TCPCongestionAvoidanceAlgorithm.NewReno)
ConnectionStateGet()

Returns the current TCP connection state.

Return type:

TCPConnectionState

Example

 print(tcpSessionInfo.ConnectionStateGet())
MaximumSegmentSizeGet()

Returns the maximum segment size this TCP connection is allowed to use when transmitting data.

Example

print(tcpSessionInfo.MaximumSegmentSizeGet())
PragueIsEnabled()

Returns whether the TCP Prague CAA is successfully negotiated.

Returns:

True when TCP Prague is/was in use. False when the Fallback CAA is used or TCP Prague was not enabled.

Return type:

bool

Example

print(tcpSessionInfo.PragueIsEnabled())
ResultGet()

Returns the current cumulative result counters for this session.

Return type:

TCPResultSnapshot

The snapshot contains byte counters and time values.

Example

 print(tcpSessionInfo.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the current TCP Results over time.

Return type:

TCPResultHistory

Example

 print(tcpSessionInfo.ResultHistoryGet().DescriptionGet())
property thisown

The membership flag

class byteblowerll.byteblower.TCPTunnel(*args, **kwargs)

Bases: AbstractObject

Creates a TCP port forwarding configuration between a local host and a remote server.

New in version 2.7.0.

Traffic is forwarded between localhost and the remote endpoint.

Example:

# Provision a ByteBlower Port.
# ...

tcp_tunnel = port.TunnelTcpAdd()
tcp_tunnel.RemoteAddressSet('10.3.4.5')
tcp_tunnel.RemotePortSet(443)
tcp_tunnel.LocalPortSet(12345)
tcp_tunnel.Start()

in another shell:

wget https://10.3.4.5:443 -O test
LocalPortSet(inLocalPort)

Configures the local port number of the port mapping configuration.

Parameters:

port (int) – Local TCP port to use

Example

tcpTunnel.LocalPortSet(12345)
RemoteAddressSet(remote_address)

Configures the IP of the remote endpoint.

Parameters:

address (str) – Remote IP address to set

Example

tcpTunnel.RemoteAddressSet('192.168.1.10')
RemotePortSet(inLocalPort)

Configures the remote port to which data will be forwarded.

Parameters:

port (int) – Remote TCP port to connect to

Example

tcpTunnel.LocalPortSet(80)
Start()

Activates the port mapping configuration.

Once the port mapping is activated it becomes possible to access the remote endpoint through external applications like curl, wget, ssh or the a web browser.

For example:

curl --insecure https://localhost:123435
wget --no-check-certificate https://localhost:12345

Of course, you can also use Python’s networking packages like http.

Example

tcpTunnel.Start()
Stop()

Stops the port mapping configuration.

Example

tcpTunnel.Stop()
property thisown

The membership flag

class byteblowerll.byteblower.TCPTunnelList(*args)

Bases: object

This is a List of multiple TCPTunnel objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TaggedRx(*args, **kwargs)

Bases: Rx

Base class for Frame blasting receive side triggers relying on frame alteration.

These triggers include:

  • Latency

  • Out Of Sequence

FrameTagDefaultSet()

Resets the receive-side frame tag to its server-default settings.

This is implemented in the specific triggers

FrameTagGet()

Returns the FrameTagRx object related to this trigger.

Each (transmitted) frame can be enabled to have a time tag and/or an sequence tag inserted into the frame. The FrameTagRx object on this trigger can be used to define how that transmitted tag is processed.

The FrameTag.Rx object which is returned by this method represents the current configuration of the frame tag processing. This object can be used to configure the processing of the injected frame tag.

For more detailed information about Frame tagging, you can also take a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour

Warning

On older ByteBlower servers, this requires a lot of resources, so this option must be used with care.

New in version 1.8.18.

Return type:

FrameTagRx

Example

In this example, we will retrieve the FrameTagRx object for the frame tag:

print(latencyTrigger.FrameTagGet().DescriptionGet())
FrameTagSet(fromFrameTagTx)

Configure the FrameTag.Rx to match the given FrameTagTx.

New in version 1.8.18.

Parameters:

tag (FrameTagTx) – The FrameTagTx to obtain the metrics and format configuration from.

Raises:

ByteBlower.Server.NotSupported - Unsupported Server Capability: ‘Manage TX/RX Frame Tag placement’: When a transmitted frame tag with unsupported metrics and/or format is given.

Raises:

python_error - “FrameTag is of incorrect Type”: When a transmitted frame tag of invalid type is given (sequence vs. time)

This method takes a FrameTagTx and applies its metrics and format configuration on this trigger’s FrameTagRx.

Note

The transmitted frame tag type (sequence number, time stamp, …) must match the receiver frame tag type that is used for this trigger.

The transmitted frame tag (sequence number, timestamp) can be obtained from the Frame (Frame.FrameTagSequenceGet(), resp. Frame.FrameTagTimeGet())

Example

This example applies the transmitted time tag configuration on the receiver’s time tag:

   outOfSequence_trigger.FrameTagSet(frameTag)
property thisown

The membership flag

exception byteblowerll.byteblower.TechnicalError(*args)

Bases: ByteBlowerAPIException

property thisown

The membership flag

class byteblowerll.byteblower.TelnetClient(*args, **kwargs)

Bases: AbstractObject

A Telnet client application that allows communication with an external Telnet server.

New in version 2.2.0.

The Telnet protocol allows for bidirectional interactive communication between a Telnet client (i.e. this application) on a ByteBlower port and an external Telnet server.

The Telnet protocol can be used to log in on other machines using a virtual terminal. By sending Telnet commands using Send(), waiting for a small amount of time and reading the response using Receive(), a complete interactive session may be constructed.

The protocol can also be used to debug other network protocols. For example, contacting an HTTP server (on port 80) using a Telnet client and sending a valid HTTP request towards it, should correctly return the HTTP response data.

Close()

Closes the Telnet session with the server and stops the Telnet client.

The TCP session will be closed and reset, so a new session can be opened.

If no Telnet session is open, nothing is done.

Example

This command closes the Telnet session if one is active.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
ConnectionStateGet()

Returns the current TCP connection state.

Return type:

TCPConnectionState

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
LocalPortGet()

Returns the (local) TCP port used by this client.

Returns:

The currently configured TCP port on this client.

Return type:

int

The client will communicate with the server through a TCP network socket on this port and listen on it for incoming traffic.

If the TCP port isn’t explicitly set (yet), this will return a valid and unique TCP port number for within the scope of the ByteBlower port (e.g. 32687).

Default value Valid unique client TCP port

Example

This example returns the port number on which this client connects to the Telnet server.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
LocalPortSet(inLocalPort)

Configures the (local) TCP port used by this client.

Parameters:

port (int) – The TCP port to be used by this client. This should be an integer value. Values larger the maximum port value of 65536 overflow into a valid port number.

Raises:

InvalidValue.Integer - If the parameter value isn’t an integer

Raises:

ByteBlower.Protocol.ConfigLocked - If a Telnet session is currently opened, this exception is thrown. Use ::Close to close the session before changing the Telnet server port.

The client will communicate with the server through a TCP network socket on this port and listen on it for incoming traffic.

If the TCP port isn’t explicitly set (yet), the server will use a valid and unique TCP port number for within the scope of the ByteBlower port (e.g. 32687).

Default value Valid and unique client TCP port

Example

This snippet sets the port number on which this client will connect to the Telnet server.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Open()

Starts the Telnet client and opens the session with the Telnet server.

It will create a new TCP connection. The TCP statistics will be reset. If a Telnet session is already open, nothing is done.

After calling this method, data may be sent to the server Send() will be queued for transmission after this handshake.

Warning

When contacting a non-existing or unreachable Telnet server, this application has unexpected behavior. The Open() method returns immediately and TCP moves to the ‘active’ status. After the timeout expires, TCP moves to the ‘finished’ status instead of the ‘timeOut’ status. All the while, data may be sent using Send(). This data is queued during the handshake, but it will not be sent.

Raises:

ByteBlower.Protocol.Unavailable - If the Telnet server address has not been configured, this exception is thrown. Use RemoteAddressSet() to configure the Telnet server address.

Example

This command opens the Telnet session, which initiates the handshake of the underlying TCP session. It returns immediately.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
PortGet()
Receive()

Reads data received over the Telnet session from the network and returns it.

Returns:

The data received from the Telnet server.

Return type:

str

Raises:

ByteBlower.Protocol.InvalidAction - When no session is active. Use Open() to open the session.

If this method is executed, all received data since the last time it was called is returned. If more data is still flowing in from the network, the rest of the data will be returned the next time the receive method is executed.

Warning

When contacting a non-existing or unreachable Telnet server, this method will not provide an error. When the TCP handshake fails (probably due to timeout), TCP will move (incorrectly) to finished after a while. None of the traffic sent at layer 5 will be received by the Telnet server.

Example

This example shows the response received from the Telnet server after sending the ‘uname -a’ command.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RemoteAddressGet()

Returns the IP address of the Telnet server to which this client connects.

Returns:

The IP address of the Telnet server to which this client connects. This should be either an valid IPv4 address or a valid IPv6 address.

Return type:

str

Raises:

ByteBlower.Protocol.InvalidValue - If the remote IP address is not configured yet

Before this address is set, no connection can be opened or traffic can be sent.

Both IPv4 and IPv6 addresses are supported, but the provided (remote) address must match use the same IP protocol as the ByteBlower port of this client.

Note

Currently, DNS is not supported, so providing a URL is not possible.

Example

This example returns the IP address of the Telnet server.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RemoteAddressSet(inAddress)

Sets the IP address of the Telnet server to which this client connects.

Parameters:

address (str) – The IP address of the Telnet server to which this client connects. This should be either an valid IPv4 address or a valid IPv6 address.

Raises:
  • ConfigError – If an invalid IP address is entered, this error is thrown.

  • ConfigError – If an IPv4 address is provided, while this client is on an IPv6 ByteBlower port or vice versa, this exception is thrown.

  • InProgressError – If a Telnet session is currently opened, this exception is thrown. Use Close() to close the session before changing the Telnet server address.

Before this address is set, no connection can be opened or traffic can be sent.

Both IPv4 and IPv6 addresses are supported, but the provided (remote) address must match be of the same type as the ByteBlower port of this client.

Note

Currently, DNS is not supported, so providing a URL is not possible.

Example

This snippet sets the IP address of the Telnet server to be contacted.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RemotePortGet()

Returns the (remote) TCP port on the Telnet server to which this client connects

Returns:

The currently configured TCP port on the Telnet server to which this client connects. The default value is 23

Return type:

int

The client will communicate with the Telnet server on the configured port.

If the TCP port isn’t explicitly set (yet), this will return the default Telnet server port (23).

Example

This example returns the port number of the Telnet server.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
RemotePortSet(inRemotePort)

Configures (remote) TCP port on the Telnet server to which this client connects.

Parameters:

port (int) – The TCP port on the Telnet server to which this client connects. This should be an integer value. Values larger the maximum port value of 65536 overflow into a valid port number. The default value is 23

Raises:

InvalidValue.Integer - If the parameter value isn’t an integer

Raises:

ByteBlower.Protocol.ConfigLocked - If a Telnet session is currently opened, this exception is thrown. Use Close() to close the session before changing the Telnet server port.

The client will communicate with the Telnet server on the configured port.

If the TCP port isn’t explicitly set (yet), the server will take the default Telnet server port (23).

Example

This snippet sets the port number of the Telnet server to be contacted.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Send(inData)

Sends the provided to the Telnet server over the network.

Parameters:

data (str) – This string will be sent to the server for processing.

Raises:

ByteBlower.Protocol.InvalidAction - When no session is active, this exception is thrown. Use Open() to open the session.

Data may be sent as soon as a connection is opened. Data sent during the TCP handshake will be queued to be sent immediately after it.

Warning

When contacting a non-existing or unreachable Telnet server, this method will not provide an error. When the TCP handshake fails (probably due to timeout), TCP will move (incorrectly) to finished after a while. None of the traffic sent at layer 5 will be received by the Telnet server.

Example

This command sends the provided data over the network towards the Telnet server.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
property thisown

The membership flag

class byteblowerll.byteblower.TelnetClientList(*args)

Bases: object

This is a List of multiple TelnetClient objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TimeStampFormat

Bases: object

Microseconds = 0

Insert timestamps with Microsecond resolution

Deprecated since version 2.0.

Microseconds_CRC = 1

Insert timestamps with Microsecond resolution and a CRC

Deprecated since version 2.9: Use TenNanoseconds

TenNanoseconds = 2

Insert timestamps with 10 nanosecond resolution

byteblowerll.byteblower.ToNanoseconds(unit)
class byteblowerll.byteblower.TransmitErrorSource

Bases: object

The source of an error of a Stream

INTERFACE_HARDWARE = 1

One tries to transmit more than the interface bandwith.

e.g. One tries to send 2 700Mbps flows on a single 1Gbps interface

NONE = 0

Nothing has gone wrong, this is what you want!

SCHEDULING_CONFLICT = 2

The stream cannot keep up.

Deprecated since version 2.9.0: The stream has issues to schedule all frames on the network interface.

TXUSER = 3

The user is requesting too much processing power on the server

UNKNOWN = -1

The stream does honestly not know where the error came from.

This can also be returned when you encounter an error with an outdated API.

class byteblowerll.byteblower.TransmitErrorStatus

Bases: object

The error status of a Stream

NONE = 0

No error

OUT_OF_RESOURCES = 1

The server went out of resources.

The origin of the error can be queried by calling StreamRuntimeStatus.ErrorSourceGet()

UNKNOWN = -1

Unknown error.

This can indicate 2 things:

  • The API is outdated

  • The server encountered an error, but does not know what

class byteblowerll.byteblower.TransmitStatus

Bases: object

The current transmission status of a class:Stream

ACTIVE = 1

The stream is active and transmitting frames

INACTIVE = 0

The stream is inactive and not transmitting frames.

This can either be because the stream is not started (yet) or the stream has transmitted all frames as configured by Stream.NumberOfFramesSet()

UNKNOWN = -1

The server honestly does not know what the stream is doing.

Note

If this happens, please contact the ByteBlower support team. It will indicate us that something is going wrong.

class byteblowerll.byteblower.Trigger(*args, **kwargs)

Bases: Rx

property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasic(*args, **kwargs)

Bases: Trigger

Receive-side packet processor which counts the incoming frames, matching a filter.

This trigger is always active and starts counting frames as soon as it is created. Counting continues until the trigger is destructed.

Note

The initial (empty) filter string accepts all incoming frames. See meth``FilterSet for filtering information.

A basic trigger object can be created via a ByteBlowerPort, using ByteBlowerPort.RxTriggerBasicAdd()

This trigger processes frames received on the ByteBlower interface where its parent ByteBlowerPort is located.

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

port = bbServer.PortCreate('trunk-1-2')
trigger = port.RxTriggerBasicAdd()
bpf_filter = 'udp port 67'
trigger.FilterSet(bpf_filter)
FilterGet()

Returns the current installed BPF filter string.

Returns:

The current BPF filter string

Return type:

str

The filter string can be configured using FilterSet()

Example

Suppose we configured the trigger with filter string: where $ipv4_1 and $ipv4_2 are IPv4Configuration and $frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

trigger = port.RxTriggerBasicAdd()
bpf_filter = 'ip dst 1.1.1.2 and udp port 4096'
trigger.FilterSet(bpf_filter)   
print(trigger.FilterGet())
FilterSet(filter)

Sets a BPF filter on a RX object.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Parameters:

bpf (str) – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ConfigError – When an invalid BPF filter string is given.

Example

This will filter only UDP traffic. Set the filter on packets that match: - source and destination IPv4 address - UDP traffic with given destination and source UDP port - (layer2) frame length (without CRC!)

trigger = port.RxTriggerBasicAdd()
bpf_filter = 'ip dst 1.1.1.2 and udp port 4096'
trigger.FilterSet(bpf_filter)
ResultClear()

Resets the counter values to zero.

New in version 2.1.0.

Example

trigger = port.RxTriggerBasicAdd()
trigger.ResultClear()
ResultGet()

Returns the current result counters.

New in version 2.1.0.

Returns:

The current cumulative result counters.

Return type:

TriggerBasicResultSnapshot

This method will return an object of TriggerBasicResultSnapshot. It will contain all the current Cumulative counters. To update the counters, call Refresh on TriggerBasicResultSnapshot

Example

trigger = port.RxTriggerBasicAdd()
print(trigger.ResultGet().DescriptionGet())
ResultHistoryGet()

Returns the current History counters.

New in version 2.1.0.

The history contains the Cumulative and the Interval counters over time. Use this to create results over time.

Return type:

TriggerBasicResultHistory

Example

trigger = port.RxTriggerBasicAdd()
print(trigger.ResultHistoryGet().DescriptionGet())
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicList(*args)

Bases: object

This is a List of multiple TriggerBasic objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicMobile(*args, **kwargs)

Bases: Trigger

Receive-side packet processor on a WirelessEndpoint that counts all incoming frames that match a filter.

All triggers are started after calling WirelessEndpoint.Start() on the parent WirelessEndpoint object.

A basic trigger object can be created by calling WirelessEndpoint.RxTriggerBasicAdd

As opposed to the ByteBlowerPort, Triggers on ByteBlower Endpoint do not support custom filters with BPF syntax.

New in version 2.6.0.

Example

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
DurationGet()

Returns the duration for which the trigger will be active.

Returns:

the duration in nanoseconds for which the trigger should listen. By default it will listen during the full Scenario Duration.

Return type:

int

Example

print(trigger.DurationGet())
DurationSet(inDuration)

Sets the duration for which the trigger will be active.

Parameters:

duration (int) – Number of nanoseconds the Trigger should listen for incoming frames The default value is the length of the full scenario.

Configures how long the trigger will listen for incoming packets.

Example

Listen for 10 minutes

trigger.DurationSet(10000)
FilterGet()

The BPF style filter based on the UDP source and destination configuration

Return type:

str

FilterSourceAddressGet()

Returns the source (source) address field of the packet filter.

Return type:

str

Example

print(trigger.FilterSourceAddressGet())
FilterSourceAddressSet(inAddress)

Sets the source (source) address field of the packet filter.

Parameters:

address (str) – Source IP address on which the Endpoint must filter.

Example

trigger.FilterSourceAddressSet('1.1.1.1')
FilterUdpDestinationPortGet()

Returns the destination (destination) port field of the packet filter.

Return type:

int

Example

print(trigger.FilterUdpDestinationPortGet())
FilterUdpDestinationPortSet(inPort)

Sets the destination (destination) port field of the packet filter.

Parameters:

port (int) – UDP destination port number on which the Endpoint must listen

Example

trigger.FilterUdpDestinationPortSet(4096)
FilterUdpSourcePortGet()

Returns the source (source) port field of the packet filter.

Return type:

int

Example

print(trigger.FilterUdpSourcePortGet())
FilterUdpSourcePortSet(inPort)

Sets the source (source) port field of the packet filter.

Parameters:

port (int) – UDP source port number for which the Endpoint must listen

Example

trigger.FilterUdpSourcePortSet(4096)
ResultClear()

Resets the counter values to zero and empties the ResultHistory.

Example

trigger.ResultClear()
ResultGet()
ResultHistoryGet()

Returns the current History counters.

Return type:

TriggerBasicResultHistory

This method returns a TriggerBasicResultHistory Object. This will contain the Cumulative and the Interval counters over time. Use this to create results over time.

Example

print(trigger.ResultHistoryGet())
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicMobileList(*args)

Bases: object

This is a List of multiple TriggerBasicMobile objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicResultData(*args, **kwargs)

Bases: AbstractObject

Receive-side trigger result set.

The result set contains the trigger information of since the object is created or refreshed.

Note

See What’s new in API v2 for more information.

A basic trigger result data snapshot object can be created via a TriggerBasicResultHistory, using TriggerBasic.ResultHistoryGet

Note

The information is not updated until “Refresh” is called on the TriggerBasicResultHistory

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

port = bbServer.PortCreate('trunk-1-2')
trigger = port.RxTriggerBasicAdd()
bpf_filter = 'udp port 67'
trigger.FilterSet(bpf_filter)
historyResult = trigger.ResultHistoryGet()
resultData = historyResult.CumulativeLatestGet()
ByteCountGet()

Gets the current received bytes counter.

Return type:

int

Example

This example gets the received bytes counter

print(dataResult.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

Returns:

Largest received frame size in bytes of this snapshot

Return type:

int

New in version 2.5.0.

Example

This example gets the largest frame size received in this snapshot.

print(dataResult.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.5.0.

Returns:

Smallest received frame size in bytes of this snapshot

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(dataResult.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(dataResult_Get.IntervalDurationGet())
PacketCountGet()

Gets the received packet count.

Return type:

int

Example

This example gets the received packet counter

print(dataResult_Get.PacketCountGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Returns:

The timestamp in nanoseconds since epoch when the first frame in this snapshot was received

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(dataResult_Get.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

The timestamp in nanoseconds since epoch when this snapshot was created

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(dataResult.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last packet in this snapshot.

Returns:

The timestamp in nanoseconds since epoch when the last frame in this snapshot was received

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(dataResult_Get.TimestampLastGet())
TypeGet()
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicResultDataList(*args)

Bases: object

This is a List of multiple TriggerBasicResultData objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicResultHistory(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side trigger result history.

New in version 2.1.0.

A basic trigger history result object can be created via a TriggerBasic, using TriggerBasic.ResultHistoryGet()

The history contains the trigger information in time since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object

Note

See History result for more information

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

from byteblowerll.byteblower import ByteBlower
server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com')
# TODO
Clear()

Clear the history.

With each Refresh interval and cumulative counters are transferred from Server to the Client. To remove all counter-objects in this history, one can execute this method. Both Interval and Cumulative counter lists will be cleared.

Example

Clear the History.

historyResult.Clear()
CumulativeGet()

Returns a list of available cumulative counters.

Returns:

a list of TriggerBasicResultData objects containing the Cumulative counters

Return type:

TriggerBasicResultDataList

Each result object contains cumulative counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet()

Example

This example gets the available cumulative results

print(historyResult.CumulativeGet()[0].DescriptionGet())
CumulativeGetByIndex(index)

Returns a single item of the cumulative list.

Parameters:

index (int) – index

Returns:

An object containing the cumulative counters at the given index

Return type:

TriggerBasicResultData

Example

This example gets the available cumulative counters at index 1

print(historyResult.CumulativeGetByIndex(0).DescriptionGet())
CumulativeGetByTime(timestamp)

Returns a single item of the cumulative list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds since epoch

Returns:

The cumulative data at the given point in time.

Return type:

TriggerBasicResultData

Example

This example gets the cumulative counter at timestamp 1432805398000000000 ns

print(historyResult.CumulativeGetByTime(1432805398000000000).DescriptionGet())
CumulativeLatestGet()

Returns latest closed item of the cumulative list.

New in version 2.2.0.

Returns:

The last cumulative snapshot which has been closed.

Return type:

TriggerBasicResultData

Example

This example gets the latest closed Cumulative counter object

print(historyResult.CumulativeLatestGet().DescriptionGet())
CumulativeLengthGet()

Returns the size of the cumulative list.

Returns:

The length of the cumulative list

Return type:

int

Example

print(historyResult.CumulativeLengthGet())
IntervalGet()

Returns a list of available interval results.

Returns:

A list of TriggerBasicResultData objects containing all interval counters.

Return type:

TriggerBasicResultDataList

Each result object contains interval counters at a certain point in time. Snapshots are taken at fixed time intervals. The interval duration can be obtained using SamplingIntervalDurationGet()

Example

This example gets the available interval results

print(historyResult.IntervalGet()[0].DescriptionGet())
IntervalGetByIndex(index)

Returns a single item of the interval list.

Parameters:

index (int) – index

Returns:

interval counter object at the specified index

Return type:

TriggerBasicResultData

Example

This example gets the available interval counters at index 1

print(historyResult.IntervalGetByIndex(0).DescriptionGet())
IntervalGetByTime(timestamp)

Returns a single item of the interval list using a timestamp.

New in version 2.2.0.

Parameters:

timestamp (int) – timestamp in nanoseconds

Returns:

The interval counters at the given time.

Return type:

TriggerBasicResultData

Example

This example gets the Interval counters at timestamp 1432805398000000000 ns

interval = historyResult.IntervalGetByTime(1432805398000000000)
IntervalLatestGet()

Returns the latest closed item of the interval list.

New in version 2.2.0.

Return type:

TriggerBasicResultData

Example

This example gets the latest closed Interval counter object

print(historyResult.IntervalLatestGet().DescriptionGet())
IntervalLengthGet()

Returns the size of the interval list.

Returns:

The length of the interval list

Return type:

int

Example

print(historyResult.IntervalLengthGet())
RefreshTimestampGet()

Returns the timestamp when the results in this history were last refreshed.

Returns:

Timestamp in nanoseconds since epoch when the results were last retrieved from the server.

Return type:

int

Example

This example refreshes the history results with the results available on the server

historyResult.Refresh()
SamplingBufferLengthGet()

Number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Returns:

The length of the server sample buffer

Return type:

int

Example

print(historyResult.SamplingBufferLengthGet())
SamplingBufferLengthSet(inLength)

Sets the number of samples to keep in the buffer.

New in version 2.3.0.

Parameters:

length (int) – The number of samples the ByteBlower server should keep

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Example

historyResult.SamplingBufferLengthSet(10)
SamplingIntervalDurationGet()

Duration of one sampling interval in nanoseconds.

Returns:

Duration in nanoseconds

Return type:

int

Example

print(historyResult.SamplingIntervalDurationGet())
SamplingIntervalDurationSet(inDuration)

Sets the duration of one sampling interval.

New in version 2.3.0.

Parameters:

interval (int) – Duration in nanoseconds a sample should be.

Example

print(historyResult.SamplingIntervalDurationSet())
property thisown

The membership flag

class byteblowerll.byteblower.TriggerBasicResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Receive-side trigger result set.

A basic trigger result snapshot object can be created via a TriggerBasic, using TriggerBasic.ResultGet()

The result set contains the trigger information of since the object is created or refreshed.

Note

The information is not updated until Refresh is called on this object

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.

result = trigger.ResultGet()
print(result.PacketCountGet())
ByteCountGet()

Gets the current received bytes counter.

Returns:

received bytes

Return type:

int

Example

This example gets the received bytes counter

print(result.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

New in version 2.5.0.

Returns:

Largest received frame size in bytes of this snapshot

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(result.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.5.0.

Returns:

Smallest received frame size in bytes of this snapshot

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(result.FramesizeMinimumGet())
IntervalDurationGet()

Gets the configured duration of this results snapshot [NS].

New in version 2.3.0.

Return type:

int

Example

This example gets interval duration of this result snapshot [NS]

print(result.IntervalDurationGet())
PacketCountGet()

Gets the received packet count.

Returns:

received packets

Return type:

int

Example

This example gets the received packet counter

print(result.PacketCountGet())
RefreshTimestampGet()

Returns the timestamp when the counters of this object where last refreshed.

Returns:

RefreshTimestamp in nanoseconds since epoch

Return type:

int

Note

This is not the same as TimestampGet()

Example

print(result.TimestampGet())
TimestampFirstGet()

Gets the timestamp [NS] of the first packet in this snapshot.

Returns:

Timestamp of the first received packet in nanoseconds since epoch

Return type:

int

Example

This example gets the timestamp [NS] of the first received packet in this snapshot

print(result.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Returns:

Timestamp of snapshot in nanoseconds since epoch

Return type:

int

Example

This example gets the snapshot timestamp [NS].

print(result.TimestampGet())
TimestampLastGet()

Gets the timestamp [NS] of the last packet in this snapshot.

Returns:

Timestamp in nanoseconds since epoch when the last frame arrived in this snapshot.

Return type:

int

Example

This example gets the timestamp [NS] of the last received packet in this snapshot

print(result.TimestampLastGet())
property thisown

The membership flag

class byteblowerll.byteblower.TriggerSizeDistribution(*args, **kwargs)

Bases: Trigger

Receive-side packet processor which counts the incoming frames, frame rate and frames per size, matching a filter.

The size distribution trigger extends the basic trigger. It provides additional information like total number of bytes and frame rate. See ResultGet() for more information.

This trigger is always active and starts counting frames as soon as it is created. Counting continues until the trigger is destructed.

Note

The initial (empty) filter string accepts all incoming frames. See FilterSet() for filtering information.

A size distribution trigger object can be created via a ByteBlowerPort, using ByteBlowerPort.RxTriggerSizeDistributionAdd()

This trigger processes frames received on the ByteBlower interface where its parent ByteBlowerPort is located.

Example

Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 49576.

trig = port.RxTriggerSizeDistributionAdd()
trig.FilterSet('ip && dst port 49576')
...
print(trig.ResultGet().DescriptionGet())
FilterGet()

Returns the current installed BPF filter string.

Returns:

The current BPF filter string

Return type:

str

The filter string can be configured using FilterSet()

Example

Suppose we configured the trigger with filter string: where $ipv4_1 and $ipv4_2 are IPv4Configuration objects and $frameSize is the (layer2) size of the frames (without CRC!). The BPF filter string would then become for example:

trig.FilterSet('ip && dst port 9000')
print(trig.FilterGet())
FilterSet(inFilter)

Sets a BPF filter on a RX object.

Parameters:

bpf (str) – Valid BPF filter string. For creating valid BPF filter strings, please have a look at http://www.tcpdump.org/#documentation for more information.

Raises:

ConfigError – When an invalid BPF filter string is given.

Note

Configuring a new filter string does reset the counter values which were triggered by a previous filter string. Also the earlier collected history is invalidated.

Example

trig = port.RxTriggerSizeDistributionAdd()
# lets assume traffic is sent to UDP port 9000
trig.FilterSet('ip && dst port 9000')

This will filter only UDP traffic. Set the filter on packets that match: - source and destination IPv4 address - UDP traffic with given destination and source UDP port - (layer2) frame length (without CRC!)

ResultClear()

Resets the counter values to zero.

New in version 2.1.0.

Example

trig.ResultClear()
ResultGet()

Returns the current cumulative result for this trigger.

New in version 2.1.0.

Return type:

TriggerSizeDistributionResultSnapshot

The snapshot contains byte counters and time values.

Example

print(trig.ResultGet().DescriptionGet())
property thisown

The membership flag

class byteblowerll.byteblower.TriggerSizeDistributionList(*args)

Bases: object

This is a List of multiple TriggerSizeDistribution objects.

It can be iterated just like a normal Python list.

empty()
iterator()
property thisown

The membership flag

class byteblowerll.byteblower.TriggerSizeDistributionResultSnapshot(*args, **kwargs)

Bases: AbstractRefreshableResult

Contains the results for the size distribution.

ByteCountGet()

Gets the number of received bytes.

Return type:

int

print(snaphot.ByteCountGet())
FramesizeMaximumGet()

Gets the size (in bytes) of the largest frame received in this snapshot.

New in version 2.5.0.

Returns:

Largest received frame size in bytes of this snapshot

Return type:

int

Example

This example gets the largest frame size received in this snapshot.

print(snaphot.FramesizeMaximumGet())
FramesizeMinimumGet()

Gets the size (in bytes) of the smallest frame received in this snapshot.

New in version 2.5.0.

Returns:

Smallest received frame size in bytes of this snapshot

Return type:

int

Example

This example gets the smallest frame size received in this snapshot.

print(snaphot.FramesizeMinimumGet())
PacketCountAboveMaximumGet()

Gets number of received packets in this snapshot that are too big.

Return type:

int

Example

print(snaphot.PacketCountAboveMaximumGet())
PacketCountBelowMinimumGet()

Gets number of received packets that are too small.

Return type:

int

Example

print(snaphot.PacketCountBelowMimumGet())
PacketCountGet(*args)

Gets the number received packets. Or if provided with a size, the number of packets received of that size.

print(snaphot.PacketCountGet())

Gets the number received packets. Or if provided with a size, the number of packets received of that size.

print(snaphot.PacketCountGet())
RefreshTimestampGet()

Gets the timestamp when the results were last refreshed.

Returns:

The timestamp in nanoseconds since epoch when the results were last refreshed

Return type:

int

TimestampFirstGet()

Gets the timestamp [NS] of the first received packet.

Returns:

The timestamp in nanoseconds since epoch for the first received packet.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

This example gets the timestamp [NS] of the first transmitted packet in this snapshot

print(snaphot.TimestampFirstGet())
TimestampGet()

Gets the snapshot timestamp [NS].

Return type:

int

Example

print(snaphot.TimestampGet())
TimestampLastGet()

Gets the current timestamp [NS] of the last received packet.

Returns:

The timestamp in nanoseconds since epoch for the last received packet.

Return type:

int

Raises:

DomainError – When no frames are received, this counter is unavailable

Example

print(snaphot.TimestampLastGet())
property thisown

The membership flag

exception byteblowerll.byteblower.UnsupportedFeature(*args)

Bases: DomainError

property thisown

The membership flag

class byteblowerll.byteblower.User(*args, **kwargs)

Bases: AbstractObject

A user connected to the ByteBlower server

A User represents a connection between an API instance and a ByteBlower Port.

This can be queried as following:

from byteblowerll.byteblower import ByteBlower
instance = ByteBlower.InstanceGet()
server = instance.ServerAdd('byteblower-1.excentis.com')
users = server.UsersGet()

for user in users:
    print(user.DescriptionGet())
InterfaceGet()

Returns the interface on which the API has a ByteBlower Port on.

Return type:

str

NameGet()

Returns the name of the API which has a ByteBlower Port on this interface.

Return type:

str

property thisown

The membership flag

class byteblowerll.byteblower.UserList(*args)

Bases: object

This is a List of multiple User objects.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.UserMobile(*args, **kwargs)

Bases: AbstractObject

A user connected to the ByteBlower MeetingPoint

A User represents a connection between an API instance and a ByteBlower Endpoint.

This can be queried as following:

from byteblowerll.byteblower import ByteBlower
instance = ByteBlower.InstanceGet()
meetingpoint = instance.MeetingPointAdd('byteblower-1.excentis.com')
users = meetingpoint.UsersGet()

for user in users:
    print(user.DescriptionGet())
NameGet()

Returns the name of the API which has a WirelessEndpoint with the given UUID.

Return type:

str

UUIDGet()

Returns the UUID on which the API has a WirelessEndpoint object on.

Return type:

str

property thisown

The membership flag

class byteblowerll.byteblower.UserMobileList(*args)

Bases: object

This is a List of multiple UserMobile objects.

It can be iterated just like a normal Python list.

empty()
iterator()
size()

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use ‘len’.

portlist = ByteBlowerPortList()
if len(portlist) == 1:
    print('list only has a single item')
property thisown

The membership flag

class byteblowerll.byteblower.VLANTag(*args, **kwargs)

Bases: Layer25Configuration

Configure the VLAN tag on a ByteBlower Port.

IEEE 802.1Q is the networking standard that supports Virtual LANs (VLANs) on an Ethernet network. The standard defines a system of VLAN tagging for Ethernet frames and the accompanying procedures to be used by bridges and switches in handling such frames

802.1Q does not actually encapsulate the original frame. Instead, for Ethernet frames, it adds a 32-bit field between the source MAC address and the EtherType/Length fields of the original frame

TPID

Tag Protocol Identifier - 16bits

TCI

Tag Control Information - 16bits

In the latter case the TCI consists of:

PCP

Priority Code Point - 3bits

DEI

Drop Eligible Indicator - 1bit

VID

VLAN Identifier - 12bits

DropEligibleGet()

Returns the status of the Drop Eligible Indicator.

A 1-bit field. (formerly CFI) May be used separately or in conjunction with PCP to indicate frames eligible to be dropped in the presence of congestion.

Default value: Disabled

Returns:

True if Drop Eligible Indicator is enabled, False if disabled.

Return type:

bool

DropEligibleSet(value)

Enable/Disable the Drop Eligible Indicator.

A 1-bit field. (formerly CFI) May be used separately or in conjunction with PCP to indicate frames eligible to be dropped in the presence of congestion.

Parameters:

enable (bool) – True will enable the Drop Eligible Indicator False will disable the Drop Eligible Indicator.

Example

vlanTag.DropEligibleSet(True)
IDGet()

Get the VLANID.

A 12-bit field specifying the VLAN to which the frame belongs. The hexadecimal values of 0x000 and 0xFFF are reserved. All other values may be used as VLAN identifiers, allowing up to 40094 VLANs.

Default value: 0

Returns:

the configured VLAN ID installed on this ByteBlower port.

Return type:

int

Example

Getting the vlanID of a ByteBlower port tagged with VLAN Id 107

print(vlanTag.IDGet())
#returns 107
IDSet(inId)

Configure the VLAN ID.

A 12-bit field specifying the VLAN to which the frame belongs. The hexadecimal values of 0x000 and 0xFFF are reserved. All other values may be used as VLAN identifiers, allowing up to 4094 VLANs

Parameters:

id (int) – Your VLAN ID

Example Creating a VLAN tag on the your ByteBlower port

vlanTag.IDSet(2)
PriorityGet()

Get the VLAN Priority.

A 3-bit field which refers to the IEEE 802.1p priority. It indicates the frame priority level. Values are from 0 (best effort) to 7 (highest); 1 represents the lowest priority. These values can be used to prioritize different classes of traffic (voice, video, data, etc.).

Default value: 0

Returns:

Returns the configured priority of the VLAN protocol

Return type:

int

Example

Getting the vlanID of a ByteBlower port tagged with VLAN Id 107

print(vlanTag.PriorityGet())
PrioritySet(inPriority)

Set the VLAN Priority.

A 3-bit field which refers to the IEEE 802.1p priority. It indicates the frame priority level. Values are from 0 (best effort) to 7 (highest); 1 represents the lowest priority. These values can be used to prioritize different classes of traffic (voice, video, data, etc.).

Parameters:

priority (int) – The priority you want to configure: a number between 0 and 7.

Example

vlanTag.PrioritySet(0)
ProtocolIDGet()

Get the VLAN Protocol ID (TPID)

A 16-bit field specifying the VLAN Protocol ID used in the frames.

IEEE 802.1AD specifies the VLAN C-TAG (customer tag) and S-TAG (service-provider tag). The C-TAG (0x8100) is used on the innermost VLAN tag, while the S-TAG (0x88a8) is used on all other VLAN tags.

I.e. When a single VLAN is used on the ByteBlowerPort, the TPID will be 0x8100. When VLAN stacking is used, the innermost VLAN tag (closest to the Ethernet payload) will use the C-TAG (0x8100) while all other VLAN tags use the S-TAG (0x88a8).

Returns:

Returns the used Protocol ID (TPID) for this VLAN tag.

Return type:

int

Example

Getting the vlan TPID of a ByteBlower port tagged with a single VLAN (0x8100 == 33024)

print(vlanTag.ProtocolIDGet())
ProtocolIDSet(value)
property thisown

The membership flag

class byteblowerll.byteblower.WirelessEndpoint(*args, **kwargs)

Bases: AbstractObject

A WirelessEndpoint is a handle to a ByteBlower Endpoint.

New in version 2.6.0.

Example

This example shows how to obtain a WirelessEndpoint object from a MeetingPoint and configure a simple trigger.

Typical flow to create a trigger on a ByteBlower Endpoint
from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
endpoint = meetingpoint.DeviceGet('00ff11-234-234')

endpoint.Lock(True)

trigger = endpoint.RxTriggerBasicAdd()
trigger.FilterSourceAddressSet('10.2.3.5')
trigger.FilterUdpSourcePortSet(5000)
trigger.FilterUdpDestinationPortSet(10000)

# scenario duration is 10 seconds
endpoint.ScenarioDurationSet(int(10*1e9))

# Configure the Endpoint application with the just configured
# trigger and duration
endpoint.Prepare()

start_time = endpoint.Start()
current_time = meetingpoint.TimestampGet()

# wait for the Endpoint to run a test
time.sleep(10 + (start_time - current_time) / 1e9)   

# Request the Endpoint to send its (stored) results to the MeetingPoint.
# Since MeetingPoint 2.20 this is not necessary anymore.
endpoint.ResultGet()

trigger.Refresh()
# ...
AppVersionGet()

Returns the App version.

Return type:

str

Example

 print(endpoint.AppVersionGet())
CapabilityGetByName(name)

Returns a Capability object by its name.

New in version 2.6.0.

Parameters:

name (str) – Name of the Capability to retrieve

Return type:

Capability

Raises:

ConfigError – UnsupportedConfig error message when the Capability is not supported

See the Capability Feature documentation for more information

Example

print(endpoint.CapabilityGetByName('Tcp.Restart').DescriptionGet())
CapabilityIsSupported(name)

Checks whether a capability is supported.

New in version 2.6.0.

Returns:

True if it is supported, False if not

Return type:

bool

Example

 print(endpoint.CapabilityIsSupported('Tcp.Restart'))
CapabilityListGet()

Returns a list of capabilities.

New in version 2.6.0.

Returns:

A list of Capability objects

Return type:

CapabilityList

See the Capability Feature documentation for more information

Example

 capabilityList = endpoint.CapabilityListGet()
DeviceIdentifierGet()

Returns device identifier.

The Device Identifier is an UUID which MUST be unique per instance of the Application. A UUID is unique and is used for all MeetingPoint-Endpoint communication. This allows duplicate Endpoint Device names to happen and still be able to address the correct Endpoint.

Return type:

str

Example

print(endpoint.DeviceIdentifierGet())
DeviceInfoGet()

Returns an object with the Endpoint Device Info.

New in version 2.6.0.

Return type:

DeviceInfo

Device information contains information about:

  • The app version

  • The device network information

  • The device hostname or the user configured name

  • The device OS

Example

device_info = endpoint.DeviceInfoGet()
print(device_info.DescriptionGet())
HeartbeatCountGet()

Returns the number of communication attempts performed by the Endpoint.

Return type:

int

Example

print(endpoint.HeartbeatCountGet())
HeartbeatIntervalGet()

Returns the communication interval.

Returns:

The number of nanoseconds between 2 consecutive communication attempts

Return type:

int

Default value is 1 second

Example

print(endpoint.HeartbeatIntervalGet())
HeartbeatIntervalSet(arg2)

Sets the heartbeat interval.

Parameters:

interval (int) – The number of nanoseconds between 2 communication attempts when not running a scenario. (Default: 1 second)

A ByteBlower Endpoint does not have a permanent communication channel towards the ByteBlower MeetingPoint. Instead, the application will attempt to communicate on set intervals. Since this feels a bit like the beating of a heart, this is called the Heartbeat Mechanism.

The Heartbeat mechanism has a few parameters:

  • Heartbeat Interval:

    The interval configured here

  • Scenario Heartbeat Interval

    The heartbeat mechanism is disabled by default during test execution. Configuring this parameter allows the Endpoint to send updates during the test. See ScenarioHeartbeatIntervalSet()

  • Heartbeat MaxFail count

    When a certain amount of communication attempts fail, the Endpoint app will consider the communication with the MeetingPoint broken. In that case, the Endpoint will revert back to it initial state.

    See HeartbeatMaxFailcountSet()

This method allows to configure the interval betweeen the start of 2 attempts.

Note

When setting the Heartbeat Interval to a value lower than supported by the device, will set the interval to the lowest supported value.

Example

endpoint.HeartbeatIntervalSet(50000000000)
HeartbeatMaxFailcountGet()

Returns the maximum number of communication attempts that may fail before the Endpoint considers the communication broken.

Return type:

int

Example

print(endpoint.HeartbeatMaxFailcountGet())
HeartbeatMaxFailcountSet(arg2)

Sets the maximum number of heartbeats that may fail before the Endpoint considers the communication broken.

Parameters:

max_attempts (int) – Number of communication attemts allowed to fail

Example

endpoint.HeartbeatMaxFailcountSet(3)
HeartbeatTimestampLastGet()

Returns the timestamp of the last received communication attempt.

Returns:

Nanoseconds since epoch when the last communication attempt was made.

Return type:

int

Example

print(endpoint.HeartbeatTimestampLastGet())
Lock(arg2)

Locks or unlocks the endpoint for exclusive access.

Parameters:

lock (bool) – True to lock, False to unlock

The Endpoint application uses the network stack of the operating system on on which the application runs. This means that a ByteBlower Endpoint only can run a single scenario at a given moment in time.

By requiring the Endpoint being locked before a Scenario is pushed to the Endpoint, it is made sure that Scenario configuration changing API calls are blocked by the MeetingPoint when the API instance does not own the lock.

This ensures the correct execution of the given Scenario.

Example

endpoint.Lock(True)

endpoint.Prepare()
endpoint.Start()

# Scenario done
endpoint.Lock(False)
LockGet()

Indicates whether or not the Endpoint is locked.

Return type:

bool

Example

print(endpoint.LockGet())
LockIsOwner()

Indicates whether or not the current API instance owns the Endpoint.

Returns:

True when this API instance has the lock.

Return type:

bool

See Lock() to get more information about why locking is necessary.

Example

print(endpoint.LockIsOwner())
LockOwnerGet()

Returns the name of the current lock owner.

Returns:

The name of this API instance.

Return type:

str

See Lock() to get more information about why locking is necessary.

Example

print(endpoint.LockOwnerGet())
# prints "username@laptop.excentis.com"
LockTry(lock, expected)

Tries to lock the Endpoint.

Parameters:
  • lock (bool) – Whether to lock the device or not

  • expected_state (bool) – The state the device currently should be in

Returns:

True if the operation succeeded, False if the operation failed

Return type:

bool

Example

endpoint.LockTry(False, True)
LogClear()

Clears the (debug) log messages on the Endpoint.

Example

endpoint.LogGet()
LogGet()

Returns the ByteBlower Endpoint log messages.

These log messages might be useful for debugging specific issues.

Return type:

str

Example

 print(endpoint.LogGet())
LogLevelGet()

Gets the log level on the Endpoint.

Return type:

LogLevel

Example

from byteblowerll.byteblower import ByteBlower
from byteblowerll.byteblower import LogLevel

meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
endpoint = meetingpoint.DeviceGet('uuid')
loglevel = endpoint.LogLevelGet()

if (loglevel = LogLevel.Info):
    print('Log Level is set to INFO')
LogLevelSet(l)

Sets the log level on the Endpoint.

Parameters:

level (LogLevel) – Level to set the Endpoint log level to.

Example

from byteblowerll.byteblower import ByteBlower
from byteblowerll.byteblower import LogLevel
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
endpoint = meetingpoint.DeviceGet('some-uuid'

endpoint.LogLevelSet(LogLevel.Info)

assert endpoint.LogLevelGet() == LogLevel.Info
MeetingPointGet()

Retrieves the ByteBlower MeetingPoint from which this object is obtained

Return type:

MeetingPoint

Prepare()

Prepare the Endpoint

Preparing the Endpoint requires the user to have a lock on the Endpoint. Using this process, the configured scenario is validated and configured on the application by the MeetingPoint.

Example

endpoint.Prepare()
PrepareAsync()

Signal the ByteBlower Endpoint to prepare the scenario, but do not wait for the confirmation.

See Prepare() for more information about Preparation

Example

endpoint.PrepareAsync()
# Do some time consuming stuff
endpoint.Prepare()
ProtocolHttpClientAdd()

Adds a httpClient to this Endpoint.

Returns:

an object representing the HTTP Client

Return type:

HTTPClientMobile

Example

http_client = endpoint.ProtocolHttpClientAdd()
ProtocolHttpClientGet()

Returns the list of HTTP client applications created on this Endpoint.

Returns:

A list of configured HTTP clients on the Endpoint.

Return type:

HTTPClientMobileList

Example

client = endpoint.ProtocolHttpClientAdd()
# configure the client ...

known_clients = endpoint.ProtocolHttpClientGet()
for http_client in known_clients:
    print(http_client.DescriptionGet())
ProtocolHttpClientRemove(arg2)

Removes a given HTTP Client to this Endpoint.

Parameters:

client (HTTPClientMobile) – A configured HTTP Client to remove

Example

http_client = endpoint.ProtocolHttpClientAdd()
endpoint.ProtocolHttpClientRemove(http_client)
ResultAsyncGet()

Request the results without waiting for the reply.

Deprecated since version 2.20.0: Since ByteBlower 2.20.0, the ByteBlower MeetingPoint will request the results automatically after a test, rendering this method deprecated.

Example

from byteblowerll.byteblower import ByteBlower
meetingpoint = ByteBlower.MeetingPointAdd('byteblower-1.lab.byteblower.com')
endpoint = meetingpoint.DeviceGet('some-uuid')
endpoint.Lock(True)

# some configuration

endpoint.Prepare()
endpoint.Start()

# Wait for endpoint to be finished

# Request the results
endpoint.ResultAsyncGet()

# do some time consuming work.

# wait until the results are in.
endpoint.ResultGet()

# process the results
# ...
ResultClear()

Clears the results for the ByteBlower Endpoint.

This clears all results on the ByteBlower MeetingPoint and ByteBlower Endpoint.

Example

typical usecase
endpoint.Prepare()
endpoint.ResultClear()
endpoint.Start()
ResultGet()

Request the results.

Deprecated since version 2.20.0: Since ByteBlower 2.20.0, the ByteBlower MeetingPoint will request the results automatically after a test, rendering this method deprecated.

Requests the result and waits for the reply. If a previous call to ResultAsyncGet() was made then this call does not trigger a new request and instead waits for the async result.

Example

print(endpoint.ResultGet())
RxLatencyBasicAdd()

Adding a Latency Basic receive trigger to this Endpoint.

Return type:

LatencyBasicMobile

A latency basic trigger will calculate latency over the matched incoming frames. Using these latency values, the trigger will calculate some statistics:

  • Minimum latency

  • Average latency

  • Maximum latency

  • Jitter

In order to calculate the correct latency values, the transmitting side of the flow, must inject the correct timestamps.

See FrameMobile for information on timestamping.

Example

latencyTrigger = endpoint.RxLatencyBasicAdd()
RxLatencyBasicGet()

Returns the list of latency triggers created on this Endpoint.

Returns:

A list of LatencyBasicMobile objects configured on the Endpoint.

Return type:

LatencyBasicMobileList

See RxLatencyBasicAdd() for more information about Latency Basic triggers

Example

 trigger = endpoint.RxLatencyBasicAdd()

 known_triggers = endpoint.RxLatencyBasicGet() 

 for rxLatency in known_triggers:
   print(rxLatency.DescriptionGet())
RxLatencyBasicRemove(arg2)

Adding a RxLatency to this Endpoint.

Parameters:

item (LatencyBasicMobile) – Latency Basic Trigger to remove from this scenario

See RxLatencyBasicAdd() for more information about Latency Basic triggers

Example

latencyTrigger = endpoint.RxLatencyBasicAdd()
endpoint.RxLatencyBasicRemove(latencyTrigger)
RxLatencyDistributionAdd()

Creates a latency histogram receive trigger.

New in version 2.12.16.

Return type:

LatencyDistributionMobile

A latency histogram trigger will calculate latency over the matched incoming frames. Using these latency values, the trigger will calculate some statistics:

  • Minimum latency

  • Average latency

  • Maximum latency

  • Jitter

Next to these basic statistics, this trigger will also keep track of a latency histogram.

In order to calculate the correct latency values, the transmitting side of the flow, must inject the correct timestamps.

See FrameMobile for information on timestamping.

Example

distribution = endpoint.RxLatencyDistributionAdd()
RxLatencyDistributionGet()

Returns the list of latency distribution triggers created on this Endpoint.

New in version 2.12.16.

Returns:

A list of LatencyDistributionMobile objects configured on the Endpoint

Return type:

LatencyDistributionMobileList

See RxLatencyDistributionAdd() for more information.

Example

trigger = endpoint.RxLatencyDistributionAdd()

all_latency = endpoint.RxLatencyDistributionGet()
for latency in all_latency:
    print(latency.DescriptionGet())
RxLatencyDistributionRemove(arg2)

Removes a given Latency Distribution trigger from the Endpoint

New in version 2.12.16.

Parameters:

trigger (LatencyDistributionMobile) – The Trigger to remove

See RxLatencyDistributionAdd() for more information.

Example

Cleanup of all Latency Distribution triggers
trigger = endpoint.RxLatencyDistributionAdd()
# ... 
endpoint.RxLatencyDistributionRemove(trigger)
RxTriggerBasicAdd()

Adds a basic trigger for FrameBlasting to this Endpoint.

Returns:

The created Trigger object.

Return type:

TriggerBasicMobile

A basic trigger gathers statistics about incoming frames onto a specific UDP endpoint.

Examples of statistics gathered.

  • Number of packets received

  • Number of bytes received

  • Size of the largest and smallest frame

  • Timestamp of the first and last frame

Example

trigger = endpoint.RxTriggerBasicAdd()
Calculating loss over a frameblasting flow.
stream_result = stream.ResultGet()
stream_result.Refresh()

trigger_result = trigger.ResultGet()
trigger_result.Refresh()

transmitted_packets: int = stream_result.PacketCountGet()
received_packets: int = trigger_result.PacketCountGet()

lost_packets = transmitted_packets - received_packets
loss = lost_packets * 100.0 / transmitted_packtes

print(f'This flow lost {loss:.1f}% of traffic.  This is {lost_packets} frames.')
RxTriggerBasicGet()

Returns the list of receive triggers created on this Endpoint.

Returns:

a list containing the configured TriggerBasicMobile objects

Return type:

TriggerBasicMobileList

Example

print(endpoint.RxTriggerBasicGet()[0])
RxTriggerBasicRemove(arg2)

Removes a basic trigger for FrameBlasting from this Endpoint.

Parameters:

trigger (TriggerBasicMobile) – The Trigger object to remove.

See RxTriggerBasicAdd() for more information about the receive triggers

Example

trigger = endpoint.RxTriggerBasicAdd()
endpoint.RxTriggerBasicRemove(trigger)
ScenarioDurationGet()

Returns the total duration of the scenario.

Return type:

int

ScenarioDurationSet(arg2)

Configures the total duration of the scenario.

This is especially useful when the Endpoint must stay in running longer than the configured scenario objects require it to be.

Parameters:

duration (int) – Duration in nanoseconds

ScenarioHeartbeatIntervalGet()

Returns the communication interval used while running a scenario.

Returns:

The number of nanoseconds between communication attempts

Return type:

int

Default value is 10 seconds. Setting it to a large value means disabled.

Example

print(endpoint.ScenarioHeartbeatIntervalGet())
ScenarioHeartbeatIntervalSet(arg2)

Sets the heartbeat interval to be used when a scenario is running.

Parameters:

interval (int) – The number of nanoseconds between 2 communication attempts during a scenario.

The allowed value range is 0 (disabled, default) and maximum 86400000000000 (1 day).

When a value is below the minimum value supported by a specific Endpoint device, the supported value is taken. When a value is above the upper threshold of 1 day, 1 day will be used.

Note

A value of max int64 (9223372036854775807) will disable heartbeating during scenarios. From 2.22.0 on, this value will be a normal valid value.

See HeartbeatIntervalSet() for more information about the Heartbeat intervals

Example

endpoint.ScenarioHeartbeatIntervalSet(50000000000)
Start()

Start the configured Scenario on the Endpoint.

Returns:

Time in nanoseconds since epoch on which the Endpoint will start.

Return type:

int

Since the Endpoint does not have a fixed communication channel towards the ByteBlower MeetingPoint. This method schedules a start at a small amount of time in the future, so the ByteBlower Endpoint application is able to fetch the assignment and prepare for execution.

The return value is the timestamp in the MeetingPoint’s clock domain on which the Endpoint really should start. This value can be compared to the value reported by MeetingPoint.TimestampGet.

Example

# Send the scenario to the Endpoint
endpoint.Prepare()

# Start the Scenario on the Endpoint
start_time = endpoint.Start()

mp_time = meetingpoint.TimestampGet()
time.sleep((start_time - mp_time) / 1e9)
StartAsync()

Signal the endpoint to start the scenario, but do not wait for confirmation.

See Start() for more information

Example

endpoint.StartAsync()

# Do some time consuming work
# ...

start_time = endpoint.Start()
StatusGet()

Returns the device status.

The status indicates the current state of the Endpoint application. States are used to indicate whether the application is available for use, or e.g. running a test.

Return type:

DeviceStatus

Example

print(endpoint.StatusGet())
Stop()

Signal the Endpoint to stop the scenario.

When stop is invoked, the ByteBlower MeetingPoint will signal the ByteBlower Endpoint as soon as possible to stop the current test.

Since the ByteBlower Endpoint only communicates once every communication interval (see: ScenarioHeartbeatIntervalGet()), this operation might take up to 4 times this interval duration.

When the call is not allowed to block for such an amount of time, StopAsync() might be used to signal the stop command.

Example

endpoint.Stop()
StopAsync()

Signal the Endpoint to stop the scenario, but do not wait for confirmation.

See Stop() for more information.

Example

endpoint.StopAsync()
# do some time consuming work
endpoint.Stop()
TxStreamAdd()

Adds a Stream for Frame-Blasting to this Endpoint.

Returns:

an object representing a Stream.

Return type:

StreamMobile

Example

stream = endpoint.TxStreamAdd()
TxStreamGet()

Returns the list of streams created on this Endpoint.

Returns:

A list of streams configured on the Endpoint.

Return type:

StreamMobileList

Example

endpoint.TxStreamAdd()
# configure this stream

# Print the current streams.
for stream in device.TxStreamGet():
    print(stream.DescriptionGet())
TxStreamRemove(arg2)

Removes a Stream for Frame-Blasting from this Endpoint.

Parameters:

stream (StreamMobile) – an object representing a Stream.

Example

stream = endpoint.TxStreamAdd()
endpoint.TxStreamRemove(stream)
property thisown

The membership flag

class byteblowerll.byteblower.WirelessEndpointList(*args)

Bases: object

This is a List of multiple ByteBlower Endpoint objects.

append(x)
clear()
empty()
erase(*args)
iterator()
push_back(x)

Deprecated since version 2.22.0.

This is a leaked implementation detail, please use append().

property thisown

The membership flag

Module contents