VIRTUTECH CONFIDENTIAL    Previous - Up - Next

etg

Provided by
etg
Class Hierarchy
conf-objectlog-objectetg
Interfaces Implemented
log_object, event_poster, ethernet_device
Description
The ethernet-traffic-generator (etg) device emulates a network adapter and generates traffic ... todo

Attributes

Attributes inherited from class conf-object
attributes, classname, component, iface, name, object_id, queue
Attributes inherited from class log-object
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
Attribute List
add_crc_on_inject
Optional attribute; read/write access; type: Integer.

Frames injected using the 'inject_packet' will get a correctly calculated CRC added at the end when this attribute is set to 1 (default). When set to 0, the user has to supply a CRC field with the injected frame. Note that you must always provide room for the CRC field, even when this attribute is set to 1.

arp_table
Optional attribute; read/write access; type: [[ss]*].

Internal state.

count
Optional attribute; read/write access; type: i|n.

The number of packets left to send until traffic generation stops. A nil value means an unlimited number of packets.

current_packet
Pseudo attribute; read/write access; type: d|n.

(Obsolete - see the "last-frame" attribute instead). The packet that is currently about to be sent or received. The format is a raw Ethernet frame. This attribute is only valid in Ethernet_Transmit and Ethernet_Receive hap callbacks. It is possible to override the packet by assigning this attribute. The device will drop the current packet if the attribute is set to Nil, or with data of zero length.

dst_ip
Required attribute; read/write access; type: String.

IP address to send packets to.

enabled
Optional attribute; read/write access; type: Integer.

Set to 1 to enable traffic generation.

gateway
Required attribute; read/write access; type: String.

IP address of gateway.

inject_packet
Pseudo attribute; write-only access; type: Data.

Attribute used to send a packet to the network device. Writing this attribute at any time injects a new packet into the device (without involving the network simulation). Injecting a packet copies the packet data, allowing the caller to reuse or dispose of the buffer used for creating the packet, after the attribute is written.

ip
Required attribute; read/write access; type: String.

IP address assigned to the device.

ip_id
Optional attribute; read/write access; type: Integer.

Internal state.

last_frame
Pseudo attribute; read/write access; type: d|n.

The frame that is currently about to be sent or received. The format is a raw Ethernet frame. This attribute is only valid in Ethernet_Transmit and Ethernet_Receive hap callbacks. It is possible to override the packet by assigning this attribute. The device will drop the current packet if the attribute is set to Nil, or with data of zero length.

link
Optional attribute; read/write access; type: Object or Nil.

The Ethernet link that the network device is connected to.

mac_address
Optional attribute; read/write access; type: s|[i{6}]|n.

Ethernet (MAC) address of the network interface.

model_crc
Optional attribute; read/write access; type: Integer.

If set to 1, the device will calculate and include an Ethernet CRC on all transmitted frames, and check the CRC on received frames.

netmask
Required attribute; read/write access; type: String.

Netmask defining the subnet for the device.

network
Pseudo attribute; read/write access; type: Object or Nil.

Obsolete attribute. Use link instead.

packet_size
Required attribute; read/write access; type: Integer.

The size of data packets to send.

pps
Required attribute; read/write access; type: Integer.

Number of packets per second to send.

receive_stats
Optional attribute; read/write access; type: Integer.

Internal state.

recorder
Required attribute; read/write access; type: Object.

Recorder object that allows recording and later playback of network traffic to the interface.

reliability
Optional attribute; read/write access; type: Integer.

This value determined how reliable an established connection is. If set to N it means that with a probability of 1 out of N a package will be lost (not sent to the receiver). The default value is 0 which means that no packages will be lost.

reliability_seed
Optional attribute; read/write access; type: Integer.

The seed value for the randomization of packet loss. See the reliability attribute

rx_bytes
Optional attribute; read/write access; type: Integer.

Internal state.

rx_packets
Optional attribute; read/write access; type: Integer.

Internal state.

started
Optional attribute; read/write access; type: Integer.

Internal state.

state
Optional attribute; read/write access; type: Integer.

Current state of traffic generator.

total_rx_packets
Optional attribute; read/write access; type: Integer.

Total number of UDP packets received on the test port.

total_tx_packets
Optional attribute; read/write access; type: Integer.

Total number of UDP packets transmitted on the test port.

use_gateway
Optional attribute; read/write access; type: Integer.

Internal state.

Command List

Commands defined by interface log_object
log, log-group, log-level, log-size, log-type
Commands
infoprint information about the device
packet-rateSet or display the packets per second rate
packet-sizeSet or display the packet size
startStart generating traffic
statusprint status of the device
stopStop generating traffic

Command Descriptions

<etg>.info
Synopsis
<etg>.info
Description
Print detailed information about the configuration of the device.
<etg>.packet-rate
Synopsis
<etg>.packet-rate [rate]
Description
Set the rate, in packets per second, at which packets are sent by the traffic generator.

If no rate is given, the current rate is displayed.

<etg>.packet-size
Synopsis
<etg>.packet-size [size]
Description
Set the size of the packets that are sent by the traffic generator.

If no size is given, the current size is displayed.

<etg>.start
Synopsis
<etg>.start [count]
Description
Start the traffic generator.
<etg>.status
Synopsis
<etg>.status
Description
Print detailed information about the current status of the device.
<etg>.stop
Synopsis
<etg>.stop
Description
Stop the traffic generator.

VIRTUTECH CONFIDENTIAL    Previous - Up - Next