%s can obviously not work, as we have no access to the targets memory
space on the host PC. I guess the programmers adding those log lines
have done so in error. Let's replace %s with %p in the format string.
Qualcomm differentiates between WCDMA (the access stratum) and UMTS (the
non access stratum). Let's reflect that here. As an added bonus, we
get working NAS protocol traces.
This forwards the raw DIAG messages via GSMTAP, so the receiver (e.g.
wireshark) will have to do a full DIAG protocol decode. I currently
prefer this idea to that of converting only the protocol payload to
"native" GSMTAP messages like GSMTAP_UM.
One of the problems is that the LAPDm headers are alrady stripped, and
we would have to re-add fake LAPDm headers to generate GSMTAP_UM. So
let's rather forward all information we have and let wireshark deal with
it.
I'm not entirely sure if this is the best strategy, but we can always
implement both modes and switch between them at runtime.
Those are QSHRINK type messages where the format-string is not contained
in the message itself but would have to be provided from an external
source and looked up by a hash.
Move all protocol definitions to protocol/*.h and keep only
definitions related to our implementation as *.h in the top directory.
Also, remove some header files to reduce header file proliferation.
we now have a nice structure for dispatching log messages to various
handlers, each self-contained. As an added benefit, we remove the need
to manually enable all the various log codes, as we simply auto-generate
the default config from all the message types we support.
Furthermore, we reduce computational complexity by avoiding linear
iteration over the array of registered log handlers.
there is too many things called log. Let's align more closely with how
diag calls things. This function is about handling the extended message
service, which is basically a 'remote printf'.