question

udaya avatar image
udaya asked udaya answered

How to get octet values from STC capture ?

I want to get all the octet values of a packet through STC API. Can you please suggest how to get this ? Appreciate quick response!!
Spirent TestCenter (STC)automationcapture
10 |950

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

udaya avatar image
udaya answered

Here are two problems in STC from a user prospective:

1. The packetdata values which returned by STC are merged (which should NOT be). User needs to split it two character each.

2. I was doing capture on same port multiple times, but the proxyid is same for a port and I was loosing my old values to fetch anywhere in script. I need to define a global hash (PERL) or associative array (TCL) to map and store.

PCAP files is the exact solution. When you save the pcap file you can get it simply on a linux command the raw hex. Yes later we need to convert this to octal. e.g.

tshark -r sim_venom_sanity_DEVICE1_PORT1_1_capture.pcap -Vx -R frame.number==2 | sed -n 's/^[0-9a-f]*\s\(\(\s[0-9a-f][0-9a-f]\)\{1,16\}\).*$/\1/p'
result: ff ff ff ff ff ff 00 10 94 00 00 0a 08 06 00 01 08 00 06 04 00 01 00 10 94 00 00 0a c0 01 01 02 00 00 00 00 00 00 c0 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10 |950

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

ksukesh avatar image
ksukesh answered
In the script, when we use below command stc::perform capturegetframe -captureproxyid capture1 –frameindex 2 command returns following details -Name {CaptureGetFrameCommand 1} -FrameIndex 2 -CaptureProxyId capture1 -Timestamp {2012-12-10 16:18:35.702 439790} -PreambleLength 8 -DataLength 136 -PacketData 55555555555555D500000000001200000000001188B54500006E00000000FFFD393AC0550102C0 000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000FF2F4B1BB528BE9546B182697891B4E74BFCFF655874C788 #Note: packet data will have packet content
10 |950

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

ksukesh avatar image
ksukesh answered

We can use some TCL logic to print them in Octets. Can you give more explanation on how you are expecting them to be printed?

10 |950

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

udaya avatar image
udaya answered
Thanks. Yes, but the values are in hex. Is there anyway to get the octets ?
10 |950

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

udaya avatar image
udaya answered
![alt text][1] [1]: /storage/temp/4753-3.png values in violet color

3.png (30.4 KiB)
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.