Public, data-first facade for Paclo.
Main entry points:
packets for live/offline capture as lazy sequencesbpf for BPF DSL -> string conversionwrite-pcap! for writing packet byte sequencesPublic, data-first facade for Paclo. Main entry points: - `packets` for live/offline capture as lazy sequences - `bpf` for BPF DSL -> string conversion - `write-pcap!` for writing packet byte sequences
(-main & _)Repository-local convenience entrypoint. Paclo is a library; use example commands for executable workflows.
Repository-local convenience entrypoint. Paclo is a library; use example commands for executable workflows.
(bpf form)Convert a BPF DSL value into a libpcap filter string.
Accepted input:
nil -> nil:udp, :tcp, :icmp, :icmp6, :arp, :ip, :ipv4, :ip6, :ipv6):and, :or, :not, :proto, host/net/port forms)Throws ex-info for unsupported forms/operators/keywords.
Convert a BPF DSL value into a libpcap filter string. Accepted input: - `nil` -> `nil` - string -> returned as-is - keyword protocol (`:udp`, `:tcp`, `:icmp`, `:icmp6`, `:arp`, `:ip`, `:ipv4`, `:ip6`, `:ipv6`) - vector DSL form (`:and`, `:or`, `:not`, `:proto`, host/net/port forms) Throws `ex-info` for unsupported forms/operators/keywords.
(list-devices)Return available capture devices as
{:name <string> :desc <string|nil>} maps.
Return available capture devices as
`{:name <string> :desc <string|nil>}` maps.(packets {:keys [filter decode? xform] :as opts})Return packets as a lazy sequence.
Key opts:
:path (offline) or :device (live):filter: BPF string, protocol keyword, or BPF DSL vector:decode?: when true, add :decoded or :decode-error to each packet map:xform: transducer applied to output stream via sequenceThrows ex-info when :filter has an unsupported type.
Return packets as a lazy sequence. Key opts: - source: `:path` (offline) or `:device` (live) - `:filter`: BPF string, protocol keyword, or BPF DSL vector - `:decode?`: when true, add `:decoded` or `:decode-error` to each packet map - `:xform`: transducer applied to output stream via `sequence` Throws `ex-info` when `:filter` has an unsupported type.
(write-pcap! packets out)Write packet bytes to a PCAP file.
packets can contain:
byte-array:bytes and optional :sec/:usec timestampsWrite packet bytes to a PCAP file. `packets` can contain: - `byte-array` - map with `:bytes` and optional `:sec`/`:usec` timestamps
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 |