Commit d391f4e
Aritra Basu
Add HTTP capture server for BPF filtering with binary API support
Capture Server (calico-vpp-agent/capture/capture_server.go):
- HTTP server running on port 9999 (configurable via CaptureServerPort)
- Endpoints: /api/status, /api/trace, /api/pcap, /api/dispatch, /api/stop
- Handles timeouts and user conflicts via mutex-based single-instance execution
- Handles client disconnect to cleanup captures
- Uses vpplink binary API for stability instead of vppctl CLI
vpplink API additions:
- vpplink/bpf.go: BPF filter management via binary API
- vpplink/tracedump.go: trace capture and dump via binary API
- Generated bindings for bpf_trace_filter and tracedump
calicovppctl updates:
- Added --use-api flag to use the capture server instead of vppctl
commands via kubectl exec for trace, pcap and dispatch
- Added 'capture status' subcommand to check capture status
- Added 'capture stop' subcommand to stop running captures
config updates:
- Added CaptureServerPort configuration option (default: 9999)1 parent fed6073 commit d391f4e
File tree
12 files changed
+2610
-16
lines changed- calico-vpp-agent
- capture
- cmd
- cmd/calicovppctl
- config
- vpplink
- generated
- bindings
- bpf_trace_filter
- tracedump
12 files changed
+2610
-16
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
0 commit comments