Export packet template frames to pcap
POST
/packet-constructor/pcapCompiles the packet template and returns frames start..start+count-1 as a pcap file (Ethernet, without FCS) for Wireshark. The timestamp of frame n is n microseconds. Nothing is saved.
Contract
Parameter | Value |
|---|---|
| Section | packet-constructor |
| Authentication | CookieAuth |
| Consumes | application/json |
| Produces | application/octet-stream |
Parameters
1 parameter
Name | Location | Required | Type | Description |
|---|---|---|---|---|
| request | body | yes | object | Template, the first frame number (start), and the number of frames (count; default 1000, at most 10000) |
{ "count": 0, "port": 0, "sources": [ { "agent": { "id": 0 }, "data": [ { "accessGroupId": 0, "accessPorts": "<string>", "effectiveL2Policy": {}, "interface": "<string>", "l2PolicySource": "network", "l2PolicyVersion": 0, "mac": {}, "network": {}, "networkSource": "<string>", "randomMac": true, "weight": 0 } ] } ], "start": 0, "targets": [ { "accessGroupId": 0, "accessPorts": "<string>", "dstMacMode": "<string>", "effectiveL2Policy": { "dstMacMode": "<string>", "gatewayMac": "<string>", "innerL2Policy": [ 0 ], "outerL2Policy": [ 0 ], "pcapL2Precedence": "<string>", "sourceMacOverrides": [ {} ], "sourceMacPolicy": {}, "targetMacOverrides": [ {} ], "targetMacPolicy": {} }, "gatewayMac": { "id": 0 }, "l2PolicySource": "network", "l2PolicyVersion": 0, "mac": { "id": 0 }, "network": { "id": 0 }, "networkSource": "<string>", "randomMac": true, "weight": 0 } ], "template": { "frameSize": { "entries": [ {} ], "max": 0, "min": 0, "mode": "<string>", "preset": "<string>", "seed": 0, "size": 0, "step": 0 }, "groups": [ { "id": "<string>", "name": "<string>" } ], "name": "<string>", "payload": { "mode": "<string>", "pattern": "<string>", "seed": 0 }, "stack": [ { "fields": { "<key>": {} }, "protocol": "<string>" } ], "version": 0 } }
Responses
5 responses
Status | Description | Type |
|---|---|---|
200 | packet-template.pcap file | file |
400 | Invalid request body or template; template errors are listed in data.issues[]{path, message} | object |
401 | Unauthorized | object |
413 | Request body exceeds 8 MiB | object |
500 | Failed to write the pcap | object |
{}{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }{ "data": {}, "error": "<string>" }