I created a simple ASTF profile that sends a HTTP request from one IP and receives a HTTP reply from another IP.
Essentially:
------------------------------------
# Client Program.
prog_c = ASTFProgram()
prog_c.send(http_req)
prog_c.recv((len(http_res)))
# Server Program.
prog_s = ASTFProgram()
prog_s.recv((len(http_req)))
prog_s.send(http_res)
client_template = ASTFTCPClientTemplate(program=prog_c, ip_gen=ip_gen)
server_template = ASTFTCPServerTemplate(program=prog_s)
template = ASTFTemplate(client_template=client_template,
server_template=server_template)
return ASTFProfile(default_ip_gen=ip_gen, templates=template)
------------------------------------
If I run this profile with `sudo ./t-rex-64 -f /vagrant/astf/http.py -c 1 --ast`, it is sent over and over again (like a continuous stream in stateless mode).
I know that I can set the test duration to x seconds, but I wonder if it's possible to tell TRex to execute the profile exactly once?
What I need is not a continuous execution but a "burst" with one HTTP request and one HTTP reply (+ implicit TCP 3-way-handshake and termination).
(I am aware that I can get the PCAP of a single execution with astf-sim. This PCAP could then be replayed exactly once. However, this looks like a rather hacky solution and would be my last resort - especially because my profile will get more complex later ...)
--
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 post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/8a2f78cd-45cc-41bc-a33b-c64bd2b53b34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.