This page defines the stable library contract for v1.x. It is intentionally compact and focused on user-facing namespaces.
Public namespaces:
paclo.corepaclo.decode-extInternal namespaces (not covered by compatibility guarantees):
paclo.pcappaclo.parsepaclo.proto.*paclo.corebpf(bpf form)
nil, string, protocol keyword, or DSL vectornil)ex-info for unsupported form/operator/keywordpackets(packets opts)
:path (offline) or :device (live):filter: BPF string / keyword / DSL vector:decode?, :xform, and additional capture options:queue-mode :dropping may be combined with :queue-cap and
:on-queue-stats:decode? true):
:decoded:decode-error:decoded exists, paclo.decode-ext/apply! is invokedex-info for invalid :filter typereduce-packets(reduce-packets opts rf init)
packets:decode-mode :flow for a flat low-allocation flow projection:xform into the reducing functionreduced for immediate early termination:decode? true result and extension behavior[high-long low-long]:decode? and :decode-mode cannot be combinedex-info for invalid :filter type:error-mode :throw|:pass and :on-errorreduce-packets-report(reduce-packets-report opts rf init)
reduce-packets{:result completed-accumulator :stats execution-stats}:queue is nil because synchronous reduction has no producer queue:max-packets, :max-time, :idle-timeout,
:predicate, :reduced, :eof, and :error(start-capture opts)
(capture-packets capture)
(stop-capture! capture)
(capture-stats capture)
start-capture:
:device or offline :path plus the compatible filter,
decode, transducer, stopping, queue, and error optionsjava.io.Closeable handle intended for with-opencapture-packets:
with-open scopestop-capture!:
capture-stats:
write-pcap!(write-pcap! packets out-path)
packets: seq of byte-array or {:bytes ... :sec ... :usec ...} mapsout-path: non-blank output pathex-info for invalid/missing output path or invalid packet entrylist-devices(list-devices)
{:name "en0" :desc "Wi-Fi"}-main(-main & _)
clojure -M:runpaclo.decode-extregister!(register! k f)
(fn [m] m') under key kkunregister!(unregister! k)
nilinstalled(installed)
apply!(apply! m)
m is a map with :decoded and without :decode-errorCan you improve this documentation? These fine people already did:
Nanto & nantoEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |