move large parts of mncc.h and gsm48 encode/decode into libosmocore
This commit is contained in:
parent
fbda4e1fb0
commit
55c8f35e53
|
@ -26,6 +26,7 @@
|
|||
#define _MNCC_H
|
||||
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocore/mncc.h>
|
||||
|
||||
/* One end of a call */
|
||||
struct gsm_call {
|
||||
|
@ -109,69 +110,6 @@ struct gsm_call {
|
|||
#define MNCC_F_KEYPAD 0x1000
|
||||
#define MNCC_F_SIGNAL 0x2000
|
||||
|
||||
/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
|
||||
struct gsm_mncc_bearer_cap {
|
||||
int transfer; /* Information Transfer Capability */
|
||||
int mode; /* Transfer Mode */
|
||||
int coding; /* Coding Standard */
|
||||
int radio; /* Radio Channel Requirement */
|
||||
int speech_ctm; /* CTM text telephony indication */
|
||||
int speech_ver[8]; /* Speech version indication */
|
||||
};
|
||||
|
||||
struct gsm_mncc_number {
|
||||
int type;
|
||||
int plan;
|
||||
int present;
|
||||
int screen;
|
||||
char number[33];
|
||||
};
|
||||
|
||||
struct gsm_mncc_cause {
|
||||
int location;
|
||||
int coding;
|
||||
int rec;
|
||||
int rec_val;
|
||||
int value;
|
||||
int diag_len;
|
||||
char diag[32];
|
||||
};
|
||||
|
||||
struct gsm_mncc_useruser {
|
||||
int proto;
|
||||
char info[GSM_MAX_USERUSER + 1]; /* + termination char */
|
||||
};
|
||||
|
||||
struct gsm_mncc_progress {
|
||||
int coding;
|
||||
int location;
|
||||
int descr;
|
||||
};
|
||||
|
||||
struct gsm_mncc_facility {
|
||||
int len;
|
||||
char info[GSM_MAX_FACILITY];
|
||||
};
|
||||
|
||||
struct gsm_mncc_ssversion {
|
||||
int len;
|
||||
char info[GSM_MAX_SSVERSION];
|
||||
};
|
||||
|
||||
struct gsm_mncc_cccap {
|
||||
int dtmf;
|
||||
int pcp;
|
||||
};
|
||||
|
||||
enum {
|
||||
GSM_MNCC_BCAP_SPEECH = 0,
|
||||
GSM_MNCC_BCAP_UNR_DIG = 1,
|
||||
GSM_MNCC_BCAP_AUDIO = 2,
|
||||
GSM_MNCC_BCAP_FAX_G3 = 3,
|
||||
GSM_MNCC_BCAP_OTHER_ITC = 5,
|
||||
GSM_MNCC_BCAP_RESERVED = 7,
|
||||
};
|
||||
|
||||
struct gsm_mncc {
|
||||
/* context based information */
|
||||
u_int32_t msg_type;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -426,7 +426,7 @@ static int gsm340_gen_oa(u_int8_t *oa, unsigned int oa_len,
|
|||
|
||||
oa[1] = 0xb9; /* networks-specific number, private numbering plan */
|
||||
|
||||
len_in_bytes = encode_bcd_number(oa, oa_len, 1, subscr->extension);
|
||||
len_in_bytes = gsm48_encode_bcd_number(oa, oa_len, 1, subscr->extension);
|
||||
|
||||
/* GSM 03.40 tells us the length is in 'useful semi-octets' */
|
||||
oa[0] = strlen(subscr->extension) & 0xff;
|
||||
|
@ -551,7 +551,7 @@ static int gsm340_rx_tpdu(struct msgb *msg)
|
|||
/* mangle first byte to reflect length in bytes, not digits */
|
||||
address_lv[0] = da_len_bytes - 1;
|
||||
/* convert to real number */
|
||||
decode_bcd_number(gsms->dest_addr, sizeof(gsms->dest_addr), address_lv, 1);
|
||||
gsm48_decode_bcd_number(gsms->dest_addr, sizeof(gsms->dest_addr), address_lv, 1);
|
||||
smsp += da_len_bytes;
|
||||
|
||||
gsms->protocol_id = *smsp++;
|
||||
|
|
Loading…
Reference in New Issue