From c7ba20f4f7c4521fdf50238c7e4ccc50f13b248e Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Sun, 4 Oct 2015 18:39:11 +0300 Subject: Updated packet export doc --- .../doc/packet_generator/export_format.yaml | 72 ++++++++++++++-------- .../doc/packet_generator/index.rst | 1 + .../doc/packet_generator/stream_export.rst | 10 +-- 3 files changed, 53 insertions(+), 30 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml b/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml index 86ae4bc1..9f8c8f7b 100755 --- a/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml +++ b/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml @@ -1,27 +1,47 @@ -router: - model : 1RU - hostname : ASR1001_T-Rex - ip_address : 10.56.199.247 - image : asr1001-universalk9.BLD_V155_2_S_XE315_THROTTLE_LATEST_20150121_110036-std.bin - line_password : lab - en_password : lab - mgmt_interface : GigabitEthernet0/0/0 - clean_config : /Configurations/danklei/asr1001_TRex_clean_config.cfg - intf_masking : 255.255.255.0 - ipv6_mask : 64 - interfaces : - - client : - name : GigabitEthernet0/0/1 - src_mac_addr : 0000.0001.0000 - dest_mac_addr : 0000.0001.0000 - server : - name : GigabitEthernet0/0/2 - src_mac_addr : 0000.0001.0000 - dest_mac_addr : 0000.0001.0000 - vrf_name : null +#################################################### +#### TRex packet export format #### +#################################################### -tftp: - hostname : ats-asr-srv-1 - ip_address : 10.56.128.23 - root_dir : /auto/avc-devtest/ - images_path : /images/1RU/ \ No newline at end of file +# PACKET REP - OPTION #1 +packet: + is_pcap : YES/NO # <1> + binary : [] # <2> + pcap : path/to/pcap/file.pcap # <3> + meta : any metadata wished to # <4> + +# PACKET REP - OPTION #2 +packet: + data : [] / path/to/pcap/file.pcap # <5> + meta : any metadata wished to # <4> + +vm: # <6> + - vm instruction #1 + - vm instruction #2 + ... + - vm instruction #N + + +################################### +#### Comments #### +################################### +# +# <1>: is_pcap is a boolean field that indicates if packet is transferred by pcap referencs +# ('YES') or binary representation ('NO'). +# +# <2>: binary field encodes the packet in binary representation. in a sequence (array) data. +# Each array item is an integer ranging 0-255. +# **LEAVE BLANK IF USING PCAP REFERENCE** +# +# <3>: path to the linked pcap file. Make sure to provide path with reading credentials. +# **LEAVE BLANK IF USING BINARY REP FOR THE PACKET** +# +# <4>: meta data is any JSON formatted data ment to be passed on. +# +# <5>: data field can be both binary representation or pcap file refernce, +# without the need for user's explicit typing. +# The application logic differs between the cases by the object type +# (array/string ending in '.pcap') +# Less configuration, little more confusing, LESS similar to RPC spec +# +# <6>: vm instructions passed in array representation (sequence). +# Each instruction is deifned according to the structures of the supported VM instructions. \ No newline at end of file diff --git a/scripts/automation/trex_control_plane/doc/packet_generator/index.rst b/scripts/automation/trex_control_plane/doc/packet_generator/index.rst index f3cf46ff..ed1d460d 100755 --- a/scripts/automation/trex_control_plane/doc/packet_generator/index.rst +++ b/scripts/automation/trex_control_plane/doc/packet_generator/index.rst @@ -12,6 +12,7 @@ The packet generator module does extensive usage with `dkpt `_ of TRex RPC server spec, which defines the raw interaction with TRex server. +3. Only packet binary data and VM instructinos are to be saved. Any meta-data packet builder module used while creating the packet will be stripped out. Export Format ------------- .. literalinclude:: export_format.yaml + :lines: 4- + :linenos: Example ------- -Whenever TRex is publishing live data, it uses JSON notation to describe the data-object. +The following files snapshot represents each of the options. -- cgit 1.2.3-korg