|
Packit |
d37888 |
/* This file contains modified code from `/usr/src/i4b/driver/i4b_isppp.c'
|
|
Packit |
d37888 |
* which belongs to the I4B package.
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* The original copyright of this file [/usr/src/i4b/driver/i4b_isppp.c] is
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* -----------------------------------------------------------------------------
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* Copyright (c) 1997 Joerg Wunsch. All rights reserved.
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* Copyright (c) 1997, 1998 Hellmuth Michaelis. All rights reserved.
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* Redistribution and use in source and binary forms, with or without
|
|
Packit |
d37888 |
* modification, are permitted provided that the following conditions
|
|
Packit |
d37888 |
* are met:
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* 1. Redistributions of source code must retain the above copyright
|
|
Packit |
d37888 |
* notice, this list of conditions and the following disclaimer.
|
|
Packit |
d37888 |
* 2. Redistributions in binary form must reproduce the above copyright
|
|
Packit |
d37888 |
* notice, this list of conditions and the following disclaimer in the
|
|
Packit |
d37888 |
* documentation and/or other materials provided with the distribution.
|
|
Packit |
d37888 |
* 3. Neither the name of the author nor the names of any co-contributors
|
|
Packit |
d37888 |
* may be used to endorse or promote products derived from this software
|
|
Packit |
d37888 |
* without specific prior written permission.
|
|
Packit |
d37888 |
* 4. Altered versions must be plainly marked as such, and must not be
|
|
Packit |
d37888 |
* misrepresented as being the original software and/or documentation.
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
Packit |
d37888 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
d37888 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
Packit |
d37888 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
Packit |
d37888 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
d37888 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
Packit |
d37888 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
Packit |
d37888 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
Packit |
d37888 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
Packit |
d37888 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
Packit |
d37888 |
* SUCH DAMAGE.
|
|
Packit |
d37888 |
*
|
|
Packit |
d37888 |
* -----------------------------------------------------------------------------
|
|
Packit |
d37888 |
*/
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#define I4BISPPPACCT 1 /* enable accounting messages */
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
struct i4bisppp_softc {
|
|
Packit |
d37888 |
/*
|
|
Packit |
d37888 |
* struct sppp starts with a struct ifnet, but we gotta allocate
|
|
Packit |
d37888 |
* more space for it. NB: do not relocate this union, it must
|
|
Packit |
d37888 |
* be first in isppp_softc. The tls and tlf hooks below want to
|
|
Packit |
d37888 |
* convert a ``struct sppp *'' into a ``struct isppp_softc *''.
|
|
Packit |
d37888 |
*/
|
|
Packit |
d37888 |
union {
|
|
Packit |
d37888 |
struct ifnet scu_if;
|
|
Packit |
d37888 |
struct sppp scu_sp;
|
|
Packit |
d37888 |
} sc_if_un;
|
|
Packit |
d37888 |
#define sc_if sc_if_un.scu_if
|
|
Packit |
d37888 |
int sc_state; /* state of the interface */
|
|
Packit |
d37888 |
#ifndef __FreeBSD__
|
|
Packit |
d37888 |
int sc_unit; /* unit number for Net/OpenBSD */
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
void *sc_cdp; /* ptr to call descriptor */
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#ifdef I4BISPPPACCT
|
|
Packit |
d37888 |
int sc_iinb; /* isdn driver # of inbytes */
|
|
Packit |
d37888 |
int sc_ioutb; /* isdn driver # of outbytes */
|
|
Packit |
d37888 |
int sc_inb; /* # of bytes rx'd */
|
|
Packit |
d37888 |
int sc_outb; /* # of bytes tx'd */
|
|
Packit |
d37888 |
int sc_linb; /* last # of bytes rx'd */
|
|
Packit |
d37888 |
int sc_loutb; /* last # of bytes tx'd */
|
|
Packit |
d37888 |
int sc_fn; /* flag, first null acct */
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
|
|
Packit |
d37888 |
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
|
|
Packit |
d37888 |
struct callout_handle sc_ch;
|
|
Packit |
d37888 |
#endif
|
|
Packit |
d37888 |
};
|