All Classes Namespaces Files Functions Pages
ByteBlowerServer Class Reference

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

Methods

 Description.Get
 Returns a textual description of the object.
 
 Interface.Names.Get
 Shows the available physical ByteBlower interfaces on the ByteBlower server. More...
 
 Interfaces.Get
 Shows the available physical ByteBlower interfaces on the ByteBlower server. More...
 
 PacketDump.Create interface
 Creates a PacketDump object on the specified ByteBlower interface. More...
 
 Parent.Get
 Returns the parent object.
 
 Port.Create interface
 Creates a new ByteBlower port on the specified ByteBlower interface. More...
 
 Port.Get
 Returns a list of all ByteBlower ports created through this server connection. More...
 
 ServiceInfo.Get
 Returns the service information of the ByteBlower server daemon. More...
 
 Timestamp.Get
 Returns the current timestamp on the server. More...
 
 Type.Get
 Returns the type (aka server series) of the connected ByteBlower server. More...
 
 Update
 Updates dynamic interfaces (e.g. USB) on the connected server. More...
 
 Users.Get
 Shows which physical interfaces of the (shared) physical ByteBlower server are currently used by which clients. More...
 
 Version.Get
 Returns the software version of the connected ByteBlower server. More...
 

Class overview

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 Network Under Test (NUT) at a specific place.

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

Definition at line 2851 of file api.tcl.

Method documentation

ByteBlowerServer::Interface.Names.Get

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, where <X> is the server interface on which the switch is connected and <Y> is the interface number on the switch itself.
  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where <X> is the (server) interface.

This format is used as keys in the key-value pair list returned by Users.Get. It is also the format that should be passed to Port.Create method as argument.

Since
2.5.0
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.

1 $server Interface.Names.Get

Returns:

trunk-1-1 trunk-1-2 ... trunk-1-47 trunk-1-48 nontrunk-1 

Definition at line 2876 of file api.tcl.

ByteBlowerServer::Interfaces.Get

Shows the available physical ByteBlower interfaces on the ByteBlower server.

Deprecated:
since 2.5.0, please use Interface.Names.Get instead.

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

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

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where <X> is the server interface on which the switch is connected and <Y> is the interface number on the switch itself.
  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where <X> is the (server) interface.

This format is used as keys in the key-value pair list returned by Users.Get. It is also the format that should be passed to Port.Create 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.

1 $server Interfaces.Get

Returns:

trunk-1-1 trunk-1-2 ... trunk-1-47 trunk-1-48 nontrunk-1 

Definition at line 2896 of file api.tcl.

ByteBlowerServer::PacketDump.Create   interface  

Creates a PacketDump object on the specified ByteBlower interface.

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

Since
2.9.0
Parameters
interfaceInterface name of the ByteBlower interface
Returns
Created PacketDump object.
Exceptions
ByteBlower.Exception.API.UnknownByteBlowerInterfaceWhen the specified interface name does not exist on the connected server.
Example

Create a PacketDump object on trunk-1-1

1 set packet_dump [ $server PacketDump.Create trunk-1-1 ]

Returns:

<PacketDump object> 

Definition at line 2916 of file api.tcl.

ByteBlowerServer::Port.Create   interface  

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 Network Under Test (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 Interfaces.Get.

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

  • Trunking interfaces, which are interfaces located on a ByteBlower switch, have a format trunk-X-Y, where <X> is the server interface on which the switch is connected and <Y> is the interface number on the switch itself.
  • Non-trunking interface, which are located directly on the server (without switch), have a format nontrunk-X, where <X> is the (server) interface.
Parameters
interfaceString code for the ByteBlower interface on which to create the port.
Returns
Created ByteBlowerPort object.
Exceptions
ByteBlower.Exception.API.UnknownByteBlowerInterfaceWhen the specified interface name does not exist on the connected server.
Example

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

1 set port1 [ $server Port.Create trunk-1-1 ]

Returns:

<ByteBlowerPort object> 

Definition at line 2943 of file api.tcl.

ByteBlowerServer::Port.Get

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 Users.Get to see the interfaces on which other users have created ports.

Returns
List of all ByteBlowerPort objects created through this server connection. May be empty.
Example
1 $server Port.Get

Returns:

[ <ByteBlowerPort object> ... ] 

Definition at line 2957 of file api.tcl.

ByteBlowerServer::ServiceInfo.Get

Returns the service information of the ByteBlower server daemon.

Since
2.6.0
Example
1 $server ServiceInfo.Get

Returns:

<ByteBlowerServer.ServiceInfo object> 

Definition at line 2969 of file api.tcl.

ByteBlowerServer::Timestamp.Get

Returns the current timestamp on the server.

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

Since
2.3.0
Returns
Timestamp in nanoseconds
Example

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

1 $server Timestamp.Get

Returns:

1432805398000000000 

Definition at line 2985 of file api.tcl.

ByteBlowerServer::Type.Get

Returns the type (aka server series) of the connected ByteBlower server.

Deprecated:
since 2.6.0, Please use ServiceInfo.Get with ByteBlowerServer.ServiceInfo::Type.Get instead

Server type defines the ByteBlower server hardware and features. As of 2015, the available type codes (commonly called server series) are 1100, 1200, 1300, 2100, 3100 and 4100.

Returns
A string 'ByteBlower <X>', where <X> is the series value (e.g. 4100).
Example

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

1 $server Type.Get

Returns:

ByteBlower 1300 

Definition at line 3001 of file api.tcl.

ByteBlowerServer::Update

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

This methods looks for attached USB interfaces and updates its available interfaces. If USB interfaces are attached, they will be returned by Interfaces.Get 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 technical exception.
Example
1 $server Update

Definition at line 3018 of file api.tcl.

ByteBlowerServer::Users.Get

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 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 Tcl scripts and an interactive Tcl session at the same time. Similarly, a single client instance may have multiple parallel connections to the same server, by calling ByteBlower::Server.Add 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 Interfaces.Get. 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 Destructor on ByteBlowerPort.
  • 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!

1 $server Users.Get

Returns:

trunk-1-1 johnpc trunk-1-2 janepc trunk-1-3 johnpc nontrunk-1 {johnpc janepc johnpc} 

Now assume John's second connection is cleaned up (e.g. because that GUI scenario is finished). The usage will be updated accordingly.

1 $server Users.Get

Returns:

trunk-1-1 johnpc trunk-1-2 janepc nontrunk-1 {johnpc janepc} 

Definition at line 3042 of file api.tcl.

ByteBlowerServer::Version.Get

Returns the software version of the connected ByteBlower server.

Deprecated:
since 2.6.0, Please use ServiceInfo.Get with ByteBlowerServer.ServiceInfo::Type.Get instead

Each physical ByteBlower server (represented by this type of object) runs a specific software version. This version is independent from both the ByteBlower API version (seen when loading the package) and the ByteBlower GUI version (shown in the GUI).

Server software is upgraded from the server itself. For more information on this topic, please see this ByteBlower API Knowledgebase: How to: Updating a ByteBlower server in 2.x environment on our Support Portal.

Returns
Software version string of the form '2.<X>.<Y>', where <X> is the feature version number and <Y> is the patch version number.
Example

Assume the client is connected (through this object) to a server running the 2.1.4 server software.

1 $server Version.Get

Returns:

2.1.4 

Definition at line 3060 of file api.tcl.