Improve TBF logging

use a format in tbf::name() which is sanitized (osmo_sanitize) and hence
can be used both in regular log as well as for its internal FSM ids.
Until now, the FSMs contained a small amount of information with
different formatting than the regular LOGPTFB(), which made it difficult
to grep or follow a TBF through its lifetime looking at logs. The new
unified format makes that a lot easier.

Extra information is now printed if available, such as IMSI.
Furthermore, the TFI is updated to include BTS and TRX, since the TFI is
unique within the scope of a TRX.

Change-Id: I3ce1f53942a2f881d0adadd6e5643f5cdf6e31da
diff --git a/tests/types/TypesTest.err b/tests/types/TypesTest.err
index 749db35..8004cc7 100644
--- a/tests/types/TypesTest.err
+++ b/tests/types/TypesTest.err
@@ -2,32 +2,32 @@
 TBF{NEW}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
-TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NEW) Setting Control TS 2
-TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NEW) Allocated: trx = 0, ul_slots = 04, dl_slots = 04
+TBF(DL:TFI-0-0-0:STATE-NEW:GPRS) Setting Control TS 2
+TBF(DL:TFI-0-0-0:STATE-NEW:GPRS) Allocated: trx = 0, ul_slots = 04, dl_slots = 04
 MS(TLLI=0xffffffff, IMSI=, TA=220, 1/0,) Allocating UL TBF
 TBF{NEW}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
 UL_ACK_TBF{NONE}: Allocated
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW) Setting Control TS 4
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
+TBF(UL:TFI-0-0-0:STATE-NEW:GPRS) Setting Control TS 4
+TBF(UL:TFI-0-0-0:STATE-NEW:GPRS) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
 MS(TLLI=0xffffffff, IMSI=, TA=220, 1/1,) Allocating UL TBF
 TBF{NEW}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
 UL_ACK_TBF{NONE}: Allocated
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) Setting Control TS 1
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) Allocated: trx = 0, ul_slots = 02, dl_slots = 00
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) Setting Control TS 1
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) Allocated: trx = 0, ul_slots = 02, dl_slots = 00
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
 ############## test_egprs_ul_ack_nack
 MS(TLLI=0xffffffff, IMSI=, TA=220, 1/1,) Allocating UL TBF
 TBF{NEW}: Allocated
 UL_ASS_TBF{NONE}: Allocated
 DL_ASS_TBF{NONE}: Allocated
 UL_ACK_TBF{NONE}: Allocated
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) Setting Control TS 4
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
-TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=NEW EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) Setting Control TS 4
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) Allocated: trx = 0, ul_slots = 10, dl_slots = 00
+TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS) setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
 ************** Test with empty window
 ************** Test with 1 lost packet
 ************** Test with compressed window