-/* $Id: isdn_audio.c,v 1.21.6.3 2002/08/13 09:45:33 keil Exp $
- *
- * Linux ISDN subsystem, audio conversion and compression (linklevel).
+/* Linux ISDN subsystem, audio conversion and compression
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
- * DTMF code (c) 1996 by Christian Mock (cm@tahina.priv.at)
- * Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de)
+ * 1996 by Christian Mock (cm@tahina.priv.at)
+ * 1998 by Armin Schindler (mac@gismo.telekom.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
+ * DTMF code by Christian Mock
+ * Silence detection by Armin Schindler
*/
#include <linux/isdn.h>
-/* $Id: isdn_audio.h,v 1.9.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * Linux ISDN subsystem, audio conversion and compression (linklevel).
+/* Linux ISDN subsystem, audio conversion and compression
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
*
-/*
- * Linux ISDN subsystem, CISCO HDLC network interfaces
+/* Linux ISDN subsystem, CISCO HDLC network interfaces
*
* Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
* 1995,96 by Thinking Objects Software GmbH Wuerzburg
-/*
- * Linux ISDN subsystem, CISCO HDLC network interfaces
+/* Linux ISDN subsystem, CISCO HDLC network interfaces
*
* Copyright 1999-2002 by Kai Germaschewski <kai@germaschewski.name>
* 2001 by Bjoern A. Zeeb <i4l@zabbadoz.net>
-/* $Id: isdn_common.c,v 1.114.6.16 2001/11/06 20:58:28 kai Exp $
- *
- * Linux ISDN subsystem, common used functions (linklevel).
+/* Linux ISDN subsystem, common used functions
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 Thinking Objects Software GmbH Wuerzburg
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#include <linux/config.h>
-/* $Id: isdn_common.h,v 1.21.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * header for Linux ISDN subsystem
- * common used functions and debugging-switches (linklevel).
+/* Linux ISDN subsystem, common used functions and debugging-switches
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
-/* $Id: isdn_concap.c,v 1.8.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * Linux ISDN subsystem, protocol encapsulation
+/* Linux ISDN subsystem, protocol encapsulation
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
/* Stuff to support the concap_proto by isdn4linux. isdn4linux - specific
* stuff goes here. Stuff that depends only on the concap protocol goes to
* another -- protocol specific -- source file.
- *
*/
-/* $Id: isdn_concap.h,v 1.3.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * Linux ISDN subsystem, protocol encapsulation
+/* Linux ISDN subsystem, protocol encapsulation
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
extern struct concap_device_ops isdn_concap_reliable_dl_dops;
-/* $Id: fsm.c,v 1.14.6.4 2001/09/23 22:24:47 kai Exp $
- *
- * Finite state machine
+/* Linux ISDN subsystem, finite state machine
*
* Author Karsten Keil
- * Copyright by Karsten Keil <keil@isdn4linux.de>
- * by Kai Germaschewski <kai.germaschewski@gmx.de>
+ * 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.
*
* Thanks to Jan den Ouden
* Fritz Elfert
- *
*/
#include <linux/kernel.h>
-/* $Id: fsm.h,v 1.3.2.2 2001/09/23 22:24:47 kai Exp $
- *
- * Finite state machine
+/* Linux ISDN subsystem, finite state machine
*
* Author Karsten Keil
- * Copyright by Karsten Keil <keil@isdn4linux.de>
- * by Kai Germaschewski <kai.germaschewski@gmx.de>
+ * 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__
-/* $Id: isdn_net.c,v 1.140.6.11 2001/11/06 20:58:28 kai Exp $
- *
- * Linux ISDN subsystem, network interfaces and related functions (linklevel).
+/* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
* Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
* 1995,96 by Thinking Objects Software GmbH Wuerzburg
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
+ */
+
+/*
* Data Over Voice (DOV) support added - Guy Ellis 23-Mar-02
* guy@traverse.com.au
* Outgoing calls - looks for a 'V' in first char of dialed number
-/* $Id: isdn_net.h,v 1.19.6.4 2001/09/28 08:05:29 kai Exp $
- *
- * header for Linux ISDN subsystem, network related functions (linklevel).
+/* Linux ISDN subsystem, network related functions
*
* Copyright 1994-1999 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)
+ * 1995,96 by Thinking Objects Software GmbH Wuerzburg
+ * 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
- *
*/
#include <linux/kernel.h>
isdn_net_dev *isdn_net_get_xmit_dev(isdn_net_local *mlp);
void isdn_netif_rx(isdn_net_dev *idev, struct sk_buff *skb, u16 protocol);
+/* ====================================================================== */
+
static inline int
put_u8(unsigned char *p, u8 x)
{
-/*
- * Linux ISDN subsystem, Network interface configuration
+/* Linux ISDN subsystem, Network interface configuration
*
* Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
* 1995,96 by Thinking Objects Software GmbH Wuerzburg
-/* $Id: isdn_ppp.c,v 1.85.6.9 2001/11/06 20:58:28 kai Exp $
+/* Linux ISDN subsystem, functions for synchronous PPP (linklevel).
*
- * Linux ISDN subsystem, functions for synchronous PPP (linklevel).
- *
- * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
- *
*/
#include <linux/module.h>
#include "isdn_ppp_mp.h"
#include "isdn_net.h"
+/* ====================================================================== */
+
+#define IPPP_MAX_RQ_LEN 8 /* max #frames queued for ipppd to read */
+
static int
isdn_ppp_set_compressor(isdn_net_dev *idev, struct isdn_ppp_comp_data *);
-/* $Id: isdn_ppp.h,v 1.17.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, functions for synchronous PPP (linklevel).
+/* Linux ISDN subsystem, functions for synchronous PPP (linklevel).
*
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
- *
*/
#include <linux/ppp_defs.h> /* for PPP_PROTOCOL */
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
+ * 1995,96 by Thinking Objects Software GmbH Wuerzburg
+ * 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
+ */
#include "isdn_ppp_ccp.h"
#include "isdn_common.h"
#include "isdn_ppp.h"
#include <linux/ppp-comp.h>
+/* ====================================================================== */
+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 */
+};
+
/* In-kernel handling of CCP Reset-Request and Reset-Ack is necessary,
but absolutely nontrivial. The most abstruse problem we are facing is
that the generation, reception and all the handling of timeouts and
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
+ * 1995,96 by Thinking Objects Software GmbH Wuerzburg
+ * 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
+ */
#include <linux/kernel.h>
#include <linux/isdn_ppp.h>
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
+ * 1995,96 by Thinking Objects Software GmbH Wuerzburg
+ * 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
+ */
#include "isdn_ppp_mp.h"
#include "isdn_ppp_ccp.h"
#include "isdn_net.h"
#include "isdn_ppp.h"
+/* ====================================================================== */
+
+#define MP_END_FRAG 0x40
+#define MP_BEGIN_FRAG 0x80
+
+#define MP_MAX_QUEUE_LEN 16
+
+/* ====================================================================== */
+
int
ippp_mp_bind(isdn_net_dev *idev)
{
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998 by Fritz Elfert (fritz@isdn4linux.de)
+ * 1995,96 by Thinking Objects Software GmbH Wuerzburg
+ * 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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_PPP_MP_H__
#define __ISDN_PPP_MP_H__
#include <linux/kernel.h>
#include <linux/isdn.h>
-
#ifdef CONFIG_ISDN_MPP
int ippp_mp_bind(isdn_net_dev *idev);
+/* Linux ISDN subsystem, PPP VJ header compression
+ *
+ * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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.
+ */
#include "isdn_ppp_vj.h"
#include "isdn_common.h"
#include "isdn_net.h"
#include "isdn_ppp.h"
-/* ====================================================================== */
-/* VJ header compression */
-/* ====================================================================== */
-
struct slcompress *
ippp_vj_alloc(void)
{
+/* Linux ISDN subsystem, PPP VJ header compression
+ *
+ * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * 1999-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_PPP_VJ_H__
#define __ISDN_PPP_VJ_H__
-/* $Id: isdn_tty.c,v 1.94.6.9 2001/11/06 20:58:29 kai Exp $
- *
- * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
+/* Linux ISDN subsystem, tty functions and AT-command emulator
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
+
#undef ISDN_TTY_STAT_DEBUG
#include <linux/config.h>
-/* $Id: isdn_tty.h,v 1.22.6.2 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, tty related functions (linklevel).
+/* Linux ISDN subsystem, tty related functions
*
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#include <linux/config.h>
-/* $Id: isdn_ttyfax.c,v 1.7.6.2 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, tty_fax AT-command emulator (linklevel).
+/* Linux ISDN subsystem, tty_fax AT-command emulator
*
* Copyright 1999 by Armin Schindler (mac@melware.de)
* Copyright 1999 by Ralf Spachmann (mel@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#undef ISDN_TTY_FAX_STAT_DEBUG
-/* $Id: isdn_ttyfax.h,v 1.2.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, tty_fax related functions (linklevel).
+/* Linux ISDN subsystem, tty_fax related functions
*
* Copyright 1999 by Armin Schindler (mac@melware.de)
* Copyright 1999 by Ralf Spachmann (mel@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
-/* $Id: isdn_v110.c,v 1.5.6.4 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, V.110 related functions (linklevel).
+/* Linux ISDN subsystem, V.110
*
* Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#include <linux/string.h>
-/* $Id: isdn_v110.h,v 1.4.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, V.110 related functions (linklevel).
+/* Linux ISDN subsystem, V.110 related functions
*
* Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#ifndef ISDN_V110_H
-/* $Id: isdn_x25iface.c,v 1.9.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, X.25 related functions
+/* * Linux ISDN subsystem, X.25 related functions
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
+ */
+
+/*
* stuff needed to support the Linux X.25 PLP code on top of devices that
* can provide a lab_b service using the concap_proto mechanism.
* This module supports a network interface wich provides lapb_sematics
*
*/
-/* #include <linux/isdn.h> */
#include <linux/netdevice.h>
#include <linux/concap.h>
#include <linux/wanrouter.h>
-/* $Id: isdn_x25iface.h,v 1.3.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, x.25 related functions
+/* Linux ISDN subsystem, x.25 related functions
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
- *
*/
#ifndef _LINUX_ISDN_X25IFACE_H
#define _LINUX_ISDN_X25IFACE_H
#define ISDN_X25IFACE_MAGIC 0x1e75a2b9
-/* #define DEBUG_ISDN_X25 if you want isdn_x25 debugging messages */
+
+#undef DEBUG_ISDN_X25
+
#ifdef DEBUG_ISDN_X25
# define IX25DEBUG(fmt,args...) printk(KERN_DEBUG fmt , ## args)
#else
extern struct concap_proto_ops * isdn_x25iface_concap_proto_ops_pt;
extern struct concap_proto * isdn_x25iface_proto_new(void);
-
-
#endif
-/* $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.
u32 mp_rxseq; /* last seq no seen on this channel */
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 */
-/*
+/* 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
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
#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
#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 */
};
/*
* 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 {
- int mp_mrru; /* unused */
-} 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 */