This commit is contained in:
Harald Welte 2008-12-27 21:45:37 +00:00
parent 75a983fab0
commit bcae43fe1b
3 changed files with 23 additions and 4 deletions

View File

@ -9,6 +9,7 @@
#define DRR 0x0008
#define DRSL 0x0010
#define DNM 0x0020
#define DSMS 0x0100
#define DMI 0x1000
#define DMIB 0x2000

View File

@ -69,12 +69,19 @@ struct gsm48_hdr {
u_int8_t data[0];
} __attribute__ ((packed));
/* Section 10.2 */
/* Section 10.2 + GSM 04.07 12.2.3.1.1 */
#define GSM48_PDISC_GROUP_CC 0x00
#define GSM48_PDISC_BCAST_CC 0x01
#define GSM48_PDISC_PDSS1 0x02
#define GSM48_PDISC_CC 0x03
#define GSM48_PDISC_PDSS2 0x04
#define GSM48_PDISC_MM 0x05
#define GSM48_PDISC_RR 0x06
#define GSM48_PDISC_MM_GPRS 0x08
#define GSM48_PDISC_SM 0x0a
#define GSM48_PDISC_SMS 0x09
#define GSM48_PDISC_SM_GPRS 0x0a
#define GSM48_PDISC_NC_SS 0x0b
#define GSM48_PDISC_LOC 0x0c
/* Section 10.4 */
#define GSM48_MT_RR_INIT_REQ 0x3c

View File

@ -349,8 +349,10 @@ static int gsm48_tx_mm_serv_ack(struct gsm_lchan *lchan)
static int gsm48_rx_mm_serv_req(struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
u_int8_t serv_type = gh->data[0] & 0x0f;
DEBUGP(DMM, "CM SERVICE REQUEST serv_type=0x%02x\n", serv_type);
DEBUGP(DMM, "CM SERVICE REQUEST\n");
return gsm48_tx_mm_serv_ack(msg->lchan);
}
@ -543,6 +545,12 @@ static int gsm0408_rcv_cc(struct msgb *msg)
return rc;
}
static int gsm0408_rcv_sms(struct msgb *msg)
{
DEBUGP(DSMS, "SMS Message\n");
return 0;
}
/* here we pass in a msgb from the RSL->RLL. We expect the l3 pointer to be set */
int gsm0408_rcvmsg(struct msgb *msg)
{
@ -560,8 +568,11 @@ int gsm0408_rcvmsg(struct msgb *msg)
case GSM48_PDISC_RR:
rc = gsm0408_rcv_rr(msg);
break;
case GSM48_PDISC_SMS:
rc = gsm0408_rcv_sms(msg);
break;
case GSM48_PDISC_MM_GPRS:
case GSM48_PDISC_SM:
case GSM48_PDISC_SM_GPRS:
fprintf(stderr, "Unimplemented GSM 04.08 discriminator 0x%02d\n",
pdisc);
break;