gprs_ns2: inform the NS user (BSSGP) about the MTU of a NSE
The BSSGP layer needs to know the MTU of the NS UNIDATA payload.
The MTU can be 0 if the NSE doesn't contain any NSVC.
Every status indication will contain the mtu value.
The MTU in the status indication contains the maximum transfer
unit of a BSSGP message. From NS side the maximum SDU.
Related: OS#4889
Change-Id: I5016b295db6185ec131d83089cf6c806e34ef1b6
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index d4764f6..7e235be 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -179,6 +179,9 @@
/*! sum of all the signalling weight of _alive_ NS-VCs */
uint32_t sum_sig_weight;
+
+ /*! MTU of a NS PDU. This is the lowest MTU of all NSVCs */
+ uint16_t mtu;
};
/*! Structure representing a single NS-VC */
@@ -244,6 +247,9 @@
/*! transfer capability in mbit */
int transfer_capability;
+ /*! MTU of a NS PDU on this bind. */
+ uint16_t mtu;
+
/*! which link-layer are we based on? */
enum gprs_ns2_ll ll;
@@ -298,6 +304,7 @@
uint16_t bvci,
enum gprs_ns2_affecting_cause cause);
void ns2_nse_notify_alive(struct gprs_ns2_vc *nsvc, bool alive);
+void ns2_nse_update_mtu(struct gprs_ns2_nse *nse);
/* message */
int ns2_validate(struct gprs_ns2_vc *nsvc,