Articles

Embedding packets in other pages

2 min read

Have you ever wanted to embed a packet trace right into the blog post you were writing? We know you have. You’ve told us you want that! When a screenshot of the decode won’t do, you can use CloudShark to share individual frame decodes in blog posts, documentation, help forums, and pretty much anywhere else you can write HTML.

Let’s see it in action!

Here’s packet 2 from our TCP Fast open example. Go ahead, click around and check out the packet. (option+click works too for expanding everything under a parent node)

  • Frame 2: 58 bytes on wire (464 bits), 58 bytes captured (464 bits) on interface 0
  • Ethernet II, Src: QaCafe_00:00:01 (b0:75:0c:00:00:01), Dst: D-LinkIn_4c:a1:cb (1c:7e:e5:4c:a1:cb)
  • Internet Protocol Version 4, Src: 192.168.0.100, Dst: 3.3.3.3
  • Transmission Control Protocol, Src Port: 13047, Dst Port: 13054, Seq: 0, Len: 0

Getting this into a document is pretty easy. Here’s the source:

<iframe src="url" style='width:100%; border: 1px solid #ccc'></iframe>

The url above needs to look defined with the following parameters pointing to the specific frame you want to load.

http://www.cloudshark.org/captures/[capture-id]/decode?frame=[frame-number]&window=yes

Notes

  • Make sure that the capture session you are loading is public or else a login message will appear inside the <iframe> . 
  • The ability to load content from your CloudShark Appliance into an <iframe> may be limited by the servers X-Frame-Options policy. More info here. 
  • Now you can only do this with the decode section of a packet right now. 

Tell us about your blog post or article!

If you embed a pcap on CloudShark into your blog or article, let us know! We’ll be happy to retweet it out to our followers. Say hi to us @cloudshark


Want articles like this delivered right to your inbox?

Sign for our Newsletter

No spam, just good networking