ns2: Introduce a per-bind stat_item group with backlog length

The backlog length indicates the instantaneous length of the backlog.

Change-Id: I1c55b4619b1221d7e607ace58649323407faf86b
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index f3c68f5..6462907 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -72,10 +72,14 @@
 	_NSVC_TIMER_NR,
 };
 
-enum ns_stat {
+enum ns2_vc_stat {
 	NS_STAT_ALIVE_DELAY,
 };
 
+enum ns2_bind_stat {
+	NS2_BIND_STAT_BACKLOG_LEN,
+};
+
 /*! Osmocom NS2 VC create status */
 enum ns2_cs {
 	NS2_CS_CREATED,     /*!< A NSVC object has been created */
@@ -129,6 +133,7 @@
 
 	/*! workaround for rate counter until rate counter accepts char str as index */
 	uint32_t nsvc_rate_ctr_idx;
+	uint32_t bind_rate_ctr_idx;
 
 	/*! libmnl netlink socket for link state monitoring */
 	struct osmo_mnl *linkmon_mnl;
@@ -251,6 +256,8 @@
 	/*! allow to show information for the vty */
 	void (*dump_vty)(const struct gprs_ns2_vc_bind *bind,
 			 struct vty *vty, bool stats);
+
+	struct osmo_stat_item_group *statg;
 };
 
 struct gprs_ns2_vc_driver {