byteblowerll package¶
byteblowerll.byteblower module¶
byteblowerll.byteblower.ByteBlower (*args, …) |
Singleton class that is the entry point to start using the ByteBlower API. |
byteblowerll.byteblower.ByteBlowerAPIException () |
|
byteblowerll.byteblower.ByteBlowerInterface (…) |
Example |
byteblowerll.byteblower.ByteBlowerInterfaceList (*args) |
|
byteblowerll.byteblower.ByteBlowerLicense (…) |
This class represents the license information of your connected server. |
byteblowerll.byteblower.ByteBlowerPort (…) |
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. |
byteblowerll.byteblower.ByteBlowerPortList (*args) |
|
byteblowerll.byteblower.ByteBlowerPortResultData (…) |
ByteBlower port counter result set. |
byteblowerll.byteblower.ByteBlowerPortResultHistory (…) |
Port counter result history. |
byteblowerll.byteblower.ByteBlowerPortResultRxData (…) |
ByteBlower port counter result set. |
byteblowerll.byteblower.ByteBlowerPortResultSnapshot (…) |
ByteBlower port counter result set. |
byteblowerll.byteblower.ByteBlowerServer (…) |
Representation of a client connection to a shared, physical ByteBlower server, which can send and receive network traffic through its interfaces. |
byteblowerll.byteblower.ByteBlowerServerServiceInfo (…) |
This class contains information on the ByteBlower System. |
byteblowerll.byteblower.Capability (*args, …) |
Represents a capability, A feature it supports or not. |
byteblowerll.byteblower.CapabilityValue (…) |
The Capability Value class. |
byteblowerll.byteblower.CapturedFrame (…) |
A representation of a Captured Frame captured using a CaptureRawPacket . |
byteblowerll.byteblower.CapturedHTTPData (…) |
This class represents captured HTTP data. |
byteblowerll.byteblower.CaptureRawPacket (…) |
This class is used to capture the raw packet data that is received on the Physical interface that is associated with a ByteBlowerPort. |
byteblowerll.byteblower.CaptureResultSnapshot (…) |
This class represents the result of a CaptureRawpacket . |
byteblowerll.byteblower.CHAPProtocol (*args, …) |
Represents the Challenge-Handshake Authentication Protocol |
byteblowerll.byteblower.DataRate (inSize, …) |
Represents a data rate. |
byteblowerll.byteblower.DataSize (bytes) |
Represents a data size. |
byteblowerll.byteblower.DeviceInfo (*args, …) |
Device information of the wireless endpoint. |
byteblowerll.byteblower.DHCPv4Protocol (…) |
The DHCPv4Protocol is the entry point to configure the DHCP client behavior of a ByteBlowerPort. |
byteblowerll.byteblower.DHCPv4SessionInfo (…) |
Class containing the info about the DHCPSession. |
byteblowerll.byteblower.DHCPv6Protocol (…) |
The DHCPv6Protocol is the entry point to configure the DHCPv6 client |
byteblowerll.byteblower.DHCPv6SessionInfo (…) |
Class containing the info about the DHCPSession. |
byteblowerll.byteblower.EthernetConfiguration (…) |
EthernetII provides an interface for the Ethernet configuration on a ByteBlower port. |
byteblowerll.byteblower.Frame (*args, **kwargs) |
Class: Frame |
byteblowerll.byteblower.FrameFieldModifierIncremental (…) |
A frame field modifier which will increase the value of the frame field between a minimum and maximum value. |
byteblowerll.byteblower.FrameFieldModifierRandom (…) |
A frame field modifier which will change the field value of the frame randomly between a minimum and maximum value. |
byteblowerll.byteblower.FrameMobile (*args, …) |
A FrameMobile is an object that configures the payload of a frame belonging to a StreamMobile object. |
byteblowerll.byteblower.FrameResultData (…) |
|
byteblowerll.byteblower.FrameResultHistory (…) |
Sender-side frame transmission result history. |
byteblowerll.byteblower.FrameResultSnapshot (…) |
TODO |
byteblowerll.byteblower.FrameSizeModifierGrowing (…) |
A frame size modifier which will increase the size of the frame between a minimum and maximum value. |
byteblowerll.byteblower.FrameSizeModifierRandom (…) |
A frame size modifier which will change the size of the frame randomly between a minimum and maximum value. |
byteblowerll.byteblower.FrameSizeModifierResultSnapshot (…) |
A collection of statistics containing the results of a frame size modifier. |
byteblowerll.byteblower.FrameTagMetrics (…) |
Class which represents the metrics of a FrameTag. |
byteblowerll.byteblower.FrameTagRx (*args, …) |
The FrameTagRx class describes the receive configuration of a Tag in a Frame. |
byteblowerll.byteblower.FrameTagTx (*args, …) |
The FrameTagTx class describes the transmit configuration of a Tag in a Frame. |
byteblowerll.byteblower.HTTPClient (*args, …) |
HTTP client application that may schedule HTTP requests to real webservers or the HTTP server application. |
byteblowerll.byteblower.HTTPClientMobile (…) |
HTTP client application that may schedule HTTP requests to the HTTP server application. |
byteblowerll.byteblower.HTTPMultiClient (…) |
HTTPMultiClient can be used in combination with MultiServer to start multiple concurrent HTTP requests. |
byteblowerll.byteblower.HTTPMultiResultData (…) |
Contains the result counters for HTTPMultiClient or HTTPMultiServer . |
byteblowerll.byteblower.HTTPMultiResultHistory (…) |
General interface for getting cumulative or interval results. |
byteblowerll.byteblower.HTTPMultiResultSnapshot (…) |
Refreshable snapshot that contains the result counters for HTTPMultiClient or HTTPMultiServer. |
byteblowerll.byteblower.HTTPMultiServer (…) |
HTTPMultiServer provides the server-side for HTTPMultiClient. |
byteblowerll.byteblower.HTTPResultData (…) |
Contains the HTTP result counters. |
byteblowerll.byteblower.HTTPResultHistory (…) |
General interface for getting cumulative or interval results. |
byteblowerll.byteblower.HTTPResultSnapshot (…) |
Contains HTTP result counters. |
byteblowerll.byteblower.HTTPServer (*args, …) |
HTTP server application that handles incoming HTTP requests with the correct URL format by returning a document of the appropriate size. |
byteblowerll.byteblower.HTTPSessionInfo (…) |
Class containing the info about the HTTPSession. |
byteblowerll.byteblower.ICMPEchoSession (…) |
Session for handling ICMP Echo Requests and Replies. |
byteblowerll.byteblower.ICMPEchoSessionInfo (…) |
|
byteblowerll.byteblower.ICMPProtocol (*args, …) |
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. |
byteblowerll.byteblower.ICMPv6EchoSession (…) |
Session for handling ICMPv6 Echo Requests and Replies. |
byteblowerll.byteblower.ICMPv6EchoSessionInfo (…) |
|
byteblowerll.byteblower.ICMPv6Protocol (…) |
ICMPv6 Protocol. |
byteblowerll.byteblower.IGMPMemberSessionInfo (…) |
InfoObject of the IGMPSession. |
byteblowerll.byteblower.IGMPProtocol (*args, …) |
The Internet Group Management Protocol (IGMP) Protocol for IPv4 manages multicast group membership for a given IPv4 host. |
byteblowerll.byteblower.IGMPProtocolInfo (…) |
Class: IGMPProtocolInfo |
byteblowerll.byteblower.IGMPv1MemberSession (…) |
|
byteblowerll.byteblower.IGMPv2MemberSession (…) |
|
byteblowerll.byteblower.IGMPv3MemberSession (…) |
|
byteblowerll.byteblower.IPv4Configuration (…) |
Provides an interface for the IPv4 configuration on a ByteBlower port. |
byteblowerll.byteblower.IPv4CPProtocol (…) |
Internet Protocol Control Protocol. |
byteblowerll.byteblower.IPv6Configuration (…) |
A class representing the IPv6 protocol that allows managing IPv6 settings, running IPv6 commands and accessing attached protocols. |
byteblowerll.byteblower.IPv6CPProtocol (…) |
IP version 6 over PPPoE. |
byteblowerll.byteblower.LatencyBasic (*args, …) |
Receive-side packet processor which calculates latency on the incoming frames, matching a filter. |
byteblowerll.byteblower.LatencyBasicMobile (…) |
Receive-side packet processor which calculates latency on the incoming frames, matching a filter. |
byteblowerll.byteblower.LatencyBasicResultData (…) |
Receive-side latency result set. |
byteblowerll.byteblower.LatencyBasicResultHistory (…) |
Receive-side latency result history. |
byteblowerll.byteblower.LatencyBasicResultSnapshot (…) |
Receive-side latency result set. |
byteblowerll.byteblower.LatencyDistribution (…) |
Receive-side packet processor which calculates distribution of latency on the incoming frames, matching a filter. |
byteblowerll.byteblower.LatencyDistributionMobile (…) |
Receive-side packet processor which calculates distribution of latency on the incoming frames, matching a filter. |
byteblowerll.byteblower.LatencyDistributionResultSnapshot (…) |
The latency distribution result. |
byteblowerll.byteblower.MeetingPoint (*args, …) |
A MeetingPoint is a server that controls a set of wireless devices. |
byteblowerll.byteblower.MeetingPointLicense (…) |
This class represents the license information of your connected Meeting Point. |
byteblowerll.byteblower.MeetingPointServiceInfo (…) |
This class contains information on the MeetingPoint System. |
byteblowerll.byteblower.MLDMulticastListenerSessionInfo (…) |
|
byteblowerll.byteblower.MLDProtocol (*args, …) |
The Multicast Listener Discovery Protocol (MLD) Protocol for IPv6 manages multicast address listening for a given IPv6 host. |
byteblowerll.byteblower.MLDProtocolInfo (…) |
|
byteblowerll.byteblower.MLDv1MulticastListenerSession (…) |
|
byteblowerll.byteblower.MLDv1StartListening (arg2) |
|
byteblowerll.byteblower.MLDv1StopListening (arg2) |
|
byteblowerll.byteblower.MLDv2MulticastListenerSession (…) |
|
byteblowerll.byteblower.MultipleBurstModifier (…) |
|
byteblowerll.byteblower.NetworkInfo (*args, …) |
Network information of the wireless endpoint. |
byteblowerll.byteblower.NetworkInfoMonitor (…) |
Monitor to collect the NetworkInfo over time |
byteblowerll.byteblower.NetworkInfoMonitorResultHistory (…) |
History for the network info monitor representing the results over time |
byteblowerll.byteblower.NetworkInfoMonitorResultData (…) |
Result snapshot for the network information. |
byteblowerll.byteblower.NetworkInterface (…) |
NetworkInterface information of the wireless endpoint. |
byteblowerll.byteblower.NetworkInterfaceType |
|
byteblowerll.byteblower.NormalDistributionTimingModifier (…) |
|
byteblowerll.byteblower.OutOfSequence (*args, …) |
Receive-side packet processor which checks out-of-sequence on the incoming frames, matching a filter. |
byteblowerll.byteblower.OutOfSequenceResultData (…) |
Non-refreshable object containing the out-of-sequence results. |
byteblowerll.byteblower.OutOfSequenceResultHistory (…) |
Receive-side out-of-sequence result history. |
byteblowerll.byteblower.OutOfSequenceResultSnapshot (…) |
Refreshable object containing the out-of-sequence results. |
byteblowerll.byteblower.PacketDump (*args, …) |
Utility for dumping ByteBlower network traffic to a pcap file. |
byteblowerll.byteblower.PAPProtocol (*args, …) |
Represents the Password Authentication Protocol |
byteblowerll.byteblower.PPPoEClient (*args, …) |
A PPPoE client which allows you to setup Layer3 connectivity. |
byteblowerll.byteblower.PPPProtocol (*args, …) |
The Point-to-Point Protocol (PPP) provides a standard method for transporting multi-protocol datagrams over point-to-point links. |
byteblowerll.byteblower.Schedule (*args, **kwargs) |
This class contains the base functionality to configure a scheduled action. |
byteblowerll.byteblower.ScheduleGroup (*args, …) |
A collection of schedulable objects that can be started. |
byteblowerll.byteblower.Stream (*args, **kwargs) |
A ByteBlower stream is an object representing a stream of ByteBlower frames (Frame) used for transmission on a ByteBlower port. |
byteblowerll.byteblower.StreamGrowingSizeModifier (…) |
A frame size modifier which will increase the size of the frame between a minimum and maximum value. |
byteblowerll.byteblower.StreamMobile (*args, …) |
A StreamMobile object configures a stream of frames that will be transmitted by a WirelessEndpoint. |
byteblowerll.byteblower.StreamRandomSizeModifier (…) |
A frame size modifier which will change the size of the frame randomly between a minimum and maximum value. |
byteblowerll.byteblower.StreamResultData (…) |
|
byteblowerll.byteblower.StreamResultHistory (…) |
Sender-side transmit result history. |
byteblowerll.byteblower.StreamResultSnapshot (…) |
|
byteblowerll.byteblower.StreamRuntimeStatus (…) |
Status information about a Stream |
byteblowerll.byteblower.TCPResultData (*args, …) |
Contains static TCP result counters. |
byteblowerll.byteblower.TCPResultHistory (…) |
Interface that allows you to obtain the cumulative and interval result data objects regarding TCP stats. |
byteblowerll.byteblower.TCPResultSnapshot (…) |
Contains TCP result counters. |
byteblowerll.byteblower.TCPSessionInfo (…) |
Class containing info about the TCP session. |
byteblowerll.byteblower.TCPTunnel (*args, …) |
Creates a TCP port forwarding configuration between a local host and a remote server. |
byteblowerll.byteblower.TelnetClient (*args, …) |
A Telnet client application that allows communication with an external Telnet server. |
byteblowerll.byteblower.TriggerBasic (*args, …) |
Receive-side packet processor which counts the incoming frames, matching a filter. |
byteblowerll.byteblower.TriggerBasicMobile (…) |
Receive-side packet processor on a WirelessEndpoint that counts all incoming frames that match a filter. |
byteblowerll.byteblower.TriggerBasicResultData (…) |
Receive-side trigger result set. |
byteblowerll.byteblower.TriggerBasicResultHistory (…) |
Receive-side trigger result history. |
byteblowerll.byteblower.TriggerBasicResultSnapshot (…) |
Receive-side trigger result set. |
byteblowerll.byteblower.TriggerSizeDistribution (…) |
Receive-side packet processor which counts the incoming frames, frame rate and frames per size, matching a filter. |
byteblowerll.byteblower.TriggerSizeDistributionResultSnapshot (…) |
Contains the results for the size distribution. |
byteblowerll.byteblower.VLANTag (*args, **kwargs) |
Configure the VLAN tag on a ByteBlower Port. |
byteblowerll.byteblower.WirelessEndpoint (…) |
A WirelessEndpoint is a handle to a wireless device-under-test. |
byteblowerll.byteblower.ByteBlowerPortCounterType |
|
byteblowerll.byteblower.DeviceOsType |
|
byteblowerll.byteblower.DeviceStatus |
|
byteblowerll.byteblower.EthernetEncoding |
|
byteblowerll.byteblower.FrameTagType |
The type of the FrameTag as found in a Trigger and a Frame |
byteblowerll.byteblower.HTTPMultiClientStatus |
|
byteblowerll.byteblower.HTTPMultiServerStatus |
|
byteblowerll.byteblower.HTTPRequestMethod |
|
byteblowerll.byteblower.HTTPRequestStatus |
|
byteblowerll.byteblower.HTTPRequestType |
|
byteblowerll.byteblower.HTTPServerStatus |
|
byteblowerll.byteblower.IGMPVersion |
|
byteblowerll.byteblower.LinkStatus |
Link status object |
byteblowerll.byteblower.LinkType |
|
byteblowerll.byteblower.LogLevel |
|
byteblowerll.byteblower.MLDVersion |
|
byteblowerll.byteblower.ModifierType |
|
byteblowerll.byteblower.MulticastSourceFilter |
|
byteblowerll.byteblower.NetworkInterfaceType |
|
byteblowerll.byteblower.PhysicalInterfaceType |
|
byteblowerll.byteblower.PPPoEStatus |
|
byteblowerll.byteblower.RequestStartType |
|
byteblowerll.byteblower.ResultDataType |
|
byteblowerll.byteblower.RetransmissionPolicy |
|
byteblowerll.byteblower.Role |
|
byteblowerll.byteblower.ScheduleGroupStatus |
|
byteblowerll.byteblower.SequenceNumberFormat |
|
byteblowerll.byteblower.TCPCongestionAvoidanceAlgorithm |
|
byteblowerll.byteblower.TCPConnectionState |
The state of the TCP Connection |
byteblowerll.byteblower.TimeStampFormat |
|
byteblowerll.byteblower.TimeUnit |
|
byteblowerll.byteblower.TransmitErrorSource |
The source of an error of a Stream |
byteblowerll.byteblower.TransmitErrorStatus |
The error status of a Stream |
byteblowerll.byteblower.TransmitStatus |
The current transmission status of a class:Stream |
-
class
byteblowerll.byteblower.
AbstractModifier
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
GetByteBlowerStream
()¶
-
GetModifierType
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
AbstractObject
(*args, **kwargs)¶ Bases:
object
Base class for most of the ByteBlowerobjects
-
DescriptionGet
(*args)¶ Gets a textual description for the current object
Example
from byteblowerll.byteblower import ByteBlower server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com') # ... # :return: TODO
Gets a textual description for the current object
Example
from byteblowerll.byteblower import ByteBlower server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com') # ... # :return: TODO
-
ParentGet
()¶ Returns the parent object.
-
Refresh
()¶ Retrieves the latest data from the server for this object.
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
AbstractObjectList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
AbstractRefreshableResult
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
AbstractRefreshableResultList
(*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)¶
-
thisown
¶ The membership flag
-
-
exception
byteblowerll.byteblower.
AddressResolutionFailed
(*args)¶ Bases:
byteblowerll.byteblower.InitializationError
-
thisown
¶ The membership flag
-
-
byteblowerll.byteblower.
BB
()¶
-
class
byteblowerll.byteblower.
Buffer
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
BufferList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlower
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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.
Example
-
DefaultTimeout
= 10000000000¶
-
static
DestroyInstance
()¶
-
static
InstanceGet
()¶ Creates or returns the ByteBlower API singleton instance.
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.
Returns: ByteBlower singleton instance. Example
instance = bb.InstanceGet()
-
MeetingPointAdd
(*args)¶ Opens a connection to a
MeetingPoint
and adds it to the current API instance.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.
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.
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).Raises: <python_error> - Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
- When the <port> parameter is provided and is no integer.Example
bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
Opens a connection to a
MeetingPoint
and adds it to the current API instance.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.
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.
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).Raises: <python_error> - Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
- When the <port> parameter is provided and is no integer.Example
bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
Opens a connection to a
MeetingPoint
and adds it to the current API instance.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.
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.
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).Raises: <python_error> - Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
- When the <port> parameter is provided and is no integer.Example
bb.MeetingPointAdd('byteblower-1.lab.byteblower.com')
-
MeetingPointGet
()¶ Returns all Meeting Point connections within this API instance.
See
MeetingPointAdd()
for more informationNew in version 2.6.0.
Returns: MeetingPointList
with objects created within this API instance. Can be emptyExample
meetingPoint = bb.MeetingPointGet()
-
MeetingPointRemove
(inMeetingPoint)¶
-
MeetingPointRemoveAll
()¶
-
PortsStart
(inPorts)¶ Starts all traffic streams and application schedules on the specified ByteBlower ports.
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
andSchedulesStart()
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.
Parameters: ports – ByteBlowerPortList
Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <ports> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <ports> is no ByteBlowerPort object. Example
bb.PortsStart()
-
PortsStartAll
()¶
-
PortsStop
(inPorts)¶ Stops all traffic streams and application schedules on the specified ByteBlower ports.
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.
Parameters: args – Zero, one or more ByteBlowerPort objects on which to abort traffic streams and application schedules. Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <ports> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <ports> is no ByteBlowerPort object. Example
bb.PortsStop()
-
PortsStopAll
()¶
-
ResultsRefresh
(inResults)¶ Refreshes multiple result objects.
New in version 2.2.
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.
Returns: nothing Example
bb.ResultsRefresh()
-
ScheduleGroupCreate
()¶ Create a ScheduleGroup.
Returns: ScheduleGroup
Example
bb.ScheduleGroupCreate()
-
ScheduleGroupGet
()¶ Returns all existing ScheduleGroup.
Returns: ScheduleGroupList
Example
scheduleGroup = bb.ScheduleGroupGet('byteblower-1.lab.byteblower.com')
-
SchedulesStart
(inSchedules)¶ Starts the specified schedulable objects.
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:
IgmpScheduleIpMulticastListen
IgmpSchedule.Join
IgmpSchedule.Leave
Note
Bug HTTP requests are not yet available as a schedulable object and cannot be used with this method.
Parameters: schedules – Zero, one or more schedulable objects to start. Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <schedules> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <schedules> is no schedulable object. Example
bb.SchedulesStart()
-
SchedulesStop
(inSchedules)¶ Stops the specified schedulable objects.
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.
Parameters: inSchedules – Zero, one or more schedulable objects to abort. Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <schedules> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <schedules> is no schedulable object. Example
-
ServerAdd
(*args)¶ Opens a connection to a ByteBlower server and adds it to the current API instance.
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
Returns: A
ByteBlowerServer
object that represents the server connection.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).Raises: ByteBlowerServerIncompatible
When the ByteBlower server daemon is running an incompatible version.Raises: <python_error>: Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
When the <port> parameter is provided and is no integer.Example
This example connects to the server ‘byteblower-1.lab.byteblower.com¶bb = bb.ServerAdd('byteblower-1.lab.byteblower.com')
Opens a connection to a ByteBlower server and adds it to the current API instance.
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
Returns: A
ByteBlowerServer
object that represents the server connection.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).Raises: ByteBlowerServerIncompatible
When the ByteBlower server daemon is running an incompatible version.Raises: <python_error>: Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
When the <port> parameter is provided and is no integer.Example
This example connects to the server ‘byteblower-1.lab.byteblower.com¶bb = bb.ServerAdd('byteblower-1.lab.byteblower.com')
Opens a connection to a ByteBlower server and adds it to the current API instance.
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
Returns: A
ByteBlowerServer
object that represents the server connection.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).Raises: ByteBlowerServerIncompatible
When the ByteBlower server daemon is running an incompatible version.Raises: <python_error>: Relevant network error: When something unexpectedly went wrong with the network connection.
Raises: NotImplementedError
When the <port> parameter is provided and is no integer.Example
This example connects to the server ‘byteblower-1.lab.byteblower.com¶bb = bb.ServerAdd('byteblower-1.lab.byteblower.com')
-
ServerCount
()¶
-
ServerGet
()¶ Returns all server connections within this API instance.
See
ServerAdd()
for more information.Returns: a ByteBlowerServerList
objectExample
-
ServerRemove
(inByteBlowerServer)¶
-
ServerRemoveAll
()¶
-
WirelessEndpointsPrepare
(inWirelessEndpoints)¶ Prepares all the specified Wireless Endpoints.
If a wireless endpoint does not contain any streams or schedules, nothing happens for that Wireless Endpoint.
Parameters: wirelessEndpoints – a WirelessEndpointList
object with zero, one or more WirelessEndpoint objects on which to start traffic streams and application schedules.Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <wirelessEndpoints> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <wirelessEndpoints> is no WirelessEndpoint object. Raises: TechnicalError
- When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.
-
WirelessEndpointsPrepareAsync
(inWirelessEndpoints)¶ Prepares all the specified Wireless Endpoints in an asynchronious way.
If a wireless endpoint does not contain any streams or schedules, nothing happens for that Wireless Endpoint.
Parameters: wirelessEndpoints – a WirelessEndpointList
object with zero, one or more ByteBlowerPort objects on which to start traffic streams and application schedules.Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <wirelessEndpoints> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <wirelessEndpoints> is no WirelessEndpoint object. Raises: TechnicalError
- When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.Example
bb.WirelessEndpointsPrepareAsync()
-
WirelessEndpointsStart
(inWirelessEndpoints)¶ Starts all traffic streams and application schedules on the specified Wireless Endpoints.
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 wireless endpoint does not contain any streams or schedules, nothing happens for that Wireless Endpoint.Parameters: wirelessEndpoints – a WirelessEndpointList
object with zero, one or more WirelessEndpoint objects on which to start traffic streams and application schedules.Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <wirelessEndpoints> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <wirelessEndpoints> is no WirelessEndpoint object. Raises: TechnicalError
- When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.
-
WirelessEndpointsStartAndWait
(inWirelessEndpoints)¶ Starts all traffic streams and application schedules on the specified Wireless Endpoints And waits until the devices are started.
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 wireless endpoint does not contain any streams or schedules, nothing happens for that Wireless Endpoint.
Parameters: wireless_endpoints – Zero, one or more WirelessEndpont objects on which to start traffic streams and application schedules. Raises: ByteBlower.Exception.InvalidValue.NotAnObject - When one of the items in <wirelessEndpoints> is no object identifier. Raises: ByteBlower.Exception.InvalidValue.ObjectType - When one of the items in <wirelessEndpoints> is no WirelessEndpoint object. Raises: TechnicalError
- When the items in <wirelessEndpoints> are spread across multiple MeetingPoints.Example
bb.WirelessEndpointsStartAndWait()
-
thisown
¶ The membership flag
-
-
exception
byteblowerll.byteblower.
ByteBlowerAPIException
¶ Bases:
Exception
-
getInfo
()¶
-
getMessage
()¶
-
getPublicName
()¶
-
setInfo
(info)¶
-
setPrivateName
(name)¶
-
setPublicName
(name)¶
-
setServer
(server)¶
-
thisown
¶ The membership flag
-
what
()¶
-
-
class
byteblowerll.byteblower.
ByteBlowerInterface
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
Example
interface = bbServer.InterfaceGetByName('trunk-1-14') packetDump = interface.PacketDumpCreate()
-
GetPhysicalInterface
()¶
-
NameGet
()¶ Returns the name of the ByteBlower Interface
Returns: Name of the ByteBlower Interface Return type: str Example
-
PacketDumpCreate
()¶ Returns: returns a PacketDump object Return type: PacketDump Example
packetDump = interface.PacketDumpCreate()
-
PacketDumpDestroy
(packet_dump)¶ Destroys a PacketDump on this interface :param: PacketDump object that you want to destroy from the interface`. Example
packetDump = interface.PacketDumpCreate() interface.PacketDumpDestroy(packetDump)
-
PortCountGet
()¶ Returns: number of ports on this ByteBlowerInterface Return type: long Example
-
PortCreate
()¶ Creates a new ByteBlower port on this ByteBlowerInterface.
Returns: ByteBlowerPort Return type: unknown Example
-
PortDestroy
(inPort)¶ Parameters: port – ByteBlowerPort object that you want to destroy from the interface`. Example
-
PortGet
()¶ Returns: A list of ByteBlower ports on this interface Return type: ByteBlowerPortList Example
portList = interface.PortGet()
-
PortIdGet
()¶ Returns: The id of the first ByteBlower port on this interface Example
print(interface.PortIdGet())
-
SpeedGet
()¶ Returns: TODO?? Return type: long Example
print(interface.SpeedGet())
-
SwitchIdGet
()¶ Returns the ID of the switch where the ByteBlower Interface ?? Deprecated??
Returns: Id of the switch where the ByteBlower Interface is connected Return type: int Example
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerInterfaceList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerLicense
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
This class represents the license information of your connected server.
The license is defined by the security key hardware on your ByteBlower server.
New in version 2.6.0.
Deprecated since version 2.10.0.
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())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerPort
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 supportedExample
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
-
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())
-
GetByteBlowerInterface
()¶
-
InterfaceNameGet
()¶ Returns physical ByteBlower interface code.
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.Returns: String code representing the physical interface name (e.g. trunk-1-4 or nontrunk-1). Return type: str Example
print(port.InterfaceNameGet()) # prints trunk-1-1
-
InterfaceSpeedGet
()¶ Returns physical ByteBlower interface speed.
See
ByteBlowerServer.PortCreate()
for more information and to see how an interface name is structured.Returns: The maximum speed in bits per second a ByteBlower Interface can transmit. This does not take any VLAN overhead into account! Return type: long Example
print(port.InterfaceSpeedGet()) # prints 1000000000
-
InterfaceSwitchIdGet
()¶
-
Layer25PPPoEAdd
()¶ Adds a layer 2.5 PPPoE Client to this port.
New in version 2.5.0.
Once a layer 2.5 configuration is added to a port, it cannot be destroyed or removed.
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.Example
Configure 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()
-
Layer25PPPoERemove
(inPPPoEClient)¶
-
Layer25VlanAdd
()¶ Adds a layer 2.5 VLAN to this port.
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.
Once a layer 2.5 configuration is added to a port, it cannot be destroyed or removed.
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.
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.Example
Configure 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()
.Returns: Layer25VlanList
Example Reading the number of VlanTag` objects of port Configure port’s network connection as a VLAN-enabled virtual interface. .. code-block:: python
emphasize-lines: 1 vlan_list = port.Layer25VlanGet()
-
Layer25VlanRemove
(inVlanTag)¶
-
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.
Once the layer 2 configuration is set, it cannot be destroyed or overwritten.
Returns: EthernetConfiguration
object.Raises: ConfigError
- When the layer 2 configuration is already set.Example
Configure 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.
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.
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.Raises: ConfigError
- When the layer 3 configuration is already set.Example
Configure 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.
Once a layer 3 configuration isM 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.
Returns: IPv6Configuration
Raises: ConfigError
- When an underlying layer 2 or layer 2.5 configuration is not yet fully configured.Raises: ConfigError
- When the layer 3 configuration is already set.Example
Configure port’s network connection as an IPv6 host.
-
MDLGet
()¶ Returns the port’s current Maximum Data Length (MDL), the maximum ethernet frame size that can be transmitted.
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.
Returns: Current MDL value in bytes. Example
Typical values for a trunking and non-trunking port.
-
MDLMaximumGet
()¶ Returns the port’s highest allowed Maximum Data Length (MDL) value, which is limited by the physical interface.
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.
Returns: Physical upper bound for the MDL in bytes. Example
Typical values for a trunking and a non-trunking port.
-
MDLSet
(mdl)¶ Sets the port’s Maximum Data Length (MDL), the maximum ethernet frame size that can be transmitted.
See
MDLGet()
for more information.Parameters: mdl (long) – New MDL value in bytes. Should be less then the value returned by MDLMaximumGet()
.Raises: ByteBlower.Exception.InvalidValue.Integer - When mdl
is no integer.Raises: TBD - When the provided value was larger than the maximum supported MDL. TODO: Decide on this exception and document (Tim, February 2015) Example
port.MDLSet('1350') print(port.MDLGet()) # prints 1350
-
ProtocolHttpClientAdd
()¶ Creates a HTTP client application to run on this port.
A :
HttpMultiServer
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.
Returns: : HttpMultiServer
Example
httpClient = port.ProtocolHttpClientAdd()
-
ProtocolHttpClientGet
()¶ Returns the list of all HTTP client applications created on this port.
See
ProtocolHttpClientAdd()
for more information.Returns: returns a list of created HtppClient
objectsReturn type: HttpClientList
Example
all_clients = port.ProtocolHttpClientGet() print(all_clients.size())
-
ProtocolHttpClientRemove
(arg2)¶
-
ProtocolHttpMultiClientAdd
()¶ Creates a Layer5.Http.MultiClient object on this port.
Example
httpClient = port.ProtocolHttpMultiClientAdd()
-
ProtocolHttpMultiClientGet
()¶ Returns the list of a
HttpMultiClient
objects on this port.Returns: HttpMultiClientList
Example
print(port.ProtocolHttpMultiClientGet())
-
ProtocolHttpMultiClientRemove
(arg2)¶
-
ProtocolHttpMultiServerAdd
()¶ Creates a
HttpMultiServer
object on this port.Example
# create the HTTP client httpServer = port.ProtocolHttpMultiServerAdd()
-
ProtocolHttpMultiServerGet
()¶ Returns the list of
HttpMultiServer
objects on this port.Returns: HttpMultiServerList
Example
print(port.ProtocolHttpMultiServerGet())
-
ProtocolHttpMultiServerRemove
(arg2)¶
-
ProtocolHttpServerAdd
()¶ Creates a HTTP server application to run on this port.
An
HttpServer
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.Returns: an object representing an HTTP Server object. Return type: HttpServer
Example
http_server = port.ProtocolHttpServerAdd()
-
ProtocolHttpServerGet
()¶ Returns the list of all HTTP server applications created on this port.
See
ProtocolHttpServerAdd()
for more information.Returns: class:.HttpServerList Example
print(port.ProtocolHttpServerGet())
-
ProtocolHttpServerRemove
(arg2)¶
-
ProtocolTelnetClientAdd
()¶ Creates a Telnet client application to run on this port.
New in version API: 2.2.0
A
TelnetClient
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.
Returns: TelnetClient
.Example
protocolTelnetClient = port.ProtocolTelnetClientAdd()
-
ProtocolTelnetClientGet
()¶ Returns the list of all Telnet client applications created on this port.
New in version API: 2.2.0
See
ProtocolTelnetClientAdd()
for more information.Returns: TelnetClientList
Example
protocolTelnetClient = port.ProtocolTelnetClientGet()
-
ProtocolTelnetClientRemove
(arg2)¶
-
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: 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.
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.
Returns: An object representing the servers implementation of the capture functionality Return type: CaptureRawPacket
Example
-
RxCaptureBasicGet
()¶ Returns the list of capture tools created on this port.
See
RxCaptureBasicAdd()
for more information.Returns: CaptureRawPacketList
Example
tools = port.RxCaptureBasicGet()
-
RxCaptureBasicRemove
(inCapture)¶
-
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.
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.Returns: LatencyBasic
Example
latency = port.RxLatencyBasicAdd()
-
RxLatencyBasicGet
()¶ Returns the list of latency calculators created on this port.
New in version 2.5.0.
See
LatencyBasicAdd()
for more information.Returns: LatencyBasicList
Example
all_latency = port.RxLatencyBasicGet() print(all_latency.size()) # prints 1
-
RxLatencyBasicRemove
(inLatency)¶
-
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.
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.Returns: LatencyDistribution
Example
-
RxLatencyDistributionGet
()¶ Returns the list of latency calculators created on this port.
New in version 2.5.0.
See
LatencyDistributionAdd()
for more information.Returns: LatencyDistributionList
Example
all_latency = port.RxLatencyDistributionGet()
-
RxLatencyDistributionRemove
(inLatency)¶
-
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.
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.
Returns: Created out-of-sequence detector object. Return type: OutOfSequence
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.
See
OutOfSequenceBasicAdd()
for more information.Returns: A list of created objects Return type: OutOfSequenceList
Example
all_oos = port.RxOutOfSequenceBasicGet() print(all_oos.size()) # prints 1
-
RxOutOfSequenceBasicRemove
(inOutOfSequence)¶
-
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.
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.
Returns: A basic trigger object, which allows to configure the trigger and getting the results Return type: TriggerBasic
Example
trigger = port.RxTriggerBasciAdd()
-
RxTriggerBasicGet
()¶ Returns the list of receive triggers created on this port.
New in version 2.5.0.
See
RxTriggerBasicAdd()
for more information.Returns: an object representing a list of create basic triggers Return type: TriggerBasicList
Example
all_triggers = port.RxTriggerBasicGet() print(all_triggers.size()) # prints 1
-
RxTriggerBasicRemove
(arg2)¶
-
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.
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.
Returns: TriggerSizeDistribution
Example
trigger = port.RxTriggerSizeDistributionAdd()
-
RxTriggerSizeDistributionGet
()¶ Returns the list of receive triggers created on this port.
New in version 2.5.0.
See
RxTriggerSizeDistributionAdd()
for more information.Returns: A list with all the sizedistribution triggers created Return type: TriggerSizeDistributionList
Example
all_size_dists = port.RxTriggerSizeDistributionGet() print(all_size_dists.size()) # prints 1
-
RxTriggerSizeDistributionRemove
(arg2)¶
-
ServerGet
()¶
-
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
()¶
-
TunnelTcpAdd
()¶ Creates a TCP tunnel object.
A
TcpTunnel
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.
Returns: The created TcpTunnel object. This object can be used to configure the tunnel Return type: TcpTunnel
Example
tunnel = port.TunnelTcpAdd() print(tunnel.DescriptionGet())
-
TunnelTcpGet
()¶ Returns a list of all TCP Tunnel objects created on this port.
See
TunnelTcpAdd()
for more information.Returns: TcpTunnelList
Example
tunnelTcp = port.TunnelTcpGet()
-
TunnelTcpRemove
(arg2)¶
-
TxStreamAdd
()¶ Creates a transmit stream, which can be configured to blast layer 2 frames traffic from this port in a stateless way.
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.Returns: an object representing a pure frame blasting stream. Return type: Stream
Example
stream = port.TxStreamAdd()
-
TxStreamGet
()¶ Returns a list of transmit streams created on this port.
Returns: A list with all created Stream
objectsReturn type: StreamList
Example
streams = port.TxStreamGet() print(streams.size()) # prints 1
-
TxStreamRemove
(inStream)¶
-
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
-
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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerPortResultData
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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.ResultSnapshotExample
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 [NS].
New in version 2.3.0.
Example
This example gets interval duration of this result snapshot [NS]
print(resultData.IntervalDurationGet())
-
RxAllGet
()¶ Gets the received counters for the port.
This will return a
ByteBlowerPortResultRxData
object which contain all counters from a portReturns: ByteBlowerPortResultRxData
Example
print(resultData.RxAllGet().DescriptionGet())
-
RxBroadcastGet
()¶ Gets the received broadcast counters for the port.
This will return a
ByteBlowerPortResultRxData
object which contain all counters from a port. This will only contain the broadcast packets received on the port.Returns: ByteBlowerPortResultRxData
Example
print(resultData.RxBroadcastGet().DescriptionGet())
-
RxUnicastGet
()¶ Gets the received unicast counters for the port.
This will return a
ByteBlowerPortResultRxData
object which contain all unicast counters from a port. This will only contain the broadcast unicast received on the port.Returns: ByteBlowerPortResultRxData
Example
print(resultData.RxUnicastGet().DescriptionGet())
-
TimestampGet
()¶ Gets the snapshot timestamp [NS].
Example
This example gets the snapshot timestamp [NS].
print(resultData.TimestampGet())
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
ByteBlowerPortResultDataList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerPortResultHistory
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 calledNote
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: ByteBlowerPortResultDataList
containing the Interval countersExample
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.
Returns: ByteBlowerPortResultData
cumulative counter object at the specified indexExample
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.
Example
This example gets the available cumulative counters
print(port_resultHistory.CumulativeGetByTime(timestamp).DescriptionGet())
-
CumulativeLatestGet
()¶ Returns latest closed item of the cumulative list.
Returns: The latests closed ByteBlowerPortResultData
cumulative counter object.New in version 2.2.
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 Example
print(port_resultHistory.CumulativeLengthGet())
-
IntervalGet
()¶ Returns a list of available interval counters.
Returns: ByteBlowerPortResultDataList
containing the Interval countersExample
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.
Returns: ByteBlowerPortResultData
interval counter object at the specified indexExample
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.
Example
This example gets the available interval counters
interval = port_resultHistory.IntervalGetByTime(timestamp)
-
IntervalLatestGet
()¶ Returns the latest closed item of the interval list.
Returns: The latests closed ByteBlowerPortResultData
interval counter object.New in version 2.2.
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 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 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 Example
print(port_resultHistory.SamplingBufferLengthGet())
-
SamplingBufferLengthSet
(inCount)¶ 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
port_resultHistory.SamplingBufferLengthSet(10)
-
SamplingIntervalDurationGet
()¶ Duration of one sampling interval in nanoseconds.
Returns: Duration in nanoseconds Example
print(port_resultHistory.SamplingIntervalDurationGet())
-
SamplingIntervalDurationSet
(inDuration)¶ Sets the duration of one sampling interval.
Warning
This affects all users on the same ByteBlower interface.
Warning
The previously collected history will be invalidated.
New in version 2.3.0.
Example
print(port1_resultHistory.SamplingIntervalDurationGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerPortResultRxData
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
ByteBlower port counter result set.
A ByteBlower port result data snapshot object can be created via a
ByteBlowerPortResultData
orByteBlowerPortResultSnapshot
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.
Example
This example gets the received bytes counter
print(rx_result.ByteCountGet())
-
ByteCountWithCRCGet
()¶ Gets the current received bytes counter with the CRC.
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.
Raises: CounterUnavailable - 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.
Raises: CounterUnavailable - 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
()¶
-
PacketCountGet
()¶ Gets the received packet count.
Example
This example gets the received packet counter
print(rx_result.PacketCountGet())
-
TimestampFirstGet
()¶ Gets the timestamp [NS] of the first packet in this snapshot.
Raises: CounterUnavailable - 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(rx_result.TimestampFirstGet())
-
TimestampGet
()¶ Gets the snapshot timestamp [NS].
Example
This example gets the snapshot timestamp [NS].
print(rx_result.TimestampGet())
-
TimestampLastGet
()¶ Gets the current timestamp [NS] of the last packet in this snapshot.
Raises: CounterUnavailable - 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(rx_result.TimestampLastGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerPortResultSnapshot
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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
orByteBlowerPortResultSnapshot
Example
Receive all frames on “trunk-1-2” of some server, matching UDP source or destination port 67.
port_result = port.ResultGet()
-
Clear
()¶
-
IntervalDurationGet
()¶ Gets the configured duration of this results snapshot [NS].
New in version 2.3.0.
Example
This example gets interval duration of this result snapshot [NS]
print(port_result.IntervalDurationGet())
-
RefreshImpl
()¶
-
RefreshTimestampGet
()¶ Returns the timestamp on the server when the current snapshot is requested.
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()
Returns: Timestamp on the server when the current snapshot is requested in nanoseconds since epoch Example
print(port_result.RefreshTimestampGet())
-
RxAllGet
()¶ Gets the received counters for the port. This will return a
ByteBlowerPortResultRxData
object which contain all counters from a port.Returns: ByteBlowerPortResultRxData
Example
print(port_result.RxAllGet.DescriptionGet())
-
RxBroadcastGet
()¶ Gets the received broadcast counters for the port. This will return a
ByteBlowerPortResultRxData
object which contain all counters from a port. This will only contain the broadcast packets received on the port.Returns: ByteBlowerPortResultRxData
Example
print(port_result.RxBroadcastGet.DescriptionGet())
-
RxUnicastGet
()¶ Gets the received unicast counters for the port. This will return a
ByteBlowerPortResultRxData
object which contain all unicast counters from a port. This will only contain the broadcast unicast received on the port.Returns: ByteBlowerPortResultRxData
Example
print(port_result.RxUnicastGet.DescriptionGet())
-
TimestampGet
()¶ Gets the snapshot timestamp [NS].
Example
This example gets the snapshot timestamp [NS].
print(port_result.TimestampGet())
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
ByteBlowerServer
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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)¶
-
InterfaceNamesGet
()¶ Shows the available physical ByteBlower interfaces on the ByteBlower server.
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
, whereX
is the server interface on which the switch is connected andY
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
, whereX
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 toPortCreate()
method as argument.Returns: A list of all available physical interfaces on this server. 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']
- Trunking interfaces, which are interfaces located on a ByteBlower switch,
have a format
-
PacketDumpCreate
(*args)¶ Creates a PacketDump object on the specified ByteBlower interface.
New in version 2.9.0.
The PacketDump API allows to capture all incoming and outgoing network traffic on a ByteBlower interface.
Parameters: interface – Interface name of the ByteBlower interface Returns: PacketDump
Raises: ByteBlower.Exception.API.UnknownByteBlowerInterface - When the specified interface name does not exist on the connected server. 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.
The PacketDump API allows to capture all incoming and outgoing network traffic on a ByteBlower interface.
Parameters: interface – Interface name of the ByteBlower interface Returns: PacketDump
Raises: ByteBlower.Exception.API.UnknownByteBlowerInterface - When the specified interface name does not exist on the connected server. Example
Create a PacketDump object on trunk-1-1
dump = server.PacketDumpCreate('trunk-1-1')
-
PacketDumpDestroy
(packet_dump)¶
-
PhysicalInterfacesGet
()¶
-
PhysicalInterfacesGetByType
(inPhysicalInterfaceType)¶
-
PortCreate
(*args)¶ Creates a new ByteBlower port on the specified ByteBlower interface.
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
InterfacesGet()
.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
, whereX
is the server interface on which the switch is connected andY
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
, whereX
is the (server) interface.
Parameters: interface – String code for the ByteBlower interface on which to create the port. Returns: ByteBlowerPort
Raises: ByteBlower.Exception.API.UnknownByteBlowerInterface - When the specified interface name does not exist on the connected server. 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.
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
InterfacesGet()
.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
, whereX
is the server interface on which the switch is connected andY
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
, whereX
is the (server) interface.
Parameters: interface – String code for the ByteBlower interface on which to create the port. Returns: ByteBlowerPort
Raises: ByteBlower.Exception.API.UnknownByteBlowerInterface - When the specified interface name does not exist on the connected server. 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.
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
InterfacesGet()
.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
, whereX
is the server interface on which the switch is connected andY
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
, whereX
is the (server) interface.
Parameters: interface – String code for the ByteBlower interface on which to create the port. Returns: ByteBlowerPort
Raises: ByteBlower.Exception.API.UnknownByteBlowerInterface - When the specified interface name does not exist on the connected server. 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')
- Trunking interfaces, which are interfaces located on a ByteBlower switch,
have a format
-
PortDestroy
(inPort)¶
-
PortGet
()¶ Returns a list of all ByteBlower ports created through this server connection.
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.Returns: ByteBlowerPortList
port = server.PortGet()
-
PortsStart
(inPorts)¶
-
PortsStartAll
()¶
-
PortsStop
(inPorts)¶
-
PortsStopAll
()¶
-
ResultsRefreshAll
()¶
-
ServiceInfoGet
()¶ Returns the service information of the ByteBlower server daemon.
New in version 2.6.0.
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 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
This methods looks for attached USB interfaces and updates its available interfaces. If USB interfaces are attached, they will be returned by
InterfacesGet()
after this running this method.Bug Since USB interfaces are not yet supported, this method currently has no use. Method is not yet implemented and will throw a
TechnicalError
-
UsersGet
()¶ Shows which physical interfaces of the (shared) physical ByteBlower server are currently used by which clients.
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
InterfacesGet()
. 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
PortRemove
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.
Returns: A list of name value pairs, 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. 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()
- Explicitly, by calling
-
thisown
¶ The membership flag
-
-
exception
byteblowerll.byteblower.
ByteBlowerServerIncompatible
(*args)¶ Bases:
byteblowerll.byteblower.DomainError
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerServerList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
ByteBlowerServerServiceInfo
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.ServiceInfo
This class contains information on the ByteBlower System.
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()
New in version 2.6.0.
-
ConnectionHostGet
()¶ Returns the host (either registered name or IP address) used to connect to the ByteBlower server.
Example
print(service_info.ConnectionHostGet()) # prints 'bytblower-1.lab.byteblower.com'
-
ConnectionIPAddressGet
()¶ Returns the IP address used to connect to the ByteBlower server.
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.
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.
Each physical ByteBlower server (represented by this type of object) has a specific ByteBlower License.
Returns: ByteBlowerLicense
-
ManagementIPAddressGet
()¶ Returns all management IP addresses of the connected ByteBlower server.
New in version 2.6.0.
Returns: List of management IP addresses Example
print(service_info.ManagementIPAddressGet())
-
thisown
¶ The membership flag
-
-
exception
byteblowerll.byteblower.
ByteBlowerServerUnreachable
(*args)¶ Bases:
byteblowerll.byteblower.DomainError
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CHAPProtocol
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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
-
SecretSet
(secret)¶ Configures the Secret on the Challenge Handshake Authentication Protocol (CHAP)
Parameters: secret – The secret for authenticating to the PPP server. # TODO
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CHAPProtocolList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
Capability
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
Represents a capability, A feature it supports or not.
Using this class, you can check if e.g. a WirelessEndpoint supports latency measurements or not
Available Capabilities: - TODO - 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: string Example
print(capability.VersionAddedGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CapabilityList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CapabilityValue
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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: long 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: TODO 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¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
Capture
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.Rx
-
FileNameRemoteGet
()¶
-
ResultGet
()¶
-
Start
()¶
-
Stop
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CaptureRawPacket
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 an
CaptureRawpacket
you 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
()¶
-
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(captureRaw.FilterGet())
-
FilterSet
(inFilter)¶ Sets a BPF filter on a RX object.
Note
Configuring a new filter string does not reset the counter values which were triggered by a previous filter string.
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.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!)
captureRaw.FilterSet('ip dst 1.1.1.2')
-
ResultGet
()¶ Returns the capture result.
Returns: 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()
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CaptureRawPacketList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CaptureResultSnapshot
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 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 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 Example
This example returns the number of corrupt frames
print(resultSnapshot.ErrorCountGet())
-
FramesGet
()¶ Returns a list of
CapturedFrameList
.Returns: 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.
Returns: a 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 Example
This example returns the number of packets captured
print(resultSnapshot.PacketCountGet())
-
PcapLastFileNameGet
()¶ The fileName where the last pcap was saved to.
Example
print(resultSnapshot.PcapLastFileNameGet()) # prints: pcapResult.pcap
-
PcapNanoSave
(filename)¶ Stores the captured frames into a pcap file.
The stored capture file can be opened by e.g. wireshark.
Param: - 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.
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.
The stored capture file can be opened by e.g. wireshark.
Parameters: fileName – - 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. 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.
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}
Example
print(resultSnapshot.StateNameGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CapturedFrame
(inAbstractObject, inTimestamp, bytes)¶ Bases:
byteblowerll.byteblower.AbstractObject
A representation of a Captured Frame captured using a
CaptureRawPacket
.Example
result = captureRaw.ResultGet() frame = result.FramesGetByIndex(0) print(frame.LengthGet())
-
BufferGet
()¶
-
BytesGet
()¶ Gets the bytes in HEX format of this CapturedFrame.
Returns: hex representation of the content of the captured frame 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: Lenght of the packet without CRC Example
print(frame.LengthGet())
-
TimestampGet
()¶ Gets timestamp [NS] of this CapturedFrame.
Returns: Timestamp in nanoseconds Example
This example gets the timestamp of the captured frame
print(frame.TimestampGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CapturedFrameList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
CapturedHTTPData
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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. .. code-block:: python
emphasize-lines: 2
captureData = httpClient.CaptureGet() print(captureData.HttpSizeGet())
-
HttpBytesGet
()¶ Returns the captured HTTP data.
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.Returns: Captured HTTP data as string. Raises: ByteBlower.Protocol.NotSupported - When the ByteBlower Server does not support HTTP Client captures 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.
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.Parameters: fileName – Destination filename for the captured HTTP data. Raises: ByteBlower.Protocol.NotSupported - When the ByteBlower Server does not support HTTP Client captures Example
Stores all HTTP data captured to c:.txt
captureData.HttpBytesSave('httpResults.txt')
-
HttpSizeGet
()¶ Returns the number of captured bytes of HTTP data.
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.
Returns: Size of captured HTTP data in Bytes. Raises: ByteBlower.Protocol.NotSupported - When the ByteBlower Server does not support HTTP Client captures Example
Suppose we sent a HTTP GET request for an index.html test page
print(captureData.HttpSizeGet())
-
thisown
¶ The membership flag
-
-
exception
byteblowerll.byteblower.
ConfigError
(*args)¶ Bases:
byteblowerll.byteblower.DomainError
-
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:
byteblowerll.byteblower.InitializationError
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
DHCPv4Protocol
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
The
DHCPv4Protocol
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
DHCPv4Protocol
object 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.
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.
Parameters: enable (bool) – Whether or not to enable the Broadcast flag 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.
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.
Returns: Whether or not the flag is enabled Return type: bool 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.
This object contains all the DHCP sessionInfo like Tx,Rx, current leaseTime, giaddr etc…
Returns: DHCPv4SessionInfo
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.
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.
Returns: Current ‘<InitialTimeout> value for the discover stage. The unit is nanosecond (ns). 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.
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.
Parameters: InitialTimeout – New value for the initial timeout. The unit is in nanosecond (ns), but the unit 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.
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.
Returns: Current value for the number of retries in the discover stage. 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 – 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.
Returns: This method will return nothing, but will return after DHCP is performed successfully. If DHCP fails, and exception is thrown. Raises: DHCPFailed
when no offer was received during the DHCP discover stage or when no DHCPAck was received during DHCPRequest stageExample
This example will perform DHCP on the specified ByteBlowerPort.
dhcp_protocol.Perform()
-
PerformAsync
()¶ Will start DHCP and return immediately.
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.Returns: This method will return nothing and return immediately New in version 2.2.
Example
This example will perform DHCP on the specified ByteBlowerPort.
dhcp_protocol.PerformAsync()
-
Release
()¶ Release the DHCP lease.
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.
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/disable sending DHCP release during destruction.
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()
.Parameters: enable – Boolean to enable or disable the release of the address at the end of the test. Default: `True` 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.
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()
.Returns: If the port will release its IP at destruction 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.
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.
Returns: Current <InitialTimeout> value for the request stage. The unit is nanosecond (ns). 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 – 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.
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.
Returns: Current value for the number of retries in the request stage. 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.
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.
Parameters: maxRetries – The new value for the maximum number of retransmissions of the request message. Default value is 5 times
Example
This example will set the current maximum number of retries to 10 for the request stage.
dhcp_protocol.RequestMaxRetriesSet(10)
-
RetransmissionPolicyGet
()¶ Deprecated since version TODO: This method has been renamed, use
RetransmissionPolicyStringGet()
now.
-
RetransmissionPolicySet
(policy)¶ Deprecated since version TODO: This method has been renamed, use RetransmissionPolicy.Set.FromString now.
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
DHCPv4SessionInfo
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 Example
for option in session_info.DHCPOptionGet: print(option)
-
DHCPServerAddrGet
()¶ Returns the ipAddress of the DHCPServer.
This address is parsed out of DHCPServerIdentifier option ( Option 54 )
Returns: Address of the DHCP server Return type: str 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
()¶
-
TxGet
()¶ Returns the number of DHCPMessages transmitted.
Returns: Number of DHCP messages transmitted Return type: int Example
print(session_info)
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
DHCPv6Protocol
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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. 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 – 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. 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 – 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. 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 – 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. 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 – 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 DHCPv6SessionInfo
object for this DHCP sessionExample
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. 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 – 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. 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 – 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. 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 – 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. 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 – 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. Raises: DHCPFailed
Thrown if no offer was received during the DHCP solicit stage or no DHCPReply during DHCPRequest stageExample
This example will start the DHCPv6 process.
dhcp_protocol.Perform()
-
PerformAsync
()¶ This method will bootstrap the DHCPv6 process.
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.
Returns: This method will return nothing and return immediately New in version 2.2.
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 automatical release when the ByteBlower port is destroyed
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()
.Parameters: enable – bool True to enable the automatic release of the address Default: `true` 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
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()
Returns: If the port will release its IP at destruction 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. 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 – 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. 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 – 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. 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 – 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. 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 – 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. 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 – 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. 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 – 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. 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 – 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. 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 – 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
()¶
-
RetransmissionPolicySet
(policy)¶
-
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. 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 – 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. 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 – 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. 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 – 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. 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 – 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)
-
thisown
¶ The membership flag
- The
-
class
byteblowerll.byteblower.
DHCPv6SessionInfo
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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
()¶
-
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
()¶
-
RequestTimestampLastGet
()¶
-
RxGet
()¶ Returns the number of DHCPMessages recieved.
Returns: Number of DHCP messages received Return type: int Example
print(dhcpSessionInfo.RxGet())
-
SolicitTimestampLastGet
()¶
-
TxGet
()¶ Returns the number of DHCPMessages transmitted.
Returns: Number of DHCP messages transmitted Return type: int Example
print(dhcpSessionInfo.TxGet())
-
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: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.BitRateGet())
-
ByteRateGet
()¶ Returns the bytes per second of the http session
Returns: The speed in bytes per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.ByteRateGet())
-
GbpsGet
()¶ Returns the gigabits per second of the http session
Returns: The speed in gigabits per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.GbpsGet())
-
KbpsGet
()¶ Returns the kilobits per second of the http session
Returns: The speed in kilobits per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.KbpsGet())
-
MbpsGet
()¶ Returns the megabits per second of the http session
Returns: The speed in megabits per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.MbpsGet())
-
bitrate
()¶ Returns: The speed in bits per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.bitrate())
-
byterate
()¶ Returns: The speed in bytes per second Return type: long Example .. code-block:: python
emphasize-lines: 1 print(dataRate.byterate())
-
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 .. code-block:: python
emphasize-lines: 1 print(dataRate.toString())
-
-
class
byteblowerll.byteblower.
DataSize
(bytes)¶ Bases:
object
Represents a data size. The DataSize can be expressed in multiple formats.
Example
TODO
-
BytesGet
()¶ Returns: The size in bytes Return type: long Example
TODO
-
GibiBytesGet
()¶ Returns: The size in gibibytes Return type: long Example
TODO
-
KibiBytesGet
()¶ Returns: The size in kibibytes Return type: long Example
TODO
-
MebiBytesGet
()¶ Returns: The size in mebibytes Return type: long Example
TODO
-
thisown
¶ The membership flag
-
toString
()¶ Returns: A human readable format of the size Return type: str Example
TODO
-
-
byteblowerll.byteblower.
Demangle
(inName)¶
-
class
byteblowerll.byteblower.
DeviceInfo
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
Device information of the wireless endpoint.
Contains all usefull device information of a wireless endpoint like OS, Network, Battery etc…
New in version 2.6.0.
Example
from byteblowerll.byteblower import ByteBlower meetingPoint = bb.MeetingPointAdd('byteblower-tutorial-1300.lab.byteblower.excentis.com') weDevice = meetingPoint.DeviceGet('5D96F1C6-AAF3-43E3-9816-5DFAC1D2E812') deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.BatteryLevelGet())
-
BatteryLevelGet
()¶ Returns the device’s battery level.
Example
deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.BatteryLevelGet())
-
GivenNameGet
()¶ Returns the user-provided device name.
Example
deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.GivenNameGet())
-
NetworkInfoGet
()¶ Return the networkInfoObject containing all the network information of the Wireless Endpoint.
Returns: NetworkInfo
Example
deviceInfo = weDevice.DeviceInfoGet() networkInfo = weDevice.NetworkInfoGet()
-
NetworkInfoMonitorAdd
()¶ Creates a NetworkInfo monitor to be used during a scenario
A NetworkInfo monitor collects information about the network interfaces using the typical history objects
Returns: The newly created NetworkInfoMonitor Return type: NetworkInfoMonitor
Example
deviceInfo = weDevice.DeviceInfoGet() monitor = weDevice.NetworkInfoMonitorAdd()
-
NetworkInfoMonitorGet
()¶ Get the created NetworkInfo monitors
A NetworkInfo monitor collects information about the network interfaces using the typical history objects
Returns: A list of NetworkInfoMonitors Return type: NetworkInfoMonitorList
Example
deviceInfo = weDevice.DeviceInfoGet() monitor = weDevice.NetworkInfoMonitorAdd() monitors = weDevice.NetworkInfoMonitorGet()
-
NetworkInfoMonitorRemove
(arg2)¶ Removes the specified NetworkInfoMonitor
A NetworkInfo monitor collects information about the network interfaces using the typical history objects
Parameters: monitor ( NetworkInfoMonitor
) – The monitor to be removedExample
deviceInfo = weDevice.DeviceInfoGet() monitor = weDevice.NetworkInfoMonitorAdd() weDevice.NetworkInfoMonitorRemove(monitor)
-
OsTypeGet
()¶ Returns the OS type.
Returns: DeviceOsType
Example
deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.OsTypeGet())
-
OsVersionGet
()¶ Returns the OS version.
Example
deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.OsVersionGet())
-
TypeGet
()¶ Returns the type of device. I.e “iPad Air”, “iPhone 6S”, “Nexus 5x”, etc…
Example
deviceInfo = weDevice.DeviceInfoGet() print(deviceInfo.TypeGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
DeviceOsType
¶ Bases:
object
-
Android
= 0¶ TODO
-
Linux
= 3¶ TODO
-
OSx
= 2¶ TODO
-
Unknown
= 5¶ TODO
-
Windows
= 4¶ TODO
-
iOS
= 1¶ TODO
-
-
class
byteblowerll.byteblower.
DeviceStatus
¶ Bases:
object
-
Available
= 1¶ Wireless endpoint is registered
-
Reserved
= 2¶ Wireless endpoint is locked/used by (another) user
-
Running
= 4¶ Wireless endpoint is currently running a test
-
Starting
= 3¶ Wireless endpoint will start any second now with a test
Wireless endpoint not available/registered
-
-
exception
byteblowerll.byteblower.
DomainError
(*args)¶ Bases:
byteblowerll.byteblower.ByteBlowerAPIException
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
Duration
(ns)¶ Bases:
object
-
MicrosecondsGet
()¶
-
MillisecondsGet
()¶
-
NanosecondsGet
()¶
-
SecondsGet
()¶
-
thisown
¶ The membership flag
-
toString
()¶
-
-
class
byteblowerll.byteblower.
EthernetConfiguration
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.Layer2Configuration
EthernetII provides an interface for the Ethernet configuration on a ByteBlower port.
-
AddressGet
()¶
-
AddressSet
(inMacAddress)¶
-
static
IsValidMacAddress
(inMacAddress)¶
-
MacGet
()¶
-
MacSet
(inMacAddress)¶
-
TypeGet
()¶ Returns the layer 2 encoding scheme.
Returns: The layer 2 encoding scheme. Example
This example returns the layer 2 encoding scheme.
print(ethernetConf.TypeGet())
-
TypeSet
(inEthernetEncoding)¶ Sets the layer 2 encoding scheme.
Parameters: encoding – Currently supported encodings are SNAP and DIX. Example
This example sets the layer 2 encoding scheme.
print(ethernetConf.TypeSet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
Frame
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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:
- 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.
- Checksumming
- L3: IPv4/IPv6 automatic header checksumming.
- L4: UDP/TCP automatic checksumming.
- 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:
- 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.
- 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.
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.
- 0x01 0x02 0x03 0x04 0x05 …
- 0001020304050607
- 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.
Raises: ByteBlower.Exception.ConfigError - when the value does contain non-hexadecimal characters or when the length is not even. Parameters: bytes – 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)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.
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.
New in version 1.8.18.
Returns: FrameTagTx
Example
print(frame.FrameTagSequenceGet().DescriptionGet())
-
FrameTagTimeGet
()¶ Returns the FrameTagTx object related to the timestamp injection for this frame.
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.
New in version 1.8.18.
Returns: FrameTagTx
object for TimeTag injection of this frame.Example
In this example, we will retrieve the FrameTagTx object for the TimeTag:
print(frame.FrameTagTimeGet().DescriptionGet())
-
IsL3AutoChecksumEnabled
()¶
-
IsL3AutoLengthEnabled
()¶
-
IsL4AutoChecksumEnabled
()¶
-
IsL4AutoLengthEnabled
()¶
-
L3AutoChecksumEnable
(value)¶ Enable or disable the automatic checksum calculation of the Layer3 header of this frame.
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.
Default value: Disabled
Raises: ByteBlower.Exception.InvalidValue - when the value is not True or False Parameters: enable – bool: True will enable the automatic Layer3 checksum calculation. False will disable the automatic Layer3 checksum calculation. 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.
This method returns the current configuration of the automatic Layer3 checksum calculation.
See
Frame.L3AutoChecksumEnable()
on how to enable this feature.Default value: Disabled
Returns: True if enabled, False if disabled. 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.
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.
Default value: Disabled
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.Raises: ByteBlower.Exception.InvalidValue - when the value is not true or false Parameters: enable – bool: True will enable the automatic Layer3 length field adaption. False will disable the automatic Layer3 length field adaption. 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.
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.
Default value: Disabled
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.
Raises: ByteBlower.Exception.InvalidValue - when the value is not true or false Parameters: enable – bool: True will enable the automatic Layer4 checksum calculation. False will enable the automatic Layer4 checksum calculation. 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.
This method returns the current configuration of the automatic Layer4 checksum recalculation.
See
Frame.L4AutoChecksumEnable()
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 Layer4 checksum recalculation option is enabled:
print(frame.L4AutoChecksumGet()
-
L4AutoLengthEnable
(value)¶ Enable or disable the automatic Layer4 header length field calculation of this frame.
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.
Default value: Disabled
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.
Raises: ByteBlower.Exception.InvalidValue - when the value is not true or false Parameters: enable – bool: True will enable the automatic Layer4 length field adaption. False will enable the automatic Layer4 length field adaption. 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.
This method returns the current configuration of the automatic Layer4 length field adaption.
See
L4AutoLengthEnable()
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 Layer4 length field adaption option is enabled:
print(frame.L4AutoLengthGet())
-
ModifierFieldIncrementalAdd
()¶ Adds an incremental frame field modifier.
New in version 2.5.0.
Returns: FrameFieldModifierIncremental
Example
This example adds an incremental value frame field modifier.
frame.ModifierFieldIncrementalAdd()
-
ModifierFieldIncrementalDestroy
(inModifier)¶
-
ModifierFieldIncrementalGet
()¶ Returns the active incremental frame field modifier(s).
New in version 2.5.0.
Returns: 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.
Returns: FrameFieldModifierRandom
Example
This example adds a random value frame field modifier.
frameFieldModifierRandom = frame.ModifierFieldRandomAdd()
-
ModifierFieldRandomDestroy
(inModifier)¶
-
ModifierFieldRandomGet
()¶ Returns the active random frame field modifier(s).
New in version 2.5.0.
Returns: FrameFieldModifierRandom
Example
This example retrieves the current applied field modifiers.
print(frame.ModifierFieldRandomGet()[0].DescriptionGet())
-
ModifierSizeGet
()¶
-
ModifierSizeGrowingDestroy
(arg2)¶
-
ModifierSizeGrowingGet
()¶ Returns the active frame growing size modifier.
New in version 2.5.0.
Returns: 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.
Returns: FrameSizeModifierGrowing
Example
This example sets a growing size frame modifier.
growSizeMod = frame.ModifierSizeGrowingSet()
-
ModifierSizeRandomDestroy
(arg2)¶
-
ModifierSizeRandomGet
()¶ Returns the active frame random size modifier.
New in version 2.5.0.
Returns: 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.
Returns: 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.
Returns: FrameResultSnapshot
Example
print(frame.ResultGet().DescriptionGet())
-
ResultHistoryGet
()¶
-
SetL3AutoChecksum
(b)¶
-
SetL3AutoLength
(set)¶
-
SetL4AutoChecksum
(set)¶
-
SetL4AutoLength
(set)¶
-
StreamGet
()¶
-
thisown
¶ The membership flag
- Tagging
-
class
byteblowerll.byteblower.
FrameFieldModifier
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
FrameGet
()¶
-
LengthGet
()¶
-
LengthSet
(inLength)¶
-
OffsetGet
()¶
-
OffsetSet
(inOffset)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameFieldModifierIncremental
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.FrameFieldModifier
A frame field modifier which will increase the value of the frame field between a minimum and maximum value.
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:
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.
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.
New in version 2.3.0.
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. 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.
This value will be used when a Tx.Stream is started.
Parameters: initial – 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 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 incremental value field modifier. Example
This example shows how to retrieve the current field length.
print(frameModifierIncr.LengthGet())
-
LengthSet
(inLength)¶ Sets the length of the frame field.
Parameters: length – 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.
frameModifierIncr.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. 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 – 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. 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 – 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. Example
This example shows how to retrieve the current field offset.
print(frameModifierIncr.OffsetGet())
-
OffsetSet
(inOffset)¶ Sets the offset of the frame field within the frame content.
Parameters: offset – 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.
frameModifierIncr.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. 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 – 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)
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
FrameFieldModifierRandom
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.FrameFieldModifier
A frame field modifier which will change the field value of the frame randomly between a minimum and maximum value.
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:
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.
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.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 random value field modifier. Example
This example shows how to retrieve the current field length.
print(frameModifierRnd.LengthGet())
-
LengthSet
(inLength)¶ Sets the length of the frame field.
Parameters: length – 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.
frameModifierRnd.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. 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 – 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. 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 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 random value field modifier. Example
This example shows how to retrieve the current field offset.
print(frameModifierRnd.OffsetGet())
-
OffsetSet
(inOffset)¶ Sets the offset of the frame field within the frame content.
Parameters: offset – 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.
frameModifierRnd.OffsetSet(88)
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
FrameList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameMobile
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
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 WirelessEndpoint.New in version 2.6.0.
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.
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.
New in version 2.6.0.
Returns: FrameTagTx
.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.
This method will return the UDP payload of the frame in a hexadecimal format.
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.PayloadGet())
-
PayloadSet
(payloadString)¶ A method which sets the payload of a frame.
This method will change the payload of the frame. The value can be in different formats, e.g.
- 0x01 0x02 0x03 0x04 0x05 …
- 0001020304050607
- 00 01 02 03 04 05 …
Parameters: bytes – Bytes can be of any of the above formats 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.
Returns: FrameResultSnapshot
Example
print(frame.ResultGet().DescriptionGet())
-
ResultHistoryGet
()¶ Returns the current transmit history counters. :return: an object representing the frame result history :rtype:
FrameResultHistory
-
StreamGet
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameMobileList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameModifierFieldIncrementalList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameModifierFieldRandomList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameResultData
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
ByteCountGet
()¶ Gets the current transmitted bytes.
Example
This example gets the transmitted bytes
print(frameData.ByteCountGet())
-
FramesizeMaximumGet
()¶ Gets the size (in bytes) of the largest frame transmitted in this snapshot.
Raises: CounterUnavailable - When no frames are received, this counter is unavailable Example
This example gets the largest framesize transmitted in this snapshot.
print(frameData.FramesizeMaximumGet())
-
FramesizeMinimumGet
()¶
-
IntervalDurationGet
()¶ Gets the configured duration of this results snapshot [NS].
New in version 2.3.0.
Example
This example gets interval duration of this result snapshot [NS]
print(frameData.IntervalDurationGet())
-
PacketCountGet
()¶ Gets the transmitted packets.
Example
This example gets the transmitted packets
print(frameData.PacketCountGet())
-
TimestampFirstGet
()¶ Gets the timestamp [NS] of the first packet in this snapshot.
Raises: CounterUnavailable - 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].
Example
This example gets the snapshot timestamp [NS].
print(frameData.TimestampGet())
-
TimestampLastGet
()¶ Gets the current timestamp [NS] of the last packet in this snapshot.
Raises: CounterUnavailable - 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())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameResultDataList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameResultHistory
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractRefreshableResult
Sender-side frame transmission result history.
The history contains the sender information in time since the object is created or refreshed.
Note
The information is not updated until
Refresh()
is calledA Frame history result object can be created via
- Frame, using
Frame.ResultHistoryGet()
- FrameMobile, using
FrameMobile.ResultHistoryGet()
Note
See History result for more information
New in version 2.1.0.
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.
Returns: FrameResultDataList
Example
This example gets the available accumulated results
historyList = frameHistory.CumulativeGet()
-
CumulativeGetByIndex
(index)¶ Returns a list of available cumulative counters.
Returns: 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.
Returns: FrameResultData
Example
This example gets the available cumulative counters
print(CumulativeGetByTime(timestamp))
-
CumulativeLatestGet
()¶ Returns latest closed item of the cumulative list.
Returns: 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 Example
print(frameHistory.CumulativeLengthGet())
-
IntervalGet
()¶ Returns a list of available interval results.
Returns: FrameResultDataList
Example
This example gets the available interval results
print(frameHistory.IntervalGet().DescriptionGet())
-
IntervalGetByIndex
(index)¶ Returns a list of available interval counters.
Returns: 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.
Returns: FrameResultData
Example
This example gets the available interval counters
print(frameHistory.IntervalGetByTime(timestamp))
-
IntervalLatestGet
()¶ Returns the latest closed item of the interval list.
Returns: 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 Example
print(frameHistory.IntervalLengthGet())
-
RefreshTimestampGet
()¶ Returns the latest timestamp when the history was refreshed.
Returns: Timestamp in nanoseconds (since epoch) 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 Example
print(frameHistory.SamplingBufferLengthGet())
-
SamplingBufferLengthSet
(inCount)¶ 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
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 Example
print(frameHistory.SamplingIntervalDurationGet())
-
SamplingIntervalDurationSet
(inDuration)¶ Sets the duration of one sampling interval.
Warning
The previously collected historywill be invalidated.
New in version 2.3.0.
Example
frameHistory.SamplingIntervalDurationSet(1000)
-
thisown
¶ The membership flag
- Frame, using
-
class
byteblowerll.byteblower.
FrameResultSnapshot
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractRefreshableResult
TODO
-
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.
Raises: CounterUnavailable - When no frames are received, this counter is unavailable New in version 2.5.0.
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.
Raises: CounterUnavailable - When no frames are received, this counter is unavailable New in version 2.5.0.
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.
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.
Note
This is not the same as
TimestampGet()
Example
frameSnapshot.RefreshTimestampGet()
-
TimestampFirstGet
()¶ Gets the timestamp [NS] of the first packet in this snapshot.
Raises: CounterUnavailable - 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
This example gets the snapshot timestamp [NS].
print(frameSnapshot.TimestampGet())
-
TimestampLastGet
()¶ Gets the current timestamp [NS] of the last packet in this snapshot.
Raises: CounterUnavailable - 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())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameResultSnapshotList
(*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)¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameSizeModifier
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
DEFAULT_MAX_SIZE
= 1514¶
-
DEFAULT_MIN_SIZE
= 60¶
-
FrameGet
()¶
-
ResultGet
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameSizeModifierGrowing
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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
FrameSizeModifierGrowingSize
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. 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.
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.
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. 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 – 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 – 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.
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. 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.
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:
sizeModifierGrowing.StepSet(2)
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
FrameSizeModifierRandom
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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. 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 – 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.
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. 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 – 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.
sizeModifierRandom.MinimumSet(128)
-
StreamGet
()¶
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
FrameSizeModifierResultSnapshot
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractRefreshableResult
A collection of statistics containing the results of a frame size modifier.
There are currently 2 frame size modifiers available:
- The
FrameSizeModifierGrowing
, which is the Growing Size modifier - The
FrameSizeModifier.Random
, which is the Random Size modifier.
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.
Example
print(snapshot.ByteCountGet())
-
FramesizeMaximumGet
()¶ Returns the size of the biggest transmitted frame.
Raises: CounterUnavailable - When no frames are received, this counter is unavailable Example
print(snapshot.FramesizeMaximumGet())
-
FramesizeMinimumGet
()¶ Returns the size of the smallest transmitted frame.
Raises: CounterUnavailable - 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.
Example
This example gets interval duration of this result snapshot [NS]
print(snapshot.IntervalDurationGet())
-
PacketCountAboveMaximumGet
()¶
-
PacketCountBelowMinimumGet
()¶
-
PacketCountGet
(*args)¶ Returns the number of transmitted packets.
Example
print(snapshot.PacketCountGet())
Returns the number of transmitted packets.
Example
print(snapshot.PacketCountGet())
-
RefreshTimestampGet
()¶ Returns the timestamp when the counters of this object where last refreshed.
Note
This is not the same as
TimestampGet()
Example
print(snapshot.RefreshTimestampGet())
-
TimestampFirstGet
()¶ Gets the timestamp [NS] of the first packet in this snapshot.
Raises: CounterUnavailable - 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].
Example
This example gets the snapshot timestamp [NS].
print(snapshot.TimestampGet())
-
TimestampLastGet
()¶ Gets the timestamp [NS] of the last packet in this snapshot.
Raises: CounterUnavailable - 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())
-
thisown
¶ The membership flag
- The
-
class
byteblowerll.byteblower.
FrameTag
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
FormatDestroy
()¶
-
FormatGet
()¶
-
FormatStringGet
()¶
-
MetricsDestroy
()¶
-
MetricsGet
()¶
-
PositionGet
()¶
-
PositionSet
(newPosition)¶
-
TypeGet
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameTagFormat
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.AbstractObject
-
FormatStringGet
()¶
-
SequenceNumberFormatGet
()¶
-
TimeStampFormatGet
()¶
-
TypeGet
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameTagMetrics
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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.
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.
Returns: The alignment value of this tag. Example
This example illustrates how the alingment value of a timestamp tag can be retrieved;
print(metric.AlignmentGet())
-
FrameTagGet
()¶
-
LengthGet
()¶ Returns the length of the tag.
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.
Returns: The length of the tag in bytes. Example
This example shows the how to retrieve the length of a sequence tag:
print(metric.LengthGet())
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
FrameTagRx
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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
-
FormatSet
(fromFrameTagFormat)¶
-
FormatSetFromString
(formatString)¶ Method to set the format by name.
This method allows to set the format by name.
See also:
FrameTagRx.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 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
-
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
-
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
LatencyBasic.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
-
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
-
PositionGet
()¶ Returns the current configured location of the tag within 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| <———————|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!
Returns: Current configured position. If nothing was specified, the default position chosen by the server is returned. 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
-
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| <———————|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
-
thisown
¶ The membership flag
-
class
byteblowerll.byteblower.
FrameTagTx
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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.
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.
Default value: Disabled
Example
To enable the sequence tag on frame, one can do:
print(frameTagtx.Enable())
-
IsEnabled
()¶ Method which will return whether a tag is activated or not.
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.
Default value: Disabled
Returns: True if enabled, false if disabled. Example
To see if a timestamp tag is enabled on a frame, this code can be used:
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.
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:
it shields the API user from the complexity described above
it makes sure the requirements are respected:
the position will always be larger than the tag length and multiple tags will never overlap
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:
- 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).
- 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.
Default value: Enabled
Example
In this example, we will reset the position of the sequence tag to automatic.
frameTagtx.PositionAutomaticSet()
-
PositionGet
()¶ The current configured location of the tag within 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| <———————|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!
Returns: Current configured position. If nothing was specified, the default position chosen by the server is returned. Example
This example will return the position of a sequence tag:
print(frameTagtx.PositionGet())
-
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| <———————|
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:
frameTagtx.PositionSet(9)
-
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
-
SetScheduleGroup
(group)¶
-
UnsetScheduleGroup
()¶
-
thisown
¶ The membership flag
-
-
class
byteblowerll.byteblower.
HTTPClient
(*args, **kwargs)¶ Bases:
byteblowerll.byteblower.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 HttpClient 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
()¶
-
CaptureEnable
(inValue=True)¶ Enable the capture of the HTTPData.
Example
httpClient.CaptureEnable()
Enable the capture of the HTTPData.
Example
httpClient.CaptureEnable()
-
CaptureGet
()¶ Return the captured HTTP Data.
Returns: CapturedHTTPData
Example
print(httpClient.CaptureGet().DescriptionGet())
-
ClientIdGet
()¶ Returns the unique client ID.
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.
Returns: the httpclient unique ID Example
print(httpClient.ClientIdGet())
-
ErrorMessageGet
()¶ Returns the error message.
When the request status is “Error” then extra information can be obtained with this method.
Returns: The error message string Example
print(httpClient.ErrorMessageGet())
-
FinishedGet
()¶ Returns whether or not the HTTP session has finished.
Returns: True: Finished (with or without error), False: Not Finished 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.
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.
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 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 Example
print(httpClient.MaximumSegmentSizeGet())
-
HistorySamplingBufferLengthGet
()¶ Gets the default Sampling Buffer Length for the HTTP Session history.
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.
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.
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.
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.
There are 2 possible values:
- GET
- The HTTP Request method will be a GET.
- PUT
- The HTTP Request method will be a PUT.
Default value: GET
Returns: The current selected HTTP request method Example
from byteblowerll.byteblower import ByteBlower server = ByteBlower.ServerAdd('byteblower-1.lab.byteblower.com') # TODO
-
HttpMethodSet
(*args)¶ Configures the HTTPRequest method to be used.
There are 2 possible values:
- GET
- The HTTP Request method will be a GET.
- PUT
- The HTTP Request method will be a PUT.
Default value: GET
Raises: python_error: bad lexical cast: When the value could not be interpreted as a valid HTTPRequestMethod Example
httpClient.HttpMethodSet(HTTPRequestMethod.Get)
Configures the HTTPRequest method to be used.
There are 2 possible values:
- GET
- The HTTP Request method will be a GET.
- PUT
- The HTTP Request method will be a PUT.
Default value: GET
Raises: python_error: bad lexical cast: When the value could not be interpreted as a valid HTTPRequestMethod Example
httpClient.HttpMethodSet(HTTPRequestMethod.Get)
-
HttpSessionInfoDestroy
()¶
-
HttpSessionInfoGet
()¶ Returns the HttpSessionInfo from this session.
The HttpSessionInfo contains all the information of the current session. From state until the counters of received/transmitted bytes
Returns: HTTPSessionInfo
Example
sessionInfoGet = httpClient.HttpSessionInfoGet()
-
IsCaptureEnabled
()¶
-
IsLatencyEnabled
()¶
-
LatencyEnable
(inValue=True)¶
-
LocalPortGet
()¶ Returns the TCP the httpclient will use to send its HTTPRequest.
Returns: The TCP port the client uses. Example
print(httpClient.LocalPortGet())
-
LocalPortSet
(inPort)¶ Configure the TCP port for the client to use.
This method will set the TCP port for the client.
Parameters: port – TCP port on which the client will listen or replies and send its requests. Raises: ByteBlower.Exception.InvalidValue.Integer - when the value is not an Integer Raises: ByteBlower.Exception.InvalidConfig - when the value is not between 1 and 65535 Example
httpClient.LocalPortSet(45780)
-
MaximumSegmentSizeGet
()¶ Returns the configured TCP maximum segment size.
The default value is 65535.
Example
print(httpClient.MaximumSegmentSizeGet())
-
MaximumSegmentSizeSet
(inValue)¶ Sets the TCP maximum segment size.
This option specifies an upper bound on the TCP segment size.
Parameters: size – Maximum segment size. Should be between 1 and 65535. Example
httpClient.MaximumSegmentSizeSet(65535)
-
ReceiveWindowInitialSizeGet
()¶ Gets the initial receive window for the client.
Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.
Default value: 65535
Returns: The configured initial receive window size. Example
print(httpClient.ReceiveWindowInitialSizeGet())
-
ReceiveWindowInitialSizeSet
(inValue)¶ Sets the initial receive window for the client.
Small windowsizes can decrease the performance of a TCP session. Please use a good size for your configuration and network setup.
Parameters: windowsize – New value of the initial receive window. Raises: ByteBlower.Exception.InvalidValue.Integer - when the value is not an Integer Example
httpClient.ReceiveWindowInitialSizeSet(65535)
-
ReceiveWindowScalingEnable
(inEnable)¶ Enables of disables windowscaling.
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.
Parameters: scaling – bool: which will enable (True) or disable (false) windowscaling. Raises: ByteBlower.Exception.InvalidValue - when the value is not true or false Default value: true
Example
To enable window scaling
httpClient.ReceiveWindowScalingEnable(False)
or to disable window scaling
httpClient.ReceiveWindowScalingEnable(False)
-
ReceiveWindowScalingIsEnabled
()¶ Returns if windowscaling 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 scale enabled, False window scale disabled Default value: True
Example
When enabled:
print(httpClient.ReceiveWindowScalingIsEnabled())
-
ReceiveWindowScalingValueGet
()¶ Returns the current receive window scale.
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.
Default value: 3
Returns: the current receive window scale 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: ByteBlower.Exception.InvalidValue.Integer - when the value is not an Integer Raises: ConfigError
when the value is not in the range 0-8Parameters: scale – Integer (0-8), which is used for bitwise shifting. Default value: 3
Example
httpClient.ReceiveWindowScalingValueSet()
-
RemoteAddressGet
()¶ Return the configured destination address.
Returns the current configured remote site address.
Returns: destination address Example
print(httpClient.RemoteAddressGet())
-
RemoteAddressSet
(inAddress)¶ Configure the destination address.
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.
Parameters: address – Address of the HTTP server this client will use. Example
httpClient.RemoteAddressSet('1.1.1.1')
-
RemotePortGet
()¶ Returns the configured destination port.
This method returns the current configured TCP port of the HTTP server which this client will try to contact.
Returns: the remote (destination) tcp port Example
port = httpClient.RemotePortGet()
-
RemotePortSet
(inRemotePort)¶ Configure the TCP port which the client will use as destination port.
This method is used to configure the TCP port of the server which the client will try to contact.
Parameters: port – TCP port of the HTTP server which the client will try to contact. Raises: ByteBlower.Exception.InvalidValue.Integer - when the value is not an Integer Raises: ByteBlower.Exception.InvalidConfig - when the value is not between 1 and 65535 Example
Configure the client to use port 80 as destination port
httpClient.RemotePortSet(80)
-
RequestDurationGet
()¶ Method which will return the configured HTTP Request duration.
A HTTP Request page will be configured to request to send data, during a certain time, on a ByteBlower HTTP server.
Returns: The HTTP request duration. 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.
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.
Parameters: requestDuration – The duration of data traffic to send the HTTP Request for. Raises: python_error: bad lexical cast: When the value could not be interpreted as a valid time string Example
will configure a request to transfer data during 1.5 seconds expressed in nano seconds
httpClient.RequestDurationSet(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 ns Default value: 0
Example
print(httpClient.RequestInitialTimeToWaitGet())
-
RequestInitialTimeToWaitSet
(inDelay)¶ Sets the initial time to wait before really requesting a page (for a scheduled Request).
This can be used if you want to start different request on different timestamps.
Parameters: timetowait – Time to wait before the request will be really sent. Units are ns Default value: 0
Raises: python_error: - bad lexical cast: When the value could not be interpreted as a valid time string 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.
If you are requesting on a ByteBlower HTTP Server, please check
RequestSizeSet()
andRequestDurationSet()
for specialized HTTP RequestsMethod 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.
Returns: the HTML page name that will be requested 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.
If you are requesting on a ByteBlower HTTP Server, please check
RequestSizeSet()
andRequestDurationSet()
for specialized HTTP RequestsMethod 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.Parameters: pagename – The page to send the HTTP Request for. 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. 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 – The rate limit, in bytes per second. Example
Setting the rate limit to 10 MBytesps
-