tbf/vty: Move tbf_print_vty_info to pcu_vty_functions.cpp

This function is similar to the show_ms function already present in
the target file. Since the TBF lists will be turned into LListHead
based lists, they will get an iteration function in
pcu_vty_functions.cpp, too.

Sponsored-by: On-Waves ehf
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index ce2a006..74780c2 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -39,6 +39,27 @@
 	return CMD_SUCCESS;
 }
 
+void tbf_print_vty_info(struct vty *vty, struct llist_head *ltbf)
+{
+	gprs_rlcmac_tbf *tbf = llist_pods_entry(ltbf, gprs_rlcmac_tbf);
+	vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(),
+			tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid",
+			tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
+			tbf->imsi(), VTY_NEWLINE);
+	vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d "
+			"MS_CLASS=%d%s",
+			tbf->created_ts(), tbf->state_flags, tbf->first_ts,
+			tbf->first_common_ts, tbf->control_ts, tbf->ms_class(),
+			VTY_NEWLINE);
+	vty_out(vty, " TS_alloc=");
+	for (int i = 0; i < 8; i++) {
+		if (tbf->pdch[i])
+			vty_out(vty, "%d ", i);
+	}
+	vty_out(vty, " CS=%d%s%s", tbf->ms() ? tbf->ms()->current_cs_dl() : 1,
+		VTY_NEWLINE, VTY_NEWLINE);
+}
+
 int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data)
 {
 	BTS *bts = bts_data->bts;