On Mon, 21 Sep 2026 10:51:39 +0100
Marat Khalili <[email protected]> wrote:
> > examples/rpcapd/main.c | 1430 ++++++++++++++++++++++++
>
> main.c is a bit large and handles many different functions. It would be
> more readable if different aspects were handled by different files, or
> at least clearly marked sections of the file, with overall structure
> explained somewhere at the top.
It is mostly comments.
Fits within the general sizes of examples.
source blank comments comment-lines
2569 499 13 17 examples/fips_validation/main.c
2302 411 272 151 examples/l3fwd-power/main.c
2208 452 226 173 examples/l2fwd-crypto/main.c
1542 343 200 102 examples/vhost/main.c
1489 226 104 77 examples/l3fwd/main.c
1254 216 101 99 examples/l2fwd-macsec/main.c
1116 224 99 85 examples/l3fwd-graph/main.c
1045 190 195 72 examples/rpcapd/main.c
944 181 69 60 examples/bbdev_app/main.c
> > examples/rpcapd/meson.build | 19 +
> > examples/rpcapd/rpcap-protocol.h | 127 +++
> Could we just use one from libpcap?
The long answer:
- the file is internal to libpcap and not shipped.
- Would have to add SPDX
- It isn't just wire format but includes function prototypes
for code in libpcap's implementation
- It is ugly style overall: lots of typedefs, windows-ism's, #pragma
What AI did was extract the parts that were used.