Just like you use IPv6.src, can you not use SRH() header? Then, you define an offset for inner IPv6 off of SRH(). Offset_fixup allows where in inner IPv6.src you want to randomize.
Hemant
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/a7a45f2a-ace9-41e7-9554-b9738ffbd29en%40googlegroups.com.
Trex can’t possibly define every protocol header in its classes so that you’d look for SRH() in a Trex class. The SRH header should be Scapy header. Write some code and test.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/4d23cd52-6146-4037-881d-bcf4168415cen%40googlegroups.com.
Ah, I was simply asking to change script code and test to answer your question yourself – it takes few seconds to change a python script for field engine. I changed my field engine script to use UDP.dst instead of IPv6.dst.
vm.write(fv_name="mac_src", pkt_offset="UDP.dst", offset_fixup=14)
trex-console fails which indicates the field engine does not support Scapy and just supports few layers (e.g., IP, IPv6) and field offsets off of these headers.
File "/opt/trex-core-2.86/scripts/automation/trex_control_plane/interactive/trex/stl/trex_stl_packet_builder_scapy.py", line 468, in get_field_offet
raise CTRexPacketBuildException(-11, "No layer %s-%d." % (field_name, layer_cnt))
CTRexPacketBuildException: [errcode:-11] 'No layer dst-0.'
We should add a wish-list feature request to trex to support Scapy.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/43bda299-ab61-4257-b293-814a2589f7b0n%40googlegroups.com.
No apologies needed. Sorry if I wasn’t clear.
Yes, it makes sense to use offset from a start such as “mac_src”.
I poked around the trex github repo and only found this code which initializes mac_src, ip_src, etc. All other code is used in a stl script and not very relevant to finding out what all fv_names are supported.
I also filed this new issue today.
https://github.com/cisco-system-traffic-generator/trex-core/issues/669
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/2fcb5967-6be7-4265-836d-aa984b8e7968n%40googlegroups.com.