patch-2.0.31 linux/include/linux/isdn.h
Next file: linux/include/linux/isdn_ppp.h
Previous file: linux/include/linux/ipx.h
Back to the patch index
Back to the overall index
- Lines: 291
- Date:
Wed Oct 15 15:25:22 1997
- Orig file:
v2.0.30/linux/include/linux/isdn.h
- Orig date:
Sun Dec 1 10:02:03 1996
diff -u --recursive --new-file v2.0.30/linux/include/linux/isdn.h linux/include/linux/isdn.h
@@ -1,4 +1,4 @@
-/* $Id: isdn.h,v 1.18 1996/11/06 17:37:50 keil Exp $
+/* $Id: isdn.h,v 1.32 1997/08/21 09:49:46 fritz Exp $
*
* Main header for the Linux ISDN subsystem (linklevel).
*
@@ -21,6 +21,55 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn.h,v $
+ * Revision 1.32 1997/08/21 09:49:46 fritz
+ * Increased NET_DV
+ *
+ * Revision 1.31 1997/06/22 11:57:07 fritz
+ * Added ability to adjust slave triggerlevel.
+ *
+ * Revision 1.30 1997/06/17 13:07:23 hipp
+ * compression changes , MP changes
+ *
+ * Revision 1.29 1997/05/27 15:18:02 fritz
+ * Added changes for recent 2.1.x kernels:
+ * changed return type of isdn_close
+ * queue_task_* -> queue_task
+ * clear/set_bit -> test_and_... where apropriate.
+ * changed type of hard_header_cache parameter.
+ *
+ * Revision 1.28 1997/03/07 01:33:01 fritz
+ * Added proper ifdef's for CONFIG_ISDN_AUDIO
+ *
+ * Revision 1.27 1997/03/05 21:11:49 fritz
+ * Minor fixes.
+ *
+ * Revision 1.26 1997/02/28 02:37:53 fritz
+ * Added some comments.
+ *
+ * Revision 1.25 1997/02/23 16:54:23 hipp
+ * some initial changes for future PPP compresion
+ *
+ * Revision 1.24 1997/02/18 09:42:45 fritz
+ * Bugfix: Increased ISDN_MODEM_ANZREG.
+ * Increased TTY_DV.
+ *
+ * Revision 1.23 1997/02/10 22:07:13 fritz
+ * Added 2 modem registers for numbering plan and screening info.
+ *
+ * Revision 1.22 1997/02/03 23:42:08 fritz
+ * Added ISDN_TIMER_RINGING
+ * Misc. changes for Kernel 2.1.X compatibility
+ *
+ * Revision 1.21 1997/01/17 01:19:10 fritz
+ * Applied chargeint patch.
+ *
+ * Revision 1.20 1997/01/17 00:41:19 fritz
+ * Increased TTY_DV.
+ *
+ * Revision 1.19 1997/01/14 01:41:07 fritz
+ * Added ATI2 related variables.
+ * Added variables for audio support in skbuffs.
+ *
* Revision 1.18 1996/11/06 17:37:50 keil
* more changes for 2.1.X
*
@@ -159,7 +208,7 @@
#define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
#define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing */
-#define ISDN_MODEM_ANZREG 21 /* Number of Modem-Registers */
+#define ISDN_MODEM_ANZREG 23 /* Number of Modem-Registers */
#define ISDN_MSNLEN 20
typedef struct {
@@ -175,12 +224,12 @@
typedef struct {
char name[10];
- char phone[20];
+ char phone[ISDN_MSNLEN];
int outgoing;
} isdn_net_ioctl_phone;
-#define NET_DV 0x01 /* Data version for net_cfg */
-#define TTY_DV 0x01 /* Data version for iprofd etc. */
+#define NET_DV 0x04 /* Data version for net_cfg */
+#define TTY_DV 0x04 /* Data version for iprofd etc. */
typedef struct {
char name[10]; /* Name of interface */
@@ -203,6 +252,8 @@
int callback; /* Flag: Callback */
int cbhup; /* Flag: Reject Call before Callback */
int pppbind; /* ippp device for bindings */
+ int chargeint; /* Use fixed charge interval length */
+ int triggercps; /* BogoCPS needed for triggering slave */
} isdn_net_ioctl_cfg;
#ifdef __KERNEL__
@@ -279,6 +330,7 @@
#define ISDN_TIMER_RES 3 /* Main Timer-Resolution */
#define ISDN_TIMER_02SEC (HZ/(ISDN_TIMER_RES+1)/5) /* Slow-Timer1 .2 sec */
#define ISDN_TIMER_1SEC (HZ/(ISDN_TIMER_RES+1)) /* Slow-Timer2 1 sec */
+#define ISDN_TIMER_RINGING 5 /* tty RINGs = ISDN_TIMER_1SEC * this factor */
#define ISDN_TIMER_MODEMREAD 1
#define ISDN_TIMER_MODEMPLUS 2
#define ISDN_TIMER_MODEMRING 4
@@ -317,7 +369,7 @@
/* Phone-list-element */
typedef struct {
void *next;
- char num[20];
+ char num[ISDN_MSNLEN];
} isdn_net_phone;
/* Local interface-data */
@@ -361,6 +413,7 @@
/* bit0: chargeint is invalid */
/* bit1: Getting charge-interval */
/* bit2: Do charge-unit-hangup */
+ /* bit3: Do hangup even on incoming */
int outgoing; /* Flag: outgoing call */
int onhtime; /* Time to keep link up */
int chargeint; /* Interval between charge-infos */
@@ -370,6 +423,7 @@
int sqfull; /* Flag: netdev-queue overloaded */
ulong sqfull_stamp; /* Start-Time of overload */
ulong slavedelay; /* Dynamic bundling delaytime */
+ int triggercps; /* BogoCPS needed for trigger slave */
struct device *srobin; /* Ptr to Master device for slaves */
isdn_net_phone *phone[2]; /* List of remote-phonenumbers */
/* phone[0] = Incoming Numbers */
@@ -382,11 +436,28 @@
struct isdn_net_dev_s *netdev; /* Ptr to netdev */
struct sk_buff *first_skb; /* Ptr to skb that triggers dialing */
struct sk_buff *sav_skb; /* Ptr to skb, rejected by LL-driver*/
+#if (LINUX_VERSION_CODE < 0x02010F)
/* Ptr to orig. header_cache_bind */
- void (*org_hcb)(struct hh_cache **, struct device *,
- unsigned short, __u32);
+ void (*org_hcb)(struct hh_cache **,
+ struct device *,
+ unsigned short,
+ __u32);
+#else
+#if (LINUX_VERSION_CODE < 0x2011E)
+ /* Ptr to orig. hard_header_cache */
+ int (*org_hhc)(struct dst_entry *dst,
+ struct dst_entry *neigh,
+ struct hh_cache *hh);
+#else
+ /* Ptr to orig. hard_header_cache */
+ int (*org_hhc)(struct dst_entry *dst,
+ struct neighbour *neigh,
+ struct hh_cache *hh);
+#endif
+#endif
/* Ptr to orig. header_cache_update */
- void (*org_hcu)(struct hh_cache *, struct device *,
+ void (*org_hcu)(struct hh_cache *,
+ struct device *,
unsigned char *);
int pppbind; /* ippp device for bindings */
} isdn_net_local;
@@ -435,17 +506,35 @@
#define ISDN_SERIAL_TYPE_NORMAL 1
#define ISDN_SERIAL_TYPE_CALLOUT 2
+#ifdef CONFIG_ISDN_AUDIO
+/* For using sk_buffs with audio we need some private variables
+ * within each sk_buff. For this purpose, we declare a struct here,
+ * and put it always at skb->head. A few macros help accessing the
+ * variables. Of course, we need to check skb_headroom prior to
+ * any access.
+ */
+typedef struct isdn_audio_skb {
+ unsigned short dle_count;
+ unsigned char lock;
+} isdn_audio_skb;
+
+#define ISDN_AUDIO_SKB_DLECOUNT(skb) (((isdn_audio_skb*)skb->head)->dle_count)
+#define ISDN_AUDIO_SKB_LOCK(skb) (((isdn_audio_skb*)skb->head)->lock)
+#endif
+
/* Private data of AT-command-interpreter */
typedef struct atemu {
u_char profile[ISDN_MODEM_ANZREG]; /* Modem-Regs. Profile 0 */
u_char mdmreg[ISDN_MODEM_ANZREG]; /* Modem-Registers */
char pmsn[ISDN_MSNLEN]; /* EAZ/MSNs Profile 0 */
char msn[ISDN_MSNLEN];/* EAZ/MSN */
+#ifdef CONFIG_ISDN_AUDIO
u_char vpar[10]; /* Voice-parameters */
+ int lastDLE; /* Flag for voice-coding: DLE seen */
+#endif
int mdmcmdl; /* Length of Modem-Commandbuffer */
int pluscount; /* Counter for +++ sequence */
int lastplus; /* Timestamp of last + */
- int lastDLE; /* Flag for voice-coding: DLE seen */
char mdmcmd[255]; /* Modem-Commandbuffer */
} atemu;
@@ -462,26 +551,39 @@
int blocked_open; /* # of blocked opens */
long session; /* Session of opening process */
long pgrp; /* pgrp of opening process */
- int online; /* B-Channel is up */
- int vonline; /* Voice-channel status */
+ int online; /* 1 = B-Channel is up, drop data */
+ /* 2 = B-Channel is up, deliver d.*/
int dialing; /* Dial in progress */
int rcvsched; /* Receive needs schedule */
int isdn_driver; /* Index to isdn-driver */
int isdn_channel; /* Index to isdn-channel */
int drv_index; /* Index to dev->usage */
int ncarrier; /* Flag: schedule NO CARRIER */
+ unsigned char last_cause[8]; /* Last cause message */
+ unsigned char last_num[ISDN_MSNLEN];
+ /* Last phone-number */
+ unsigned char last_l2; /* Last layer-2 protocol */
+ unsigned char last_si; /* Last service */
+ unsigned char last_lhup; /* Last hangup local? */
+ unsigned char last_dir; /* Last direction (in or out) */
struct timer_list nc_timer; /* Timer for delayed NO CARRIER */
int send_outstanding;/* # of outstanding send-requests */
int xmit_size; /* max. # of chars in xmit_buf */
int xmit_count; /* # of chars in xmit_buf */
unsigned char *xmit_buf; /* transmit buffer */
struct sk_buff_head xmit_queue; /* transmit queue */
+#ifdef CONFIG_ISDN_AUDIO
+ int vonline; /* Voice-channel status */
+ /* Bit 0 = recording */
+ /* Bit 1 = playback */
+ /* Bit 2 = playback, DLE-ETX seen */
struct sk_buff_head dtmf_queue; /* queue for dtmf results */
- struct tty_struct *tty; /* Pointer to corresponding tty */
- atemu emu; /* AT-emulator data */
void *adpcms; /* state for adpcm decompression */
void *adpcmr; /* state for adpcm compression */
void *dtmf_state; /* state for dtmf decoder */
+#endif
+ struct tty_struct *tty; /* Pointer to corresponding tty */
+ atemu emu; /* AT-emulator data */
struct termios normal_termios; /* For saving termios structs */
struct termios callout_termios;
struct wait_queue *open_wait;
@@ -513,8 +615,8 @@
struct sqqueue {
struct sqqueue *next;
- int sqno_start;
- int sqno_end;
+ long sqno_start;
+ long sqno_end;
struct sk_buff *skb;
long timer;
};
@@ -522,7 +624,7 @@
struct mpqueue {
struct mpqueue *next;
struct mpqueue *last;
- int sqno;
+ long sqno;
struct sk_buff *skb;
int BEbyte;
unsigned long time;
@@ -561,6 +663,8 @@
struct slcompress *slcomp;
#endif
unsigned long debug;
+ struct isdn_ppp_compressor *compressor,*link_compressor;
+ void *decomp_stat,*comp_stat,*link_decomp_stat,*link_comp_stat;
};
#endif
@@ -588,7 +692,9 @@
isdn_if *interface; /* Interface to driver */
int *rcverr; /* Error-counters for B-Ch.-receive */
int *rcvcount; /* Byte-counters for B-Ch.-receive */
+#ifdef CONFIG_ISDN_AUDIO
unsigned long DLEflag; /* Flags: Insert DLE at next read */
+#endif
struct sk_buff_head *rpqueue; /* Pointers to start of Rcv-Queue */
struct wait_queue **rcv_waitq; /* Wait-Queues for B-Channel-Reads */
struct wait_queue **snd_waitq; /* Wait-Queue for B-Channel-Send's */
@@ -612,7 +718,8 @@
int chanmap[ISDN_MAX_CHANNELS];/* Map minor->device-channel */
int drvmap[ISDN_MAX_CHANNELS]; /* Map minor->driver-index */
int usage[ISDN_MAX_CHANNELS]; /* Used by tty/ip/voice */
- char num[ISDN_MAX_CHANNELS][20];/* Remote number of active ch.*/
+ char num[ISDN_MAX_CHANNELS][ISDN_MSNLEN];
+ /* Remote number of active ch.*/
int m_idx[ISDN_MAX_CHANNELS]; /* Index for mdm.... */
driver *drv[ISDN_MAX_DRIVERS]; /* Array of drivers */
isdn_net_dev *netdev; /* Linked list of net-if's */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov