Printer FriendlyEmail Article Link

How to add RTP-real time header to the Spirent TestCenter raw-Streamblock using TCL API?

Answer

 

1.       Create a raw-streamBlock
2.       Add Ethernet header
3.       Add IPv4 Header
4.       Add UDP header
5.       Add RTP header as shown in the example below
 # Add an EthernetII Header
 stc::create ethernet:EthernetII -under $hStreamBlock -name sb1_eth -srcMac 00:00:20:00:00:00 \
                                                                -dstMac 00:00:00:00:00:40
# Add IP Header
 stc::create ipv4:IPv4 -under $hStreamBlock -name sb1_ipv4 -destAddr 1.1.1.1 \
                                                                -sourceAddr 2.2.2.2 -checksum 0x3333
# Add UDP Header
 stc::create udp:Udp -under $hStreamBlock -name sb1_udp -destPort 1000 \
                                                                -sourcePort 2000 -checksum 0x1000
 
# Add RTP Header .
 set rtphdr [stc::create rtp:RtpHeader -under $hStreamBlock -csrcCount 0x00 -extension 0 -marker 0 \
                        -name sb1_rtp -padding 0 -payloadType 0 -sequenceNumber 0 -Ssrc 00000000 \
                        -timestamp 00000000 -version 2 ]
 

 


Product : Spirent TestCenter,L2-3,Automation,API