summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/isdn.h262
-rw-r--r--include/linux/isdn/fsm.h58
-rw-r--r--include/linux/isdn_ppp.h157
-rw-r--r--include/linux/isdnif.h8
4 files changed, 120 insertions, 365 deletions
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index 0d0ce25b333e..2f429e27a007 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -1,10 +1,9 @@
-/* $Id: isdn.h,v 1.111.6.9 2001/09/23 22:25:05 kai Exp $
- *
- * Main header for the Linux ISDN subsystem (linklevel).
+/* Linux ISDN subsystem, main header
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 2000-2002 by Kai Germaschewski (kai@germaschewski.name)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
@@ -15,9 +14,7 @@
#define __ISDN_H__
#include <linux/ioctl.h>
-
-// FIXME!!!
-#include <../drivers/isdn/i4l/isdn_fsm.h>
+#include <linux/isdn/fsm.h>
#ifdef CONFIG_COBALT_MICRO_SERVER
/* Save memory */
@@ -238,210 +235,9 @@ typedef struct {
#define USG_MODEMORVOICE(x) (((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM) || \
((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE) )
-/* Timer-delays and scheduling-flags */
-#define ISDN_TIMER_RES 4 /* Main Timer-Resolution */
-#define ISDN_TIMER_02SEC (HZ/ISDN_TIMER_RES/5) /* Slow-Timer1 .2 sec */
-#define ISDN_TIMER_1SEC (HZ/ISDN_TIMER_RES) /* Slow-Timer2 1 sec */
-#define ISDN_TIMER_RINGING 5 /* tty RINGs = ISDN_TIMER_1SEC * this factor */
-#define ISDN_TIMER_KEEPINT 10 /* Cisco-Keepalive = ISDN_TIMER_1SEC * this factor */
-#define ISDN_TIMER_MODEMREAD 1
-#define ISDN_TIMER_MODEMPLUS 2
-#define ISDN_TIMER_MODEMRING 4
-#define ISDN_TIMER_MODEMXMIT 8
-#define ISDN_TIMER_CARRIER 256 /* Wait for Carrier */
-#define ISDN_TIMER_FAST (ISDN_TIMER_MODEMREAD | ISDN_TIMER_MODEMPLUS | \
- ISDN_TIMER_MODEMXMIT)
-#define ISDN_TIMER_SLOW (ISDN_TIMER_MODEMRING | ISDN_TIMER_CARRIER)
-
/* GLOBAL_FLAGS */
#define ISDN_GLOBAL_STOPPED 1
-/*=================== Start of ip-over-ISDN stuff =========================*/
-
-/* Feature- and status-flags for a net-interface */
-#define ISDN_NET_SECURE 0x02 /* Accept calls from phonelist only */
-#define ISDN_NET_CALLBACK 0x04 /* activate callback */
-#define ISDN_NET_CBHUP 0x08 /* hangup before callback */
-#define ISDN_NET_CBOUT 0x10 /* remote machine does callback */
-
-#define ISDN_NET_MAGIC 0x49344C02 /* for paranoia-checking */
-
-/* Phone-list-element */
-struct isdn_net_phone {
- struct list_head list;
- char num[ISDN_MSNLEN];
-};
-
-/*
- Principles when extending structures for generic encapsulation protocol
- ("concap") support:
- - Stuff which is hardware specific (here i4l-specific) goes in
- the netdev -> local structure (here: isdn_net_local)
- - Stuff which is encapsulation protocol specific goes in the structure
- which holds the linux device structure (here: isdn_net_device)
-*/
-
-struct isdn_net_dev_s;
-struct isdn_net_local_s;
-
-struct isdn_netif_ops {
- int (*hard_start_xmit) (struct sk_buff *skb,
- struct net_device *dev);
- int (*hard_header) (struct sk_buff *skb,
- struct net_device *dev,
- unsigned short type,
- void *daddr,
- void *saddr,
- unsigned len);
- int (*do_ioctl)(struct net_device *dev,
- struct ifreq *ifr, int cmd);
-
- unsigned short flags; /* interface flags (a la BSD) */
- unsigned short type; /* interface hardware type */
- unsigned char addr_len;/* hardware address length */
- void (*receive)(struct isdn_net_local_s *,
- struct isdn_net_dev_s *,
- struct sk_buff *);
- void (*connected)(struct isdn_net_dev_s *);
- void (*disconnected)(struct isdn_net_dev_s *);
- int (*bind)(struct isdn_net_dev_s *);
- void (*unbind)(struct isdn_net_dev_s *);
- int (*init)(struct isdn_net_local_s *);
- void (*cleanup)(struct isdn_net_local_s *);
- int (*open)(struct isdn_net_local_s *);
- void (*close)(struct isdn_net_local_s *);
-};
-
-/* Local interface-data */
-typedef struct isdn_net_local_s {
- ulong magic;
- struct net_device_stats stats; /* Ethernet Statistics */
- int flags; /* Connection-flags */
- int dialmax; /* Max. Number of Dial-retries */
- int dialtimeout; /* How long shall we try on dialing */
- int dialwait; /* wait after failed attempt */
-
- int cbdelay; /* Delay before Callback starts */
- char msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */
-
- u_char cbhup; /* Flag: Reject Call before Callback*/
- int hupflags; /* Flags for charge-unit-hangup: */
- int onhtime; /* Time to keep link up */
-
- u_char p_encap; /* Packet encapsulation */
- u_char l2_proto; /* Layer-2-protocol */
- u_char l3_proto; /* Layer-3-protocol */
-
- ulong slavedelay; /* Dynamic bundling delaytime */
- int triggercps; /* BogoCPS needed for trigger slave */
- struct list_head phone[2]; /* List of remote-phonenumbers */
- /* phone[0] = Incoming Numbers */
- /* phone[1] = Outgoing Numbers */
-
- struct list_head slaves; /* list of all bundled channels
- protected by serializing config
- ioctls / no change allowed when
- interface is running */
- struct list_head online; /* list of all bundled channels
- which can be used for actual
- data (IP) transfer
- protected by xmit_lock */
-
- spinlock_t xmit_lock; /* used to protect the xmit path of
- a net_device, including all
- associated channels's frame_cnt */
- struct list_head running_devs; /* member of global running_devs */
- atomic_t refcnt; /* references held by ISDN code */
-
-#ifdef CONFIG_ISDN_X25
- struct concap_device_ops *dops; /* callbacks used by encapsulator */
-#endif
-#ifdef CONFIG_ISDN_PPP
- unsigned int mpppcfg;
- long mp_seqno;
- struct ippp_ccp *ccp;
- unsigned long debug;
-#ifdef CONFIG_ISDN_PPP_VJ
- unsigned char *cbuf;
- struct slcompress *slcomp;
-#endif
-#endif
-
- /* use an own struct for that in later versions */
- ulong cisco_myseq; /* Local keepalive seq. for Cisco */
- ulong cisco_mineseen; /* returned keepalive seq. from remote */
- ulong cisco_yourseq; /* Remote keepalive seq. for Cisco */
- int cisco_keepalive_period; /* keepalive period */
- ulong cisco_last_slarp_in; /* jiffie of last keepalive packet we received */
- char cisco_line_state; /* state of line according to keepalive packets */
- char cisco_debserint; /* debugging flag of cisco hdlc with slarp */
-
- struct timer_list cisco_timer;
-
- struct isdn_netif_ops *ops;
-
- struct net_device dev; /* interface to upper levels */
-} isdn_net_local;
-
-/* the interface itself */
-typedef struct isdn_net_dev_s {
- int isdn_slot; /* Index to isdn device/channel */
- int pre_device; /* Preselected isdn-device */
- int pre_channel; /* Preselected isdn-channel */
- int exclusive; /* -1 if non excl./idx to excl chan */
-
- struct timer_list dial_timer; /* dial events timer */
- struct fsm_inst fi; /* call control state machine */
- int dial_event; /* event in case of timer expiry */
- int dial; /* # of phone number just dialed */
- int outgoing; /* Flag: outgoing call */
- int dialretry; /* Counter for Dialout-retries */
-
- int cps; /* current speed of this interface */
- int transcount; /* byte-counter for cps-calculation */
- int last_jiffies; /* when transcount was reset */
- int sqfull; /* Flag: netdev-queue overloaded */
- ulong sqfull_stamp; /* Start-Time of overload */
-
- int huptimer; /* Timeout-counter for auto-hangup */
- int charge; /* Counter for charging units */
- int charge_state; /* ChargeInfo state machine */
- unsigned long chargetime; /* Timer for Charging info */
- int chargeint; /* Interval between charge-infos */
-
- int pppbind; /* ippp device for bindings */
- struct ipppd *ipppd; /* /dev/ipppX which controls us */
-
- struct sk_buff_head super_tx_queue; /* List of supervisory frames to */
- /* be transmitted asap */
- int frame_cnt; /* number of frames currently */
- /* queued in HL driver */
- struct tasklet_struct tlet;
-
- isdn_net_local *mlp; /* Ptr to master device for all devs*/
-
- struct list_head slaves; /* member of local->slaves */
- struct list_head online; /* member of local->online */
-
- char name[10]; /* Name of device */
- struct list_head global_list; /* global list of all isdn_net_devs */
-#ifdef CONFIG_ISDN_PPP
- unsigned int pppcfg;
- unsigned int pppseq; /* last seq no seen */
- struct ippp_ccp *ccp;
- unsigned long debug;
-
- ippp_bundle * pb; /* pointer to the common bundle structure
- * with the per-bundle data */
-#endif
-#ifdef CONFIG_ISDN_X25
- struct concap_proto *cprot; /* connection oriented encapsulation protocol */
-#endif
-
-} isdn_net_dev;
-
-/*===================== End of ip-over-ISDN stuff ===========================*/
-
/*======================= Start of ISDN-tty stuff ===========================*/
#define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */
@@ -494,7 +290,6 @@ typedef struct atemu {
int mdmcmdl; /* Length of Modem-Commandbuffer */
int pluscount; /* Counter for +++ sequence */
int lastplus; /* Timestamp of last + */
- int carrierwait; /* Seconds of carrier waiting */
char mdmcmd[255]; /* Modem-Commandbuffer */
unsigned int charge; /* Charge units of current connection */
} atemu;
@@ -516,7 +311,9 @@ typedef struct modem_info {
/* 2 = B-Channel is up, deliver d.*/
int dialing; /* Dial in progress or ATA */
int rcvsched; /* Receive needs schedule */
- int isdn_slot; /* Index to isdn-driver/channel */
+ struct isdn_slot *isdn_slot; /* Ptr to isdn-driver/channel */
+ struct sk_buff_head rpqueue; /* Queue of recv'd packets */
+ int rcvcount; /* Byte-counters for B rx */
int ncarrier; /* Flag: schedule NO CARRIER */
unsigned char last_cause[8]; /* Last cause message */
unsigned char last_num[ISDN_MSNLEN];
@@ -533,6 +330,7 @@ typedef struct modem_info {
struct sk_buff_head xmit_queue; /* transmit queue */
atomic_t xmit_lock; /* Semaphore for isdn_tty_write */
#ifdef CONFIG_ISDN_AUDIO
+ unsigned long DLEflag; /* Insert DLE at next read */
int vonline; /* Voice-channel status */
/* Bit 0 = recording */
/* Bit 1 = playback */
@@ -549,6 +347,10 @@ typedef struct modem_info {
#endif
struct tty_struct *tty; /* Pointer to corresponding tty */
atemu emu; /* AT-emulator data */
+ struct timer_list escape_timer; /* to recognize +++ escape */
+ struct timer_list ring_timer; /* for writing 'RING' responses */
+ struct timer_list connect_timer; /* waiting for CONNECT */
+ struct timer_list read_timer; /* read incoming data */
struct termios normal_termios; /* For saving termios structs */
struct termios callout_termios;
wait_queue_head_t open_wait, close_wait;
@@ -557,17 +359,6 @@ typedef struct modem_info {
#define ISDN_MODEM_WINSIZE 8
-/* Description of one ISDN-tty */
-typedef struct {
- int refcount; /* Number of opens */
- struct tty_driver tty_modem; /* tty-device */
- struct tty_driver cua_modem; /* cua-device */
- struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */
- struct termios *modem_termios[ISDN_MAX_CHANNELS];
- struct termios *modem_termios_locked[ISDN_MAX_CHANNELS];
- modem_info info[ISDN_MAX_CHANNELS]; /* Private data */
-} modem;
-
/*======================= End of ISDN-tty stuff ============================*/
/*======================== Start of V.110 stuff ============================*/
@@ -602,37 +393,10 @@ typedef struct {
char *private;
} infostruct;
-#define DRV_FLAG_RUNNING 1
-#define DRV_FLAG_REJBUS 2
-#define DRV_FLAG_LOADED 4
-
-/* Description of hardware-level-driver */
-typedef struct {
- ulong online; /* Channel-Online flags */
- ulong flags; /* Misc driver Flags */
- int locks; /* Number of locks for this driver */
- int channels; /* Number of channels */
- wait_queue_head_t st_waitq; /* Wait-Queue for status-read's */
- int maxbufsize; /* Maximum Buffersize supported */
- unsigned long pktcount; /* Until now: unused */
- int stavail; /* Chars avail on Status-device */
- 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 */
- wait_queue_head_t *rcv_waitq; /* Wait-Queues for B-Channel-Reads */
- wait_queue_head_t *snd_waitq; /* Wait-Queue for B-Channel-Send's */
- char msn2eaz[10][ISDN_MSNLEN]; /* Mapping-Table MSN->EAZ */
-} driver;
-
/* Main driver-data */
typedef struct isdn_devt {
unsigned short flags; /* Bitmapped Flags: */
/* */
- int drivers; /* Current number of drivers */
int channels; /* Current number of channels */
int net_verbose; /* Verbose-Flag */
int modempoll; /* Flag: tty-read active */
@@ -641,11 +405,7 @@ typedef struct isdn_devt {
int global_flags;
infostruct *infochain; /* List of open info-devs. */
wait_queue_head_t info_waitq; /* Wait-Queue for isdninfo */
- struct timer_list timer; /* Misc.-function Timer */
- driver *drv[ISDN_MAX_DRIVERS]; /* Array of drivers */
- char drvid[ISDN_MAX_DRIVERS][20];/* Driver-ID */
struct task_struct *profd; /* For iprofd */
- modem mdm; /* tty-driver-data */
struct semaphore sem; /* serialize list access*/
unsigned long global_features;
#ifdef CONFIG_DEVFS_FS
diff --git a/include/linux/isdn/fsm.h b/include/linux/isdn/fsm.h
new file mode 100644
index 000000000000..95beb142b392
--- /dev/null
+++ b/include/linux/isdn/fsm.h
@@ -0,0 +1,58 @@
+/* Linux ISDN subsystem, finite state machine
+ *
+ * Author Karsten Keil
+ * Copyright by Karsten Keil <keil@isdn4linux.de>
+ * 2001-2002 by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_FSM_H__
+#define __ISDN_FSM_H__
+
+#include <linux/kernel.h>
+#include <linux/timer.h>
+
+struct fsm_inst;
+
+typedef int (*fsm_fn)(struct fsm_inst *, int, void *);
+
+struct fsm {
+ fsm_fn *jumpmatrix;
+ int st_cnt, ev_cnt, fn_cnt;
+ char **st_str, **ev_str;
+ struct fsm_node *fn_tbl;
+};
+
+struct fsm_inst {
+ struct fsm *fsm;
+ int state;
+ int debug;
+ void *userdata;
+ int userint;
+ void (*printdebug) (struct fsm_inst *, char *, ...);
+};
+
+struct fsm_node {
+ int st, ev;
+ fsm_fn fn;
+};
+
+struct fsm_timer {
+ struct fsm_inst *fi;
+ struct timer_list tl;
+ int ev;
+ void *arg;
+};
+
+int fsm_new(struct fsm *fsm);
+void fsm_free(struct fsm *fsm);
+int fsm_event(struct fsm_inst *fi, int event, void *arg);
+void fsm_change_state(struct fsm_inst *fi, int newstate);
+void fsm_init_timer(struct fsm_inst *fi, struct fsm_timer *ft);
+int fsm_add_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_mod_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_del_timer(struct fsm_timer *ft);
+
+#endif
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h
index ec6016c37421..669822e2868a 100644
--- a/include/linux/isdn_ppp.h
+++ b/include/linux/isdn_ppp.h
@@ -1,10 +1,15 @@
-/*
+/* Linux ISDN subsystem, sync PPP, interface to ipppd
+ *
+ * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
+ * Copyright 1995,96 Thinking Objects Software GmbH Wuerzburg
+ * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 2000-2002 by Kai Germaschewski (kai@germaschewski.name)
+ *
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
-
#ifndef _LINUX_ISDN_PPP_H
#define _LINUX_ISDN_PPP_H
@@ -16,22 +21,21 @@
struct pppcallinfo
{
- int calltype;
- unsigned char local_num[64];
- unsigned char remote_num[64];
- int charge_units;
+ int calltype;
+ unsigned char local_num[64];
+ unsigned char remote_num[64];
+ int charge_units;
};
-#define PPPIOCGCALLINFO _IOWR('t',128,struct pppcallinfo)
-#define PPPIOCBUNDLE _IOW('t',129,int)
-#define PPPIOCGMPFLAGS _IOR('t',130,int)
-#define PPPIOCSMPFLAGS _IOW('t',131,int)
-#define PPPIOCSMPMTU _IOW('t',132,int)
-#define PPPIOCSMPMRU _IOW('t',133,int)
-#define PPPIOCGCOMPRESSORS _IOR('t',134,unsigned long [8])
-#define PPPIOCSCOMPRESSOR _IOW('t',135,int)
-#define PPPIOCGIFNAME _IOR('t',136, char [IFNAMSIZ] )
-
+#define PPPIOCGCALLINFO _IOWR('t',128,struct pppcallinfo)
+#define PPPIOCBUNDLE _IOW('t',129,int)
+#define PPPIOCGMPFLAGS _IOR('t',130,int)
+#define PPPIOCSMPFLAGS _IOW('t',131,int)
+#define PPPIOCSMPMTU _IOW('t',132,int)
+#define PPPIOCSMPMRU _IOW('t',133,int)
+#define PPPIOCGCOMPRESSORS _IOR('t',134,unsigned long[8])
+#define PPPIOCSCOMPRESSOR _IOW('t',135,int)
+#define PPPIOCGIFNAME _IOR('t',136,char[IFNAMSIZ])
#define SC_MP_PROT 0x00000200
#define SC_REJ_MP_PROT 0x00000400
@@ -44,26 +48,19 @@ struct pppcallinfo
#define IPPP_COMP_FLAG_LINK 0x2
struct isdn_ppp_comp_data {
- int num;
- unsigned char options[ISDN_PPP_COMP_MAX_OPTIONS];
- int optlen;
- int flags;
+ int num;
+ unsigned char options[ISDN_PPP_COMP_MAX_OPTIONS];
+ int optlen;
+ int flags;
};
#ifdef __KERNEL__
-
-#include <linux/config.h>
#include <linux/skbuff.h>
#include <linux/ppp_defs.h>
#define DECOMP_ERR_NOMEM (-10)
-#define MP_END_FRAG 0x40
-#define MP_BEGIN_FRAG 0x80
-
-#define MP_MAX_QUEUE_LEN 16
-
/*
* We need a way for the decompressor to influence the generation of CCP
* Reset-Requests in a variety of ways. The decompressor is already returning
@@ -82,15 +79,15 @@ struct isdn_ppp_comp_data {
#define IPPP_RESET_MAXDATABYTES 32
struct isdn_ppp_resetparams {
- unsigned char valid:1; /* rw Is this structure filled at all ? */
- unsigned char rsend:1; /* rw Should we send one at all ? */
- unsigned char idval:1; /* rw Is the id field valid ? */
- unsigned char dtval:1; /* rw Is the data field valid ? */
- unsigned char expra:1; /* rw Is an Ack expected for this Req ? */
- unsigned char id; /* wo Send CCP ResetReq with this id */
- unsigned short maxdlen; /* ro Max bytes to be stored in data field */
- unsigned short dlen; /* rw Bytes stored in data field */
- unsigned char *data; /* wo Data for ResetReq info field */
+ unsigned char valid:1; /* rw Is this structure filled at all ? */
+ unsigned char rsend:1; /* rw Should we send one at all ? */
+ unsigned char idval:1; /* rw Is the id field valid ? */
+ unsigned char dtval:1; /* rw Is the data field valid ? */
+ unsigned char expra:1; /* rw Is an Ack expected for this Req ? */
+ unsigned char id; /* wo Send CCP ResetReq with this id */
+ unsigned short maxdlen; /* ro Max bytes to be stored in data field */
+ unsigned short dlen; /* rw Bytes stored in data field */
+ unsigned char *data; /* wo Data for ResetReq info field */
};
/*
@@ -98,89 +95,37 @@ struct isdn_ppp_resetparams {
* check the original include for more information
*/
struct isdn_ppp_compressor {
- struct isdn_ppp_compressor *next, *prev;
- int num; /* CCP compression protocol number */
+ struct isdn_ppp_compressor *next, *prev;
+ int num; /* CCP compression protocol number */
- void *(*alloc) (struct isdn_ppp_comp_data *);
- void (*free) (void *state);
- int (*init) (void *state, struct isdn_ppp_comp_data *,
- int unit,int debug);
+ void *(*alloc) (struct isdn_ppp_comp_data *);
+ void (*free) (void *state);
+ int (*init) (void *state, struct isdn_ppp_comp_data *,
+ int unit,int debug);
- /* The reset entry needs to get more exact information about the
- ResetReq or ResetAck it was called with. The parameters are
- obvious. If reset is called without a Req or Ack frame which
- could be handed into it, code MUST be set to 0. Using rsparm,
- the reset entry can control if and how a ResetAck is returned. */
+ /* The reset entry needs to get more exact information about the
+ ResetReq or ResetAck it was called with. The parameters are
+ obvious. If reset is called without a Req or Ack frame which
+ could be handed into it, code MUST be set to 0. Using rsparm,
+ the reset entry can control if and how a ResetAck is returned. */
- void (*reset) (void *state, unsigned char code, unsigned char id,
- unsigned char *data, unsigned len,
- struct isdn_ppp_resetparams *rsparm);
+ void (*reset) (void *state, unsigned char code, unsigned char id,
+ unsigned char *data, unsigned len,
+ struct isdn_ppp_resetparams *rsparm);
- int (*compress) (void *state, struct sk_buff *in,
- struct sk_buff *skb_out, int proto);
+ int (*compress) (void *state, struct sk_buff *in,
+ struct sk_buff *skb_out, int proto);
int (*decompress) (void *state,struct sk_buff *in,
struct sk_buff *skb_out,
struct isdn_ppp_resetparams *rsparm);
- void (*incomp) (void *state, struct sk_buff *in,int proto);
- void (*stat) (void *state, struct compstat *stats);
+ void (*incomp) (void *state, struct sk_buff *in,int proto);
+ void (*stat) (void *state, struct compstat *stats);
};
extern int isdn_ppp_register_compressor(struct isdn_ppp_compressor *);
extern int isdn_ppp_unregister_compressor(struct isdn_ppp_compressor *);
-typedef struct {
- unsigned long seqerrs;
- unsigned long frame_drops;
- unsigned long overflows;
- unsigned long max_queue_len;
-} isdn_mppp_stats;
-
-typedef struct {
- int mp_mrru; /* unused */
- struct sk_buff * frags; /* fragments sl list -- use skb->next */
- long frames; /* number of frames in the frame list */
- unsigned int seq; /* last processed packet seq #: any packets
- * with smaller seq # will be dropped
- * unconditionally */
- spinlock_t lock;
- int ref_ct;
- /* statistics */
- isdn_mppp_stats stats;
-} ippp_bundle;
-
-#define IPPP_MAX_RQ_LEN 8
-
-/* The data structure for one CCP reset transaction */
-enum ippp_ccp_reset_states {
- CCPResetIdle,
- CCPResetSentReq,
- CCPResetRcvdReq,
- CCPResetSentAck,
- CCPResetRcvdAck
-};
-
-struct ippp_ccp_reset_state {
- enum ippp_ccp_reset_states state; /* State of this transaction */
- struct ippp_ccp *ccp; /* Backlink */
- unsigned char id; /* id index */
- unsigned char ta:1; /* The timer is active (flag) */
- unsigned char expra:1; /* We expect a ResetAck at all */
- int dlen; /* Databytes stored in data */
- struct timer_list timer; /* For timeouts/retries */
- /* This is a hack but seems sufficient for the moment. We do not want
- to have this be yet another allocation for some bytes, it is more
- memory management overhead than the whole mess is worth. */
- unsigned char data[IPPP_RESET_MAXDATABYTES];
-};
-
-/* The data structure keeping track of the currently outstanding CCP Reset
- transactions. */
-struct ippp_ccp_reset {
- struct ippp_ccp_reset_state *rs[256]; /* One per possible id */
- unsigned char lastid; /* Last id allocated by the engine */
-};
-
#endif /* __KERNEL__ */
#endif /* _LINUX_ISDN_PPP_H */
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h
index c9718d4de584..342dd971b1b6 100644
--- a/include/linux/isdnif.h
+++ b/include/linux/isdnif.h
@@ -202,14 +202,12 @@ typedef struct
#define ISDN_STAT_LOAD 265 /* Signal new lowlevel-driver is loaded */
#define ISDN_STAT_UNLOAD 266 /* Signal unload of lowlevel-driver */
#define ISDN_STAT_BSENT 267 /* Signal packet sent */
-#define ISDN_STAT_NODCH 268 /* Signal no D-Channel */
#define ISDN_STAT_ADDCH 269 /* Add more Channels */
#define ISDN_STAT_CAUSE 270 /* Cause-Message */
#define ISDN_STAT_ICALLW 271 /* Incoming call without B-chan waiting */
#define ISDN_STAT_REDIR 272 /* Redir result */
#define ISDN_STAT_PROT 273 /* protocol IO specific callback */
#define ISDN_STAT_DISPLAY 274 /* deliver a received display message */
-#define ISDN_STAT_L1ERR 275 /* Signal Layer-1 Error */
#define ISDN_STAT_FAXIND 276 /* FAX indications from HL-driver */
#define ISDN_STAT_AUDIO 277 /* DTMF, DSP indications */
#define ISDN_STAT_DISCH 278 /* Disable/Enable channel usage */
@@ -221,12 +219,6 @@ typedef struct
#define ISDN_AUDIO_DTMF 1 /* Rx/Tx DTMF */
/*
- * Values for errcode field
- */
-#define ISDN_STAT_L1ERR_SEND 1
-#define ISDN_STAT_L1ERR_RECV 2
-
-/*
* Values for feature-field of interface-struct.
*/
/* Layer 2 */