Add LLC and HLC information to MNCC interface definiton

low/high layer compatibility are used for capability checking between
caller and called entitiy.

The information is added to the end of struct gsm_mncc increases, so
that the version number needs not to be incremented.

Related: OS#6152
Change-Id: I15f5afcf069ee6c1c4641108ceacc837bee311b5
This commit is contained in:
Andreas Eversberg 2023-12-19 12:56:20 +01:00 committed by laforge
parent a456583d50
commit 934f43bd1f
2 changed files with 22 additions and 3 deletions

View File

@ -125,9 +125,14 @@ struct gsm_call {
#define MNCC_F_KEYPAD 0x1000
#define MNCC_F_SIGNAL 0x2000
#define MNCC_F_GCR 0x4000
#define MNCC_F_HIGHL_COMPAT 0x8000
#define MNCC_F_LOWL_COMPAT 0x10000
/* UPDATEME when adding new MNCC_F_* entries above */
#define MNCC_F_ALL 0x7fff
#define MNCC_F_ALL 0x1ffff
#define GSM_MAX_LOWL_COMPAT 16 /* (18 with TLV) */
#define GSM_MAX_HIGHL_COMPAT 3 /* (5 with TLV) */
struct gsm_mncc {
/* context based information */
@ -170,6 +175,20 @@ struct gsm_mncc {
/* A buffer to contain SDP ('\0' terminated) */
char sdp[1024];
/* Additional information that extends current socket interface version. */
/* The content requals of Low Layer compatibility IE, described in 3GPP TS 24.008 §10.5.4.18. */
struct gsm_mncc_lowl_compat {
uint8_t len;
uint8_t compat[GSM_MAX_LOWL_COMPAT];
} llc;
/* The content requals of High Layer compatibility IE, described in 3GPP TS 24.008 §10.5.4.16. */
struct gsm_mncc_highl_compat {
uint8_t len;
uint8_t compat[GSM_MAX_HIGHL_COMPAT];
} hlc;
};
struct gsm_data_frame {

View File

@ -1,10 +1,10 @@
test_sdp_termination()
struct gsm_mncc:
empty SDP: len=1876 sdplen=1026 sdp="\0" rc=0
empty SDP: len=1896 sdplen=1046 sdp="\0" rc=0
empty SDP, shortest possible: len=851 sdplen=1 sdp="\0" rc=0
empty SDP, zero len: len=850 sdplen=0 sdp=- rc=-22
terminated SDP str: len=1876 sdplen=1026 sdp="Privacy is a desirable marketing option\0" rc=0
terminated SDP str: len=1896 sdplen=1046 sdp="Privacy is a desirable marketing option\0" rc=0
terminated SDP str, shortest possible: len=890 sdplen=40 sdp="Privacy is a desirable marketing option\0" rc=0
terminated SDP str, but len excludes nul: len=889 sdplen=39 sdp="Privacy is a desirable marketing option" rc=-22
terminated SDP str, but len too short: len=873 sdplen=23 sdp="Privacy is a desirable " rc=-22