question

Diwakar01 avatar image
Diwakar01 asked eangeles edited

How to create simple ipv4 stream block in python script

Hi all,

Please can someone tell me how to create simple ipv4 traffic in python script to be sent across

python script
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
eangeles avatar image
eangeles answered eangeles edited

Hi @Diwakar01

If using StcPython, you can do the following:

from StcPython import StcPython
stc = StcPython()
portLocation = '//10.10.10.20/8/5'
hport = stc.create("port", under="project1", location=portLocation)
hsb1 = stc.create("streamblock", under=hport)

The above will create a config with 1 port and 1 raw streamblock with Ethernet and IPv4 headers

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.