VTY: add show bts failure report

Save OML failure reports from each BTS. Add a VTY command to display them
conveniently and optionally clear the list.

OsmoBSC> show bts 0 fail-rep
[2020-03-23 14:51:22] Type=processing failure, Severity=minor failure, Probable cause=Manufacturer specific values: Software warning, Additional text=test message sent from VTY
[2020-03-23 14:51:19] Type=processing failure, Severity=minor failure, Probable cause=Manufacturer specific values: Software warning, Additional text=test message sent from VTY

Related: OS#1605
Change-Id: I18aa17a721cd5eb1c98926dc2367229c0a50bc78
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 5afc2cf..2595174 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1005,6 +1005,12 @@
 	uint8_t overflow;
 };
 
+struct bts_oml_fail_rep {
+	struct llist_head list;
+	time_t time;
+	struct msgb *mb;
+};
+
 /* One BTS */
 struct gsm_bts {
 	/* list header in net->bts_list */
@@ -1267,6 +1273,8 @@
 	struct bts_smscb_chan_state cbch_basic;
 	struct bts_smscb_chan_state cbch_extended;
 	struct osmo_timer_list etws_timer;	/* when to stop ETWS PN */
+
+	struct llist_head oml_fail_rep;
 };
 
 /* One rejected BTS */