Commit Graph

97 Commits (master)

Author SHA1 Message Date
Vadim Yanitskiy aea8cb80b8 const struct value_string *[]: remove static array size
Change-Id: I806c5053a36f9c74c6b80ac2f7541dad3da58900
2021-11-19 16:58:43 +03:00
Vadim Yanitskiy 71226b18c5 protocol: fix: properly declare value_string arrays
Change-Id: I62b2977d6a130d5b1ea25ddf88b3475f0c6024ef
2021-11-19 02:14:55 +03:00
Harald Welte cb5d8473d7 move variable declarations out of the 'for' loop
this fixes compilation with gcc-4.8
2017-01-24 17:36:39 +01:00
Harald Welte c17070464f add missing gprs_l1.c file 2017-01-24 17:09:26 +01:00
Harald Welte e56a12f2a5 Add python script to generate value_string from file with #defines 2017-01-24 17:09:26 +01:00
Harald Welte d248204bb7 python scripts: Generate file header with #include statements 2017-01-24 17:09:26 +01:00
Harald Welte 78ced2084d Move value_string code generator to separate file 2017-01-24 17:09:26 +01:00
Harald Welte db5831c1c9 Add python script to generate 'struct value_string' from enum
The idea is that you have an input file that defines an enum with
symbolic names for numeric values.  The script then generates a 'struct
value_string' with corresponding strings.
2017-01-24 17:09:26 +01:00
Harald Welte 78e84df4dc add *.pyc to .gitignore 2017-01-22 19:13:00 +01:00
Harald Welte cef7ef60d0 Add python tools that (partially) parse the QXDM database 2017-01-22 19:05:18 +01:00
Harald Welte 7c5858ec43 diag_msg: Mark dispatch table as 'const' 2017-01-22 00:01:58 +01:00
Harald Welte 3710dcc1eb Add support for DIAG EVENT reporting 2017-01-21 23:53:15 +01:00
Harald Welte cf854caa9b diag_msg: Don't replace second character of every msg with 'p'
We want to replace all %s with %p, but not modify other parts of the
format string...
2017-01-21 11:22:44 +01:00
Harald Welte 70ff72d5f4 fix various compilation warnings all over the code 2017-01-21 11:20:07 +01:00
Harald Welte 1570b9f38b decode L2 channel type 2017-01-21 11:15:50 +01:00
Harald Welte 0512d9d266 decoder for RLC-EPDAN, MDSP-CMD, L2-STATE and L2-TRANSM-STATUS 2017-01-21 11:01:45 +01:00
Harald Welte 0442fead33 Enable + Interpret more GPRS related logging
Those logging groups are not present on all firmwares/devices.  Best
success for GPRS low-layer logging so far with an old Gobi2000 card from
2017-01-20 12:04:10 +01:00
Harald Welte fe53544440 gprs: handle RLC uplink/downlink ack/nack params 2017-01-11 11:22:51 +01:00
Harald Welte 7b113a2d33 WIP: More WCDMA/RRC decoding 2017-01-09 21:34:03 +01:00
Harald Welte 280bb05a61 diag_log_gprs_rlc.h: More log message definitions 2017-01-09 16:00:10 +01:00
Harald Welte 5162dd59fa Add (E)GPRS MAC ACK/NACK log support 2017-01-09 15:15:54 +01:00
Harald Welte 65dd71cfa8 diag_log_gprs: Cosmetic change in re-ordering the log_dispatch_tbl 2017-01-09 15:15:46 +01:00
Harald Welte 00749515ef add LLC XID information decode 2017-01-09 14:58:41 +01:00
Harald Welte da5dd03d4e update .gitignore 2017-01-09 14:37:47 +01:00
Harald Welte 35d5f5bf6e add missing diag_dpl.h to repo 2017-01-09 14:35:48 +01:00
Harald Welte 4e5338bc49 WIP: SIM Card logging
I'm getting related messages from the modem, but I somehow cannot decode
the traces so far at all :/
2017-01-08 16:04:47 +01:00
Harald Welte 9e02b556d7 fix diag_umts_rrc_chtype and add more diag_log_code_wcdma 2017-01-08 16:04:47 +01:00
Harald Welte 78b8bda6f6 fix gen_log_config_set_mask()
We were missing the last byte in the log config mask, resulting in
unintended behavior.
2017-01-08 16:04:47 +01:00
Harald Welte 7e6d71ea74 also log config request/response messages via GSMTAP 2017-01-08 16:04:47 +01:00
Harald Welte b8a70980b6 patch %s out of format strings received from phone
%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.
2017-01-08 16:04:01 +01:00
Harald Welte 5fa552cbd3 separate diag_log_umts to diag_log_wcdma
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.
2017-01-08 16:04:01 +01:00
Harald Welte a32c769bb7 Generate GSMTAP messages from raw received DIAG frames
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

I'm not entirely sure if this is  the best strategy, but we can always
implement both modes and switch between them at runtime.
2017-01-08 16:04:01 +01:00
Harald Welte a115fbb1bb diag_read_msg(): Discard any messages shorter than 3 bytes
The 16bit CRC and the FLAG octet together are 3 bytes.  If a message is
shorter than that, something is going wrong, for sure.
2017-01-08 16:04:01 +01:00
Harald Welte 4ae0936123 WIP: Enable PCAP generation in modem 2017-01-07 16:01:42 +01:00
Harald Welte 6ec7abf157 Genreate GSMTAP messages from raw received DIAG frames 2017-01-07 16:01:42 +01:00
Harald Welte 651d4d8fbc replace old magic numbers with proper #defines 2017-01-02 00:53:11 +01:00
Harald Welte 02f7f3af76 diag_io.c: remove left-over 'rc=%d' print 2017-01-02 00:52:29 +01:00
Harald Welte 0eb2ef1a26 DPL: consequently use struct dpl_iid rather than uint32_t 2017-01-02 00:52:01 +01:00
Harald Welte 3b144a27fa DPL: add parsing of results from modem
we can now get a list of DPL interfaces and their links.
2017-01-01 19:51:50 +01:00
Harald Welte f727edcd7d diag_push_subsys_hdr(): subsystem code is 16bits 2017-01-01 19:51:50 +01:00
Harald Welte ddd6a0d249 diag_cmd: Print error messages for bad {command, length, parameter} 2017-01-01 19:51:50 +01:00
Harald Welte 89c159c873 add printing of DIAG_QSR_EXT_MSG_TERSE_F
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.
2017-01-01 19:51:50 +01:00
Harald Welte 022c45a263 register diag_msg via the diag_cmd dispatch table 2017-01-01 19:51:50 +01:00
Harald Welte 95fdb6e584 don't use magic numbers if we have #defines 2017-01-01 19:51:50 +01:00
Harald Welte 58185e6df5 fixup dpl 2017-01-01 19:51:50 +01:00
Harald Welte 7af93aacba diag_msg: endian fixes 2017-01-01 19:51:50 +01:00
Harald Welte f6bd58c7fb diag_msg: Include subsys_id in printed message 2017-01-01 19:51:50 +01:00
Harald Welte e4204631bc diag_log: rough verification if response matches request 2017-01-01 19:51:50 +01:00
Harald Welte c265c1206d remove Tx/Rx debugging from diag_io.c 2017-01-01 19:51:50 +01:00
Harald Welte f180199521 diag_msgc: Parse responses 2017-01-01 19:51:50 +01:00