Version 0.1.1 from FTP

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@8 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Mark Spencer 2001-05-21 13:39:30 +00:00
parent c752834a02
commit ecb32ede6a
2 changed files with 16 additions and 1 deletions

View File

@ -41,6 +41,13 @@
#define Q921_FRAMETYPE_I 0x0
#define Q921_FRAMETYPE_S 0x1
#define Q921_TEI_GROUP 127
#define Q921_SAPI_CALL_CTRL 0
#define Q921_SAPI_PACKET_MODE 1
#define Q921_SAPI_X25_LAYER3 16
#define Q921_SAPI_LAYER2_MANAGEMENT 63
typedef struct q921_header {
#if __BYTE_ORDER == __BIG_ENDIAN

10
q921.c
View File

@ -347,6 +347,7 @@ void q921_dump(q921_h *h, int len, int showraw, int txrx)
printf("%02x ",h->raw[x]);
printf("]\n");
}
switch(h->h.data[0] & Q921_FRAMETYPE_MASK) {
case 0:
case 2:
@ -483,6 +484,14 @@ pri_event *q921_receive(struct pri *pri, q921_h *h, int len)
if (h->h.ea1 || !(h->h.ea2))
return NULL;
/* Check for broadcasts - not yet handled */
if (h->h.tei == Q921_TEI_GROUP)
return NULL;
/* Check for SAPIs we don't yet handle */
if (h->h.sapi != Q921_SAPI_CALL_CTRL)
return NULL;
switch(h->h.data[0] & Q921_FRAMETYPE_MASK) {
case 0:
case 2:
@ -620,4 +629,3 @@ void q921_start(struct pri *pri)
/* Do the SABME XXX Maybe we should implement T_WAIT? XXX */
q921_send_sabme(pri);
}