diff options
author | Harald Welte <laforge@osmocom.org> | 2020-05-02 19:56:36 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-06-08 21:16:54 +0200 |
commit | 00b2faf8217338d4d7d1f4d27331af3151447350 (patch) | |
tree | a38d9b1af7eae5d46658e6b5c49c5910a9e07384 /include/osmocom/gsm/lapdm.h | |
parent | 68944967b09ba28b795b0cc37e96ea525cc85257 (diff) |
lapd/lapdm: print user-defined string name instead of (dl=%p)
At the moment we print the pointer address to identify the log lines
belonging to a specific connection. Since pointer addresses are
difficult to work with, a human readable ID should be printed instead.
e.g. "This is LAPD instance for SAPI3 on bts0/trx1/ts5/lchan3"
Change-Id: Ie6742843fff809edffcac24c4dce4edf66bc71be
Closes: OS#1938
Diffstat (limited to 'include/osmocom/gsm/lapdm.h')
-rw-r--r-- | include/osmocom/gsm/lapdm.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h index 931de80a..633df1ad 100644 --- a/include/osmocom/gsm/lapdm.h +++ b/include/osmocom/gsm/lapdm.h @@ -83,13 +83,19 @@ struct lapdm_datalink *lapdm_datalink_for_sapi(struct lapdm_entity *le, uint8_t /* initialize a LAPDm entity */ void lapdm_entity_init(struct lapdm_entity *le, enum lapdm_mode mode, int t200) - OSMO_DEPRECATED("Use lapdm_entity_init2() instead"); + OSMO_DEPRECATED("Use lapdm_entity_init3() instead"); void lapdm_entity_init2(struct lapdm_entity *le, enum lapdm_mode mode, - const int *t200_ms, int n200); + const int *t200_ms, int n200) + OSMO_DEPRECATED("Use lapdm_entity_init3() instead"); +void lapdm_entity_init3(struct lapdm_entity *le, enum lapdm_mode mode, + const int *t200_ms, int n200, const char *name_pfx); void lapdm_channel_init(struct lapdm_channel *lc, enum lapdm_mode mode) - OSMO_DEPRECATED("Use lapdm_channel_init2() instead"); + OSMO_DEPRECATED("Use lapdm_channel_init3() instead"); int lapdm_channel_init2(struct lapdm_channel *lc, enum lapdm_mode mode, const int *t200_ms_dcch, const int *t200_ms_acch, enum gsm_chan_t chan_t); +int lapdm_channel_init3(struct lapdm_channel *lc, enum lapdm_mode mode, + const int *t200_ms_dcch, const int *t200_ms_acch, enum gsm_chan_t chan_t, + const char *name_pfx); /* deinitialize a LAPDm entity */ void lapdm_entity_exit(struct lapdm_entity *le); void lapdm_channel_exit(struct lapdm_channel *lc); |