diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-01-20 17:42:48 +0100 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2021-02-16 16:29:47 +0100 |
commit | 4f1128fcbd462fc5b7fe900d2daa09576e308736 (patch) | |
tree | 60ee7914864059af0ccb375a43268a02a8ede5be /include/osmocom/gprs | |
parent | 524898504af2251b740be9621d184db1b9b875ee (diff) |
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
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r-- | include/osmocom/gprs/frame_relay.h | 5 | ||||
-rw-r--r-- | include/osmocom/gprs/gprs_ns2.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/osmocom/gprs/frame_relay.h b/include/osmocom/gprs/frame_relay.h index 1be37eec..e3167070 100644 --- a/include/osmocom/gprs/frame_relay.h +++ b/include/osmocom/gprs/frame_relay.h @@ -39,6 +39,11 @@ enum osmo_fr_role { FR_ROLE_NETWORK_EQUIPMENT, }; +/* 48.016 ยง 6.1.4.2 default maximum information field size of 1600 octets */ +#define FRAME_RELAY_MTU 1600 +/* FR DLC header is 2 byte */ +#define FRAME_RELAY_SDU (FRAME_RELAY_MTU - 2) + extern const struct value_string osmo_fr_role_names[]; static inline const char *osmo_fr_role_str(enum osmo_fr_role role) { diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h index 07e6c451..b406bb0d 100644 --- a/include/osmocom/gprs/gprs_ns2.h +++ b/include/osmocom/gprs/gprs_ns2.h @@ -84,6 +84,7 @@ enum gprs_ns2_affecting_cause { GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED, GPRS_NS2_AFF_CAUSE_SNS_FAILURE, GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS, + GPRS_NS2_AFF_CAUSE_MTU_CHANGE, }; extern const struct value_string gprs_ns2_aff_cause_prim_strs[]; @@ -135,6 +136,8 @@ struct osmo_gprs_ns2_prim { /* Only true on the first time it's available. * Allow the BSSGP layer to reset persistent NSE */ bool first; + /* MTU of a NS SDU. It's the lowest MTU of all (alive & dead) NSVCs */ + uint16_t mtu; } status; } u; }; |