Commit
76ba45f5a24f2dc4991a06f2ca6c9ed2ba6ed967
by Pau Espin Pedrolclient: Support generation of pcapng file format
Support transmitting traffic recordings in pcapng towards
osmo-pca-server based on VTY config. Old libpcap's file format
(.pcap) is still left as default to to keep backward compatibility
towards older osmo-pcap-server instances still running. Furthermore,
.pcap support is more extended than .pcapng since it's way older.
When pcapng file format is selected, osmo-pcap-client will use the same
osmo-pcap protocol used in pcap mode, but the payloads encoded in
messages will be in pcapng file format instead of pcap.
This means, for LINK_HDR message type it will encode a file header with
a payload consisting of 1 SHB + N IDB blocks (one for each network
interface being monitored).
Upon each packet recording received from the monitoring interface, it
will encode a LINK_DATA message containing a payload with a encoded
pcapng block.
This works mostly transparetly on the osmo-pcap-server side, since in
general it handles those payloads mostly transparently. Only some sanity
checks will need to be updated and improve there to account for the new
pcapng blocks. This in turn requires identifying pcap vs pcapng format
being recieved from the client, and also placing the proper file suffix
when creating the file. This will be done in a follow-up patch modyfing
the server side.
Related: SYS#5822
Change-Id: I3c80518a1e53a1f77e1aca8dfa83f683f9516ad6