pcapdump(1)
π pcapdump β bestie edition π
okay so real talk, this is pcapdump, section 1 of the manual, and it's your dedicated packet capture utility. she's giving main character energy and she's here to snatch packets off your network and stash them in a file. let's get into it π¦
β¨ SYNOPSIS β¨
pcapdump [OPTIONS]...
that's it. that's the whole vibe. options, and lots of 'em. π
πΈ DESCRIPTION πΈ
so pcapdump captures packets from a network interface and writes them to a dumpfile. periodt. π
and here's the lil detail you don't wanna miss: the filename argument you hand to -w gets formatted by strftime(3). yes bestie, strftime. so you can put all your cute date/time format specifiers in there and it'll do its lil transformation thing. iykyk. β¨
π PCAPNET OPTIONS π
these are the ones that talk to the packet-capture layer. the OGs. π
-iinterface β the input interface to read packets from. tell her where to look. π-rpcap file β the dump file to read packets from. (reading era, not writing era.)-wpcap file β the dump file to write your filtered packets to. remember thestrftime(3)thing from up top? yeah. that applies here. πΈ-fexpression β a BPF expression that selects which packets get filtered. this is the bouncer at the club. π-ssnaplen β capture snaplen bytes of data from each packet. not the whole thing, just a lil slice. π-pβ disables promiscuous mode sniffing. so she minds her own business and only grabs what's addressed to her. π
π PROGRAM OPTIONS π
the housekeeping, the scheduling, the whole backstage crew. iconic behavior only. β
-uowner β sets the output file's owning user to owner. π-ggroup β sets the output file's owning group to group. π«Ά-mmode β sets the output file's mode to mode, and it's specified in octal. yes, octal. like0644energy. don't come at her with decimals. π§-tsecs β dump file rotation interval, in seconds. she switches files on a schedule, very organized of her. π-ccount β exit after capturing count packets. she knows when to leave the party. π-Tsecs β exit after capturing during this amount of seconds. timed era. β°-Hβ only captures link, network, and transport headers; does not capture application-layer data. so the outer envelope only, no peeking at the letter inside. π-Ssample value β samples the packet stream by only dumping 1 in every sample value packets. lowkey a rate limit but make it cute. πΈ-Rβ used together with-S, samples the packets randomly instead of systematically. chaos mode, but make it statistical. π₯-Ppidfile β daemonizes the process and writes its PID to pidfile. she's going to the background, bestie, but she left a note. π-Cconfig file β the file to read configuration variables from. so instead of passing all your config through the command line, you can just use a file to specify values for thebpf,device,filefmt,group,interval,mode,owner,promisc, andsnaplenoptions. and ngl, not all of them need to be specified β defaults will be used otherwise. π¦
want an example? there's literally one waiting for you at /usr/share/doc/pcaputils/examples/pcapdump/eth0. go look, it's giving tutorial. β¨
and that's the whole page, bestie!! this was pcapdump(1), dated 26 December 2021, from the pcaputils crew. stay capturing, stay slaying, and pls pls pls read your BPF expressions carefully. mwah πππ¦β¨
π¦ where this page comes from
- debian bookworm: pcaputils 0.8-1.1
- ubuntu jammy: pcaputils 0.8-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms