diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-10 02:15:20 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-08-27 03:52:45 +0200 |
commit | 31eabbbbba8d18639d1de89d547ba0d787320d25 (patch) | |
tree | 86be1c39f0f508bc36764ac5b2c7e540d3a25064 /src | |
parent | 0871a4c0874e86c7a9c33eb5cffd5f817c9a3d80 (diff) |
04.08: log protocol discriminators and message types by name
On incoming 04.08 messages, we log only the protocol discriminator in
decimal. Enhance: log pdisc and message type in hex, and also log the
protocol and message type as human readable string.
Also adjust the msc_vlr tests' log statements for wrapped rx/tx functions
of dtap from/to the MS.
Adjust the expected output of msc_vlr_tests.
Change-Id: Ida205d217e304337d816b14fd15e2ee435e7397d
Depends: libosmocore change-id I0fca8e95ed5c2148b1a7440eff3fc9c7583898df
Diffstat (limited to 'src')
-rw-r--r-- | src/libmsc/gsm_04_08.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 3f3f90581..d97bde235 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3003,10 +3003,10 @@ void cm_service_request_concludes(struct gsm_subscriber_connection *conn, uint8_t pdisc = gsm48_hdr_pdisc(gh); uint8_t msg_type = gsm48_hdr_msg_type(gh); - DEBUGP(DMM, "%s pdisc=%d msg_type=0x%02x:" + DEBUGP(DMM, "%s: rx msg %s:" " received_cm_service_request changes to false\n", vlr_subscr_name(conn->vsub), - pdisc, msg_type); + gsm48_pdisc_msgtype_name(pdisc, msg_type)); } conn->received_cm_service_request = false; } @@ -3022,14 +3022,16 @@ int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg) OSMO_ASSERT(conn); OSMO_ASSERT(msg); - LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc); + LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message %s (0x%x:0x%x)\n", + gsm48_pdisc_msgtype_name(pdisc, gsm48_hdr_msg_type(gh)), + pdisc, gsm48_hdr_msg_type(gh)); if (!msc_subscr_conn_is_accepted(conn) && !msg_is_initially_permitted(gh)) { LOGP(DRLL, LOGL_ERROR, - "subscr %s: Message not permitted for initial conn:" - " pdisc=0x%02x msg_type=0x%02x\n", - vlr_subscr_name(conn->vsub), gh->proto_discr, gh->msg_type); + "subscr %s: Message not permitted for initial conn: %s\n", + vlr_subscr_name(conn->vsub), + gsm48_pdisc_msgtype_name(pdisc, gsm48_hdr_msg_type(gh))); return -EACCES; } |