summaryrefslogtreecommitdiffstats
path: root/sys/i4b
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2002-08-11 15:47:26 +0000
committerhm <hm@FreeBSD.org>2002-08-11 15:47:26 +0000
commit7465309faa645f39be1f0ba0b1cfc7a3706e83c2 (patch)
tree8740de0e76b14c33f03ed4860beaa620299d2a86 /sys/i4b
parent68c9d8c3c773545247ceef59d91290690f32f391 (diff)
downloadFreeBSD-src-7465309faa645f39be1f0ba0b1cfc7a3706e83c2.zip
FreeBSD-src-7465309faa645f39be1f0ba0b1cfc7a3706e83c2.tar.gz
add experimental support for Data over Voice (DoV) outgoing calls.
based on patches received from Guy Ellis (guy@traverse.com.au), Chris Collins (xfire@xware.cx) and Phillip Musumeci (phillip@cs.jcu.edu.au).
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/include/i4b_ioctl.h13
-rw-r--r--sys/i4b/include/i4b_l3l4.h4
-rw-r--r--sys/i4b/layer3/i4b_l2if.c18
-rw-r--r--sys/i4b/layer4/i4b_i4bdrv.c3
-rw-r--r--sys/i4b/layer4/i4b_l4.c3
-rw-r--r--sys/i4b/layer4/i4b_l4mgmt.c3
6 files changed, 34 insertions, 10 deletions
diff --git a/sys/i4b/include/i4b_ioctl.h b/sys/i4b/include/i4b_ioctl.h
index 9f06b10..5f99628 100644
--- a/sys/i4b/include/i4b_ioctl.h
+++ b/sys/i4b/include/i4b_ioctl.h
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:44:15 2002]
+ * last edit-date: [Sun Aug 11 12:39:58 2002]
*
*---------------------------------------------------------------------------*/
@@ -40,7 +40,7 @@
* version and release number for isdn4bsd package
*---------------------------------------------------------------------------*/
#define VERSION 1 /* version number */
-#define REL 2 /* release number */
+#define REL 3 /* release number */
#define STEP 0 /* release step */
/*---------------------------------------------------------------------------*
@@ -199,6 +199,12 @@
#define BPROT_RHDLC 1 /* raw HDLC: flag, data, crc, flag */
/*---------------------------------------------------------------------------*
+ * special bearer capability settings (i.e. Data over Voice)
+ *---------------------------------------------------------------------------*/
+#define BCAP_NONE 0 /* no special bearer capability */
+#define BCAP_DOV 1 /* Data over Voice */
+
+/*---------------------------------------------------------------------------*
* causes data type
*---------------------------------------------------------------------------*/
typedef unsigned int cause_t; /* 32 bit unsigned int */
@@ -333,6 +339,7 @@ typedef struct {
#define CHAN_ANY (-1) /* outgoing, not possible for incoming */
#define CHAN_NO (-2) /* call waiting (CW) for incoming */
int bprot; /* b channel protocot, see BPROT_XXX */
+ int bcap; /* special bearer capability, see BCAP_XXX */
char dst_telno[TELNO_MAX]; /* destination telno */
char dst_subaddr[SUBADDR_MAX]; /* dest subaddr */
char src_telno[TELNO_MAX]; /* source telno */
@@ -562,6 +569,7 @@ typedef struct {
int channel; /* channel to use */
int txdelay; /* tx delay after connect */
int bprot; /* b channel protocol */
+ int bcap; /* special bearer capability */
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
msg_shorthold_t shorthold_data; /* the shorthold data */
@@ -591,6 +599,7 @@ typedef struct {
/* the following are only used for SETUP_RESP_ACCEPT !! */
int txdelay; /* tx delay after connect */
int bprot; /* B chan protocol */
+ int bcap; /* special bearer capability */
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
int max_idle_time; /* max time without activity on b ch */
diff --git a/sys/i4b/include/i4b_l3l4.h b/sys/i4b/include/i4b_l3l4.h
index 290a724..89303d7 100644
--- a/sys/i4b/include/i4b_l3l4.h
+++ b/sys/i4b/include/i4b_l3l4.h
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sat Mar 9 15:57:44 2002]
+ * last edit-date: [Sun Aug 11 12:52:41 2002]
*
*---------------------------------------------------------------------------*/
@@ -138,6 +138,8 @@ typedef struct
int bprot; /* B channel protocol BPROT_XXX */
+ int bcap; /* special bearer capabilities BCAP_XXX */
+
int driver; /* driver to use for B channel */
int driver_unit; /* unit for above driver number */
diff --git a/sys/i4b/layer3/i4b_l2if.c b/sys/i4b/layer3/i4b_l2if.c
index fda3bc7..0a8584b 100644
--- a/sys/i4b/layer3/i4b_l2if.c
+++ b/sys/i4b/layer3/i4b_l2if.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 15:03:59 2002]
+ * last edit-date: [Sun Aug 11 12:48:41 2002]
*
*---------------------------------------------------------------------------*/
@@ -480,9 +480,19 @@ i4b_l3_tx_setup(call_desc_t *cd)
break;
case BPROT_RHDLC: /* raw HDLC */
- *ptr++ = IEI_BEARERCAP_LEN;
- *ptr++ = IT_CAP_UNR_DIG_INFO;
- *ptr++ = IT_RATE_64K;
+ if (cd->bcap == BCAP_DOV) /* Data over Voice */
+ {
+ *ptr++ = IEI_BEARERCAP_LEN+1;
+ *ptr++ = IT_CAP_SPEECH;
+ *ptr++ = IT_RATE_64K;
+ *ptr++ = IT_UL1_G711A;
+ }
+ else
+ {
+ *ptr++ = IEI_BEARERCAP_LEN;
+ *ptr++ = IT_CAP_UNR_DIG_INFO;
+ *ptr++ = IT_RATE_64K;
+ }
break;
default:
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c
index 1617077..f9c7726 100644
--- a/sys/i4b/layer4/i4b_i4bdrv.c
+++ b/sys/i4b/layer4/i4b_i4bdrv.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Mar 17 09:54:22 2002]
+ * last edit-date: [Sun Aug 11 12:42:46 2002]
*
*---------------------------------------------------------------------------*/
@@ -264,6 +264,7 @@ i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
cd->controller = mcr->controller; /* fill cd */
cd->bprot = mcr->bprot;
+ cd->bcap = mcr->bcap;
cd->driver = mcr->driver;
cd->driver_unit = mcr->driver_unit;
cd->cr = get_rand_cr(ctrl_desc[cd->controller].unit);
diff --git a/sys/i4b/layer4/i4b_l4.c b/sys/i4b/layer4/i4b_l4.c
index 1f5163b..1a7f7e8 100644
--- a/sys/i4b/layer4/i4b_l4.c
+++ b/sys/i4b/layer4/i4b_l4.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sat Mar 9 19:46:26 2002]
+ * last edit-date: [Sun Aug 11 12:43:14 2002]
*
*---------------------------------------------------------------------------*/
@@ -367,6 +367,7 @@ i4b_l4_connect_ind(call_desc_t *cd)
mp->controller = cd->controller;
mp->channel = cd->channelid;
mp->bprot = cd->bprot;
+ mp->bcap = cd->bcap;
cd->dir = DIR_INCOMING;
diff --git a/sys/i4b/layer4/i4b_l4mgmt.c b/sys/i4b/layer4/i4b_l4mgmt.c
index 17bf29a..1368fb9 100644
--- a/sys/i4b/layer4/i4b_l4mgmt.c
+++ b/sys/i4b/layer4/i4b_l4mgmt.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sat Mar 9 19:48:32 2002]
+ * last edit-date: [Sun Aug 11 12:42:01 2002]
*
*---------------------------------------------------------------------------*/
@@ -368,6 +368,7 @@ i4b_print_cdp(call_desc_t *cdp)
printf(" crflag = %d\n", cdp->crflag);
printf(" channelid = %d\n", cdp->channelid);
printf(" bprot = %d\n", cdp->bprot);
+ printf(" bcap = %d\n", cdp->bcap);
printf(" driver = %d\n", cdp->driver);
printf(" driver_unit = %d\n", cdp->driver_unit);
printf(" call_state = %d\n", cdp->call_state);
OpenPOWER on IntegriCloud