summaryrefslogtreecommitdiffstats
path: root/sys/i4b/include
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>1999-05-20 10:14:57 +0000
committerhm <hm@FreeBSD.org>1999-05-20 10:14:57 +0000
commit2077acfca034178f39e3fa4e86cb8d371f44737c (patch)
tree730187a2063473cb0d2e7cac998a9a4307285426 /sys/i4b/include
parent5ea75aea8a2633cc0acf9dd870c1e1db1abd6a21 (diff)
downloadFreeBSD-src-2077acfca034178f39e3fa4e86cb8d371f44737c.zip
FreeBSD-src-2077acfca034178f39e3fa4e86cb8d371f44737c.tar.gz
upgrade isdn4bsd from version 0.71 to the just released version 0.81
Diffstat (limited to 'sys/i4b/include')
-rw-r--r--sys/i4b/include/i4b_debug.h15
-rw-r--r--sys/i4b/include/i4b_global.h44
-rw-r--r--sys/i4b/include/i4b_ioctl.h40
-rw-r--r--sys/i4b/include/i4b_l3l4.h6
-rw-r--r--sys/i4b/include/i4b_tel_ioctl.h32
5 files changed, 105 insertions, 32 deletions
diff --git a/sys/i4b/include/i4b_debug.h b/sys/i4b/include/i4b_debug.h
index ad6cccf..628a65e 100644
--- a/sys/i4b/include/i4b_debug.h
+++ b/sys/i4b/include/i4b_debug.h
@@ -27,9 +27,9 @@
* i4b_debug.h - i4b debug header file
* -----------------------------------
*
- * $Id: i4b_debug.h,v 1.15 1999/02/14 09:45:02 hm Exp $
+ * $Id: i4b_debug.h,v 1.18 1999/04/28 14:50:55 hm Exp $
*
- * last edit-date: [Sun Feb 14 10:37:58 1999]
+ * last edit-date: [Wed Apr 28 16:50:36 1999]
*
*---------------------------------------------------------------------------*/
@@ -169,9 +169,14 @@ extern unsigned int i4b_l4_debug;
#define L4_DIALST 0x0008 /* network driver dial states */
#define L4_IPRDBG 0x0010 /* ipr driver debug messages */
#define L4_RBCHDBG 0x0020 /* rbch driver debug messages */
-
-#define L4_DEBUG_MAX 0x003f /* all messages on */
-#define L4_DEBUG_ERR (L4_ERR)
+#define L4_ISPDBG 0x0040 /* isp driver debug messages */
+#define L4_TELDBG 0x0080 /* tel driver debug messages */
+#define L4_TINADBG 0x0100 /* tina driver debug messages */
+#define L4_TINAMSG 0x0200 /* tina driver messages */
+#define L4_TINAERR 0x0400 /* tina driver error messages */
+
+#define L4_DEBUG_MAX 0x07ff /* all messages on */
+#define L4_DEBUG_ERR (L4_ERR | L4_TINADBG | L4_TINAMSG | L4_TINAERR)
#ifndef L4_DEBUG_DEFAULT
#ifdef DO_I4B_MAXDEBUG
diff --git a/sys/i4b/include/i4b_global.h b/sys/i4b/include/i4b_global.h
index e386b38..b13ac0e 100644
--- a/sys/i4b/include/i4b_global.h
+++ b/sys/i4b/include/i4b_global.h
@@ -27,19 +27,22 @@
* i4b_global.h - i4b global include file
* --------------------------------------
*
- * $Id: i4b_global.h,v 1.19 1999/02/27 11:08:01 hm Exp $
+ * $Id: i4b_global.h,v 1.21 1999/04/26 10:16:54 hm Exp $
*
- * last edit-date: [Sun Feb 14 10:03:55 1999]
+ * last edit-date: [Mon Apr 26 11:10:26 1999]
*
*---------------------------------------------------------------------------*/
#ifndef _I4B_GLOBAL_H_
#define _I4B_GLOBAL_H_
-#define SPLI4B() splimp() /* spl for i4b */
+/*---------------------------------------------------------------------------*
+ * hiding OS differences in the kernel
+ *---------------------------------------------------------------------------*/
-#define TIMER_IDLE 1 /* a timer is running */
-#define TIMER_ACTIVE 2 /* a timer is idle */
+/*---------------*/
+/* time handling */
+/*---------------*/
#ifdef __FreeBSD__
#include <sys/param.h>
@@ -66,6 +69,37 @@
#endif /* __NetBSD__ */
+/*----------------------*/
+/* poll/select handling */
+/*----------------------*/
+
+#if (defined(__FreeBSD__) && \
+ (!defined(__FreeBSD_version) || (__FreeBSD_version < 300001))) \
+ || defined (__OpenBSD__) || defined(__bsdi__)
+#define OS_USES_SELECT
+#else
+#define OS_USES_POLL
+#endif
+
+/*---------------------------------------------------------------------------*
+ * misc globally used things in the kernel
+ *---------------------------------------------------------------------------*/
+
+/* timer states */
+
+#define TIMER_IDLE 1 /* a timer is running */
+#define TIMER_ACTIVE 2 /* a timer is idle */
+
+/* i4b's spl */
+
+#define SPLI4B() splimp() /* spl for i4b */
+
+/* critial code region handling macros */
+
+#define CRIT_VAR int _svd_spl_ /* declare variable */
+#define CRIT_BEG _svd_spl_ = SPLI4B() /* save spl */
+#define CRIT_END splx(_svd_spl_) /* restore spl */
+
/* definitions for the STATUS indications L1 -> L2 -> L3 */
#define STI_ATTACH 0 /* attach at boot time */
diff --git a/sys/i4b/include/i4b_ioctl.h b/sys/i4b/include/i4b_ioctl.h
index 21560a8..b7289a8 100644
--- a/sys/i4b/include/i4b_ioctl.h
+++ b/sys/i4b/include/i4b_ioctl.h
@@ -27,9 +27,9 @@
* i4b_ioctl.h - messages kernel <--> userland
* -------------------------------------------
*
- * $Id: i4b_ioctl.h,v 1.69 1999/03/01 09:04:15 hm Exp $
+ * $Id: i4b_ioctl.h,v 1.106 1999/05/19 08:51:14 hm Exp $
*
- * last edit-date: [Mon Mar 1 10:01:15 1999]
+ * last edit-date: [Wed May 19 10:56:56 1999]
*
*---------------------------------------------------------------------------*/
@@ -46,7 +46,7 @@
* version and release number for isdn4bsd package
*---------------------------------------------------------------------------*/
#define VERSION 0 /* version number */
-#define REL 71 /* release number */
+#define REL 81 /* release number */
#define STEP 0 /* release step */
/*---------------------------------------------------------------------------*
@@ -74,7 +74,9 @@
#define CTRL_UNKNOWN 0 /* unknown controller type */
#define CTRL_PASSIVE 1 /* passive ISDN controller cards*/
#define CTRL_DAIC 2 /* Diehl active controller cards*/
-#define CTRL_NUMTYPES 3 /* number of controller types */
+#define CTRL_TINADD 3 /* Stollmann Tina-dd active card*/
+#define CTRL_AVMB1 4 /* AVM B1 active card */
+#define CTRL_NUMTYPES 5 /* number of controller types */
/*---------------------------------------------------------------------------*
* card types for CTRL_PASSIVE
@@ -100,6 +102,7 @@
#define CARD_TYPEP_ELSAMLMCALL 17 /* ELSA MicroLink MCall */
#define CARD_TYPEP_ITKIX1 18 /* ITK ix1 micro */
#define CARD_TYPEP_AVMA1PCI 19 /* AVM FRITZ!CARD PCI */
+#define CARD_TYPEP_PCC16 20 /* ELSA PCC-16 */
/*
* in case you add support for more cards, please update:
@@ -110,7 +113,7 @@
* and adjust CARD_TYPEP_MAX below.
*/
-#define CARD_TYPEP_MAX 19 /* max type */
+#define CARD_TYPEP_MAX 20 /* max type */
/*---------------------------------------------------------------------------*
* card types for CTRL_DAIC
@@ -170,19 +173,17 @@ typedef unsigned int cause_t; /* 32 bit unsigned int */
/*---------------------------------------------------------------------------*
* The shorthold algorithm to use
*---------------------------------------------------------------------------*/
-typedef enum msg_shorthold_algorithm {
- msg_alg__fix_unit_size, /* timeout algorithm for fix unit charging */
- msg_alg__var_unit_size /* timeout algorithm for variable unit charging */
-} msg_shorthold_algorithm_t;
+#define SHA_FIXU 0 /* timeout algorithm for fix unit charging */
+#define SHA_VARU 1 /* timeout algorithm for variable unit charging */
/*---------------------------------------------------------------------------*
* The shorthold data struct
*---------------------------------------------------------------------------*/
typedef struct {
- msg_shorthold_algorithm_t shorthold_algorithm; /* shorthold algorithm to use */
- int unitlen_time; /* length of a charging unit */
- int idle_time; /* time without activity on b ch */
- int earlyhup_time; /* safety area at end of unit */
+ int shorthold_algorithm; /* shorthold algorithm to use */
+ int unitlen_time; /* length of a charging unit */
+ int idle_time; /* time without activity on b ch*/
+ int earlyhup_time; /* safety area at end of unit */
} msg_shorthold_t;
@@ -274,6 +275,7 @@ typedef struct {
#define MSG_PDEACT_IND 'm'
#define MSG_NEGCOMP_IND 'n'
#define MSG_IFSTATE_CHANGED_IND 'o'
+#define MSG_DIALOUTNUMBER_IND 'p'
int cdid; /* call descriptor id */
} msg_hdr_t;
@@ -349,6 +351,17 @@ typedef struct {
} msg_dialout_ind_t;
/*---------------------------------------------------------------------------*
+ * dial a number
+ *---------------------------------------------------------------------------*/
+typedef struct {
+ msg_hdr_t header; /* common header */
+ int driver; /* driver type */
+ int driver_unit; /* driver unit number */
+ int cmdlen; /* length of string */
+ char cmd[TELNO_MAX]; /* the number to dial */
+} msg_dialoutnumber_ind_t;
+
+/*---------------------------------------------------------------------------*
* idle timeout disconnect sent indication
* kernel has sent disconnect request because of b-ch idle
*---------------------------------------------------------------------------*/
@@ -541,6 +554,7 @@ typedef struct {
#define DSTAT_TFAIL 1 /* transient failure */
#define DSTAT_PFAIL 2 /* permanent failure */
#define DSTAT_INONLY 3 /* no outgoing dials allowed */
+ cause_t cause; /* exact i4b cause */
} msg_dialout_resp_t;
#define I4B_DIALOUT_RESP _IOW('4', 5, msg_dialout_resp_t)
diff --git a/sys/i4b/include/i4b_l3l4.h b/sys/i4b/include/i4b_l3l4.h
index 0f7ac7d..3655bb1 100644
--- a/sys/i4b/include/i4b_l3l4.h
+++ b/sys/i4b/include/i4b_l3l4.h
@@ -27,9 +27,9 @@
* i4b_l3l4.h - layer 3 / layer 4 interface
* ------------------------------------------
*
- * $Id: i4b_l3l4.h,v 1.23 1999/02/15 09:55:47 hm Exp $
+ * $Id: i4b_l3l4.h,v 1.24 1999/03/18 14:33:40 hm Exp $
*
- * last edit-date: [Sun Feb 14 10:04:19 1999]
+ * last edit-date: [Wed Mar 17 16:16:40 1999]
*
*---------------------------------------------------------------------------*/
@@ -81,7 +81,7 @@ typedef struct i4l_driver_bchan_linktab {
#define ACT_TX 1
void (*line_connected)(int unit, void *cde);
void (*line_disconnected)(int unit, void *cde);
- void (*dial_response)(int unit, int stat);
+ void (*dial_response)(int unit, int stat, cause_t cause);
void (*updown_ind)(int unit, int updown);
} drvr_link_t;
diff --git a/sys/i4b/include/i4b_tel_ioctl.h b/sys/i4b/include/i4b_tel_ioctl.h
index 52f08cc..3df673b 100644
--- a/sys/i4b/include/i4b_tel_ioctl.h
+++ b/sys/i4b/include/i4b_tel_ioctl.h
@@ -27,20 +27,24 @@
* i4b_tel_ioctl.h telephony interface ioctls
* ------------------------------------------
*
- * $Id: i4b_tel_ioctl.h,v 1.7 1999/02/16 10:40:18 hm Exp $
+ * $Id: i4b_tel_ioctl.h,v 1.9 1999/04/21 10:06:32 hm Exp $
*
- * last edit-date: [Sun Feb 14 10:39:19 1999]
+ * last edit-date: [Wed Apr 21 11:00:02 1999]
*
*---------------------------------------------------------------------------*/
#ifndef _I4B_TEL_IOCTL_H_
#define _I4B_TEL_IOCTL_H_
-/* supported audio format conversions for /dev/i4btelXX devices */
+/*===========================================================================*
+ * /dev/i4btel<n> devices (audio data)
+ *===========================================================================*/
+
+/* supported audio format conversions */
-#define CVT_NONE 0 /* no format conversion */
-#define CVT_ALAW2ULAW 1 /* kernel A-law, userland mu-law */
-#define CVT_ALAW_CANON 2 /* kernel A-law, userland canonical A-law */
+#define CVT_NONE 0 /* no A-law/u-law conversion */
+#define CVT_ALAW2ULAW 1 /* ISDN line: A-law, user: u-law */
+#define CVT_ULAW2ALAW 2 /* ISDN line: u-law, user: A-law */
/*---------------------------------------------------------------------------*
* get / set audio format
@@ -50,4 +54,20 @@
#define I4B_TEL_SETAUDIOFMT _IOW('A', 1, int)
#define I4B_TEL_EMPTYINPUTQUEUE _IOW('A', 2, int)
+/*===========================================================================*
+ * /dev/i4bteld<n> devices (dialer interface)
+ *===========================================================================*/
+
+/* dialer commands */
+
+#define CMD_DIAL 'D' /* dial the following number string */
+#define CMD_HUP 'H' /* hangup */
+
+/* dialer responses */
+
+#define RSP_CONN '0' /* connect */
+#define RSP_BUSY '1' /* busy */
+#define RSP_HUP '2' /* hangup */
+#define RSP_NOA '3' /* no answer */
+
#endif /* _I4B_TEL_IOCTL_H_ */
OpenPOWER on IntegriCloud