Notes and Additional Considerations
- The CloudShark API allows additional comments, tags, and a filename to be specified at the time the of upload. Your application's interface may wish to provide that functionality on a per-capture basis, or globally for all captures.
- If your device does live packet-capture, or some kind of interactive capture, we recommend being able to limit the size/duration of that capture by specifying some termination criteria. “Stop after capturing X bytes” or “Stop after Y seconds” are common ways to implement termination criteria. Upon completion, the file is transmitted to CloudShark, and the resulting session URL is presented to the user, or stored for later use.
- You may want to allow your user to specify a BPF filter to limit the traffic that is captured before sending it to CloudShark. This makes it very easy to isolate traffic from certain hosts, or certain kinds of flows (udp, tcp, port 80, etc) as well as limit the amount of traffic necessary to upload.
- Your application can generate a capture file either in memory, temporary storage, or stream the file to CloudShark. The streaming approach requires starting a HTTP Request and writing an initial pcap header. Additional packets can be sent as part of the HTTP Request using chunked-encoding. CloudShark should receive a chunk of data at least every 60-seconds to avoid the server terminating the connection.
Full API documentation and examples are available here.