Skip to content
Success

Changes

Summary

  1. client: Introduce osmo_pcap_file to prepare support for pcapng (details)
  2. client: Support generation of pcapng file format (details)
Commit c00ba368d90fbef63f084b76f684d1dc9e3373c5 by Pau Espin Pedrol
client: Introduce osmo_pcap_file to prepare support for pcapng

This patch is a preparation patch refactoring code to make it easier to
add pcapng format in follow-up patch.

Different types of encodings are grouped in helper functions.

Change-Id: Ifd389a2a32897e101c62fd280ddca984d485d373
The file was modifiedinclude/osmo-pcap/osmo_pcap_client.h
The file was modifiedinclude/osmo-pcap/Makefile.am
The file was modifiedsrc/osmo_client_network.c
The file was modifiedsrc/Makefile.am
The file was modifiedsrc/osmo_client_core.c
The file was addedsrc/osmo_pcap_file.c
The file was addedinclude/osmo-pcap/osmo_pcap_file.h
Commit 797b77d5e665bf42aed2afc1781381d393bae4c0 by Pau Espin Pedrol
client: 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
The file was modifiedsrc/osmo_client_core.c
The file was modifiedsrc/osmo_client_network.c
The file was modifiedsrc/osmo_pcap_file.c
The file was modifiedsrc/osmo_client_vty.c
The file was modifiedinclude/osmo-pcap/osmo_pcap_client.h
The file was modifieddoc/manuals/chapters/client.adoc
The file was modifiedinclude/osmo-pcap/osmo_pcap_file.h