All Classes Namespaces Files Functions Pages
Layer3.Icmpv6EchoSession Class Reference

Session for handling ICMPv6 Echo Requests and Replies. More...

Methods

 Data.Size.Get
 Returns the data size of our ICMPv6 Echo Requests. More...
 
 Data.Size.Set dataSize
 Configures the data size. More...
 
 Description.Get
 Returns a textual description of the object.
 
 DestinationIp.Get
 Returns the ICMPv6 Echo Request destination IPv6 address. More...
 
 DestinationIp.Set ipv6Address
 Configure the destination IPv6 address. More...
 
 Echo.Loop.Count.Get
 Returns the Echo Request count. More...
 
 Echo.Loop.Count.Set packetCount
 Configures the Echo Request count. More...
 
 Echo.Loop.Interval.Get
 Returns the Echo Request interval. More...
 
 Echo.Loop.Interval.Set loopInterval
 Configures the Echo Request interval. More...
 
 Echo.Loop.Start
 Starts sending Echo Requests in a loop. More...
 
 Echo.Loop.Stop
 Stops sending Echo Requests in a loop. More...
 
 Echo.Request.Send
 Transmit an ICMPv6 Echo Request. More...
 
 Echo.Statistics.Clear
 Resets the ICMPv6 Session statistics. More...
 
 Echo.Statistics.Get
 Returns the ICMPv6 Echo session statistics. More...
 
 HopLimit.Get
 Getting the ICMPv6 Echo Request HopLimit. More...
 
 HopLimit.Set hopLimit
 Setting the ICMPv6 Echo Request HopLimit. More...
 
 Identifier.Get
 Getting the ICMPv6 Echo Request Identifier (Application ID) More...
 
 Parent.Get
 Returns the parent object.
 
 Remote.Address.Get
 Returns the ICMPv6 Echo Request destination IPv6 address. More...
 
 Remote.Address.Set ipv6Address
 Configure the destination IPv6 address. More...
 
 Session.Info.Get
 Returns the session information. More...
 
 TrafficClass.Get
 Retrieves the 'Traffic Class' configuration of the IP layer. More...
 
 TrafficClass.Set
 Configures the 'Traffic Class' used at the IP layer. More...
 

Class overview

Session for handling ICMPv6 Echo Requests and Replies.

This Session uses the ICMPv6 protocol for receiving and / or transmitting ICMPv6 Echo Request and / or Replies An ICMPv6 session can be created using Layer3.Icmpv6Protocol::Session.Add

Some use cases for this session are:

DUT validation
  • Verify whether Echo Request / Replies are filtered out or not
  • Verify public / private connectivity for Routers, NAT gateways, ...
DUT stability
Verify that Echo Replies are received during stability tests

Definition at line 7232 of file api.tcl.

Method documentation

Layer3.Icmpv6EchoSession::Data.Size.Get

Returns the data size of our ICMPv6 Echo Requests.

The data size of our ICMPv6 Echo Requests is the payload size of the packet

Default value: 56
Returns
ICMPv6 Echo data size
Example

The ICMPv6 session has been configure to add 76 Bytes payload in the ICMPv6 Request packets

1 $icmpv6Session Data.Size.Get

Returns:

76 

Definition at line 7248 of file api.tcl.

Layer3.Icmpv6EchoSession::Data.Size.Set   dataSize  

Configures the data size.

This method configures the data size of our ICMPv6 Echo Requests

The data size of our ICMPv6 Echo Requests is the payload size of the packet

Parameters
dataSizeThe ICMPv6 data size you wish to configure.
Valid range: 0 to <port_mdl> - <icmpv6_header_size>.
Where
<port_mdl>
Value of ByteBlowerPort::MDL.Get
<icmpv6_header_size>
Ethernet header size (14) + IPv6 header size (40) + ICMPv6 header size (8)
Default value: 56
Exceptions
<tcl_error>bad lexical cast: When the value could not be interpreted as a valid integer
ByteBlower.Protocol.InvalidValueWhen the value is out of range
Example

Configure 92Bytes payload for the ICMP Request packets

1 $icmpSession Data.Size.Set 92

Definition at line 7272 of file api.tcl.

Layer3.Icmpv6EchoSession::DestinationIp.Get

Returns the ICMPv6 Echo Request destination IPv6 address.

Deprecated:
since 2.3.0, please use Remote.Address.Get .

This method returns the IPv6 address which has been configured with DestinationIp.Set

Returns
The Destination IPv6 address for this session.
Exceptions
ByteBlower.SessionWhen the destination IPv6 address was not yet configured
Example
1 $icmpSession DestinationIp.Get

Returns:

2001:0db8:85a3:0042:1000:8a2e:0370:7334 

Definition at line 7295 of file api.tcl.

Layer3.Icmpv6EchoSession::DestinationIp.Set   ipv6Address  

Configure the destination IPv6 address.

Deprecated:
since 2.3.0, please use Remote.Address.Set .

This method configures the destination IPv6 address for our ICMPv6 Echo packets

The destination IPv6 address defines to where the ICMPv6 Echo Requests will be sent or from where ICMPv6 Echo Responses are / were received.

Parameters
ipv6AddressThe Destination IPv6 Address for this session.
Exceptions
<tcl_error>Invalid IPv6 address: When the value could not be interpreted as an IPv6 address
Example
1 $icmpv6Session DestinationIp.Set "2001:0db8:85a3:0042:1000:8a2e:0370:7334"

Definition at line 7315 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Count.Get

Returns the Echo Request count.

This method returns the number of Echo Requests which will be transmitted when sending in a loop.

Default value: infinite
The actual value is <max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)
Returns
The number of ICMPv6 Echo Request packets in a loop
Since
1.8.18
Example

The transmit loop is configured to transmit 12345 packets

1 $icmpSession Echo.Loop.Count.Get

Returns:

12345 

Definition at line 7334 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Count.Set   packetCount  

Configures the Echo Request count.

This method configures the number of Echo Requests which will be transmitted when sending in a loop.

The Echo Request Loop can be started using Echo.Loop.Start

Parameters
packetCountThe number of ICMPv6 Echo Request packets to transmit
Default value: infinite
The actual value is <max_uint64> = 0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)
Exceptions
<tcl_error>bad lexical cast: When the value could not be interpreted as a valid integer
Since
1.8.18
Example

Configure the loop to transmit 500 ICMP Echo Request packets

1 $icmpSession Echo.Loop.Count.Set 500

Definition at line 7357 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Interval.Get

Returns the Echo Request interval.

This method returns the interval between subsequent Echo Request packets when sending in a loop.

The Echo Request Loop can be started using Echo.Loop.Start

Note
The interval is always returned in nanoseconds resolution. No unit is added to the value.
Default value: 1s
Returns
The interval between two ICMPv6 Echo Request packets [ns]
Example

The transmit loop is configured with an interval of 625 microseconds

1 $icmpSession Echo.Loop.Interval.Get

Returns:

625000 

Definition at line 7377 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Interval.Set   loopInterval  

Configures the Echo Request interval.

This method configures the interval between subsequent Echo Request packets when sending in a loop.

The interval has a nanosecond resolution. You can provide a time unit for the loop interval value.

The Echo Request Loop can be started using Echo.Loop.Start

Parameters
loopIntervalThe interval between two ICMPv6 Echo Request packets [ns].
Valid range: 0 to <max_uint64>[ns]
Where
<max_uint64>
0xFFFFFFFFFFFFFFFF = 18446744073709551615 (= maximum unsigned 64bit integer)
Default value: 1s
Exceptions
<tcl_error>Failed to parse time string: When the value could not be interpreted as a valid time string
Example

Configure an interval of 50 microseconds (50000 nanoseconds)

1 $icmpv6Session Echo.Loop.Interval.Set 50000

Configure an interval of 500 milliseconds

1 $icmpv6Session Echo.Loop.Interval.Set 500ms

Configure an interval of 1.25 milliseconds

1 $icmpv6Session Echo.Loop.Interval.Set 1250us

Definition at line 7401 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Start

Starts sending Echo Requests in a loop.

This method start sending Echo Requests in a loop.

The interval between Echo Request can be configured using the method Echo.Loop.Interval.Set

If a limited number of Echo Request is desired, this can be configured using the method Echo.Loop.Count.Set

Note
This method call is (partially) non-blocking. The call will return as soon as the session is started an the loop is running or an error occurred during session initialization.
Precondition
The Destination IPv6 address must be configured (using DestinationIp.Set) before sending Echo Requests
Exceptions
Session.UnavailableWhen the destination IPv6 address was not yet configured
Protocol.Session.CreationFailedWhen the destination IPv6 address cannot be reached

Definition at line 7421 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Loop.Stop

Stops sending Echo Requests in a loop.

This method stops sending Echo Requests in a loop. The loop can be started with Echo.Loop.Start

Note
This method does not throw an exception if the loop was not started

Definition at line 7431 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Request.Send

Transmit an ICMPv6 Echo Request.

This method sends one ICMPv6 Echo Request.

Note
This method call is (partially) non-blocking. The call will not return as soon the session is setup and the request is sent or an error occurred (exception is thrown). The call does not wait until an Echo Reply is received.

The results/statistics can be obtained using the method Echo.Statistics.Get

Precondition
The Destination IPv6 address must be configured (using DestinationIp.Set) before sending Echo Requests
Exceptions
ByteBlower.Session.UnavailableWhen the destination IPv6 address was not yet configured
ByteBlower.Protocol.Session.CreationFailedWhen the destination IPv6 address cannot be reached

Definition at line 7449 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Statistics.Clear

Resets the ICMPv6 Session statistics.

Deprecated:
Deprecated since version 2.3.0. The recommended approach is to destruct this session and create a new one.

This method resets the ICMPv6 Session statistics.

The counters which are returned by Echo.Statistics.Get are set to 0

Definition at line 7461 of file api.tcl.

Layer3.Icmpv6EchoSession::Echo.Statistics.Get

Returns the ICMPv6 Echo session statistics.

Deprecated:
Deprecated since version 2.3.0 in favor of Session.Info.Get , which provides the same information
Returns
Returns a list of 4 name-value pairs with various packet counters on this session:
RxEchoRequests
Number of ICMPv6 Echo Requests received.
TxEchoReplies
Number of ICMPv6 Echo Replies sent.
TxEchoRequests
Number of ICMPv6 Echo Requests sent.
RxEchoReplies
Number of ICMPv6 Echo Replies received.
Example
1 $icmpv6Session Echo.Statistics.Get

Returns:

RxEchoRequests 0 TxEchoReplies 0 TxEchoRequests 0 RxEchoReplies 0 

Definition at line 7473 of file api.tcl.

Layer3.Icmpv6EchoSession::HopLimit.Get

Getting the ICMPv6 Echo Request HopLimit.

Returns
The ICMPv6 Echo Request ICMPv6 HopLimit for this Session.
Example
1 $icmpv6Session HopLimit.Get

Returns:

123 

Definition at line 7485 of file api.tcl.

Layer3.Icmpv6EchoSession::HopLimit.Set   hopLimit  

Setting the ICMPv6 Echo Request HopLimit.

The Hop Limit field is decremented when the packet is forwarded by a router.

Parameters
hopLimitThe ICMPv6 Echo Request ICMPv6 HopLimit for this Session. The maximum legal value is 255.
Example
1 $icmpv6Session HopLimit.Set 123

Definition at line 7499 of file api.tcl.

Layer3.Icmpv6EchoSession::Identifier.Get

Getting the ICMPv6 Echo Request Identifier (Application ID)

Returns
The ICMPv6 Echo Request ICMPv6 Identifier for this Session.
Example

Returns the (integer) value of the ICMP ID (Application ID)

1 $icmpv6Session Identifier.Get

Returns:

21764 

Definition at line 7511 of file api.tcl.

Layer3.Icmpv6EchoSession::Remote.Address.Get

Returns the ICMPv6 Echo Request destination IPv6 address.

Since
2.3.0

This method returns the IPv6 address which has been configured with Remote.Address.Set

Returns
The Destination IPv6 address for this session.
Exceptions
ByteBlower.SessionWhen the destination IPv6 address was not yet configured
Example
1 $icmpSession Remote.Address.Get

Returns:

2001:0db8:85a3:0042:1000:8a2e:0370:7334 

Definition at line 7534 of file api.tcl.

Layer3.Icmpv6EchoSession::Remote.Address.Set   ipv6Address  

Configure the destination IPv6 address.

Since
2.3.0

This method configures the destination IPv6 address for our ICMPv6 Echo packets

The destination IPv6 address defines to where the ICMPv6 Echo Requests will be sent or from where ICMPv6 Echo Responses are / were received.

Parameters
ipv6AddressThe Destination IPv6 Address for this session.
Exceptions
<tcl_error>Invalid IPv6 address: When the value could not be interpreted as an IPv6 address
Example
1 $icmpv6Session Remote.Address.Set "2001:0db8:85a3:0042:1000:8a2e:0370:7334"

Definition at line 7554 of file api.tcl.

Layer3.Icmpv6EchoSession::Session.Info.Get

Returns the session information.

Since
2.3.0

This method returns the SessionInfo object.

Returns
A SessionInfo object of type Layer3.Icmpv6.EchoSessionInfo object.
Example

The transmit loop is configured to transmit 12345 packets

1 $icmpSession Session.Info.Get

Returns:

OID 

Definition at line 7570 of file api.tcl.

Layer3.Icmpv6EchoSession::TrafficClass.Get

Retrieves the 'Traffic Class' configuration of the IP layer.

Since
2.5.0

This method returns a number from 0 up to 255. This value represents the the byte used at the IP layer.

Returns
The byte value of the 'Type Of Service' or 'Traffic Class' field. The default value is 0.
Example
1 $icmpSession TrafficClass.Get

Definition at line 7586 of file api.tcl.

Layer3.Icmpv6EchoSession::TrafficClass.Set

Configures the 'Traffic Class' used at the IP layer.

Since
2.5.0

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase, thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example
1 $icmpSession TrafficClass.Set 16

Definition at line 7602 of file api.tcl.