diff options
author | hm <hm@FreeBSD.org> | 2000-10-09 13:18:17 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 2000-10-09 13:18:17 +0000 |
commit | 9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb (patch) | |
tree | ca1e99e8eac9fd3f8c8cecbcbfc102b0bfa6f03f /sys/i386 | |
parent | 7fc1fa165474e47dca5d7dfb2584d97d169d686d (diff) | |
download | FreeBSD-src-9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb.zip FreeBSD-src-9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb.tar.gz |
update to i4b version 0.95.04
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/i4b_cause.h | 9 | ||||
-rw-r--r-- | sys/i386/include/i4b_debug.h | 154 | ||||
-rw-r--r-- | sys/i386/include/i4b_ioctl.h | 40 | ||||
-rw-r--r-- | sys/i386/include/i4b_isppp.h | 253 | ||||
-rw-r--r-- | sys/i386/include/i4b_tel_ioctl.h | 19 | ||||
-rw-r--r-- | sys/i386/include/i4b_trace.h | 13 |
6 files changed, 404 insertions, 84 deletions
diff --git a/sys/i386/include/i4b_cause.h b/sys/i386/include/i4b_cause.h index 96589e5..36c6142 100644 --- a/sys/i386/include/i4b_cause.h +++ b/sys/i386/include/i4b_cause.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,11 @@ * i4b_cause.h - causes and cause handling for i4b * ----------------------------------------------- * - * $Id: i4b_cause.h,v 1.11 1999/12/13 21:25:28 hm Exp $ + * $Id: i4b_cause.h,v 1.13 2000/02/06 19:01:14 hm Exp $ * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 22:06:51 1999] + * last edit-date: [Sun Feb 6 19:46:41 2000] * *---------------------------------------------------------------------------*/ @@ -70,7 +70,8 @@ #define CAUSE_I4B_L1ERROR 7 /* L1 error / persistent deact */ #define CAUSE_I4B_LLDIAL 8 /* no dialout on leased line */ #define CAUSE_I4B_MAX 9 - /* NOTE: update isdnd/pcause.c when adding causes !!!!! */ + /* NOTE: update isdnd/pcause.c when adding causes !!!!! */ + /* NOTE: update layer3/i4b_q931.c when adding causes !!!!! */ /* CAUSET_Q850 - causes defined in Q.850 */ diff --git a/sys/i386/include/i4b_debug.h b/sys/i386/include/i4b_debug.h index aabc498..0e7eab2 100644 --- a/sys/i386/include/i4b_debug.h +++ b/sys/i386/include/i4b_debug.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,58 +27,52 @@ * i4b_debug.h - i4b debug header file * ----------------------------------- * - * $Id: i4b_debug.h,v 1.20 1999/12/13 21:25:28 hm Exp $ + * $Id: i4b_debug.h,v 1.32 2000/07/24 12:22:08 hm Exp $ * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 22:06:59 1999] + * last edit-date: [Wed May 31 09:51:34 2000] * *---------------------------------------------------------------------------*/ -#define DO_I4B_DEBUG /* enable debugging code inclusion */ +#if !defined DO_I4B_DEBUG +# define DO_I4B_DEBUG 1 /* default = include debugging code */ +#elif DO_I4B_DEBUG != 0 +# undef DO_I4B_DEBUG +# define DO_I4B_DEBUG 1 +#endif -#undef DO_I4B_MAXDEBUG /* enable ALL debug messages by default */ +#undef DO_I4B_MAXDEBUG /* default = disable ALL debug messages */ -#ifdef DO_I4B_DEBUG +#if DO_I4B_DEBUG extern unsigned int i4b_l1_debug; extern unsigned int i4b_l2_debug; extern unsigned int i4b_l3_debug; extern unsigned int i4b_l4_debug; -#define DBGL1(bits, routine, what) \ - if(bits & i4b_l1_debug) \ - { \ - printf("i4b-L1-%s: ", routine); \ - printf what ; \ - } - -#define DBGL2(bits, routine, what) \ - if(bits & i4b_l2_debug) \ - { \ - printf("i4b-L2-%s: ", routine); \ - printf what ; \ - } - -#define DBGL3(bits, routine, what) \ - if(bits & i4b_l3_debug) \ - { \ - printf("i4b-L3-%s: ", routine); \ - printf what ; \ - } - -#define DBGL4(bits, routine, what) \ - if(bits & i4b_l4_debug) \ - { \ - printf("i4b-L4-%s: ", routine); \ - printf what ; \ - } +#define NDBGL1(bits, fmt, args...) \ + if(bits & i4b_l1_debug) \ + { printf("i4b-L1 %s: " fmt "\n", __FUNCTION__ , ##args ); } + +#define NDBGL2(bits, fmt, args...) \ + if(bits & i4b_l2_debug) \ + { printf("i4b-L2 %s: " fmt "\n", __FUNCTION__ , ##args ); } + +#define NDBGL3(bits, fmt, args...) \ + if(bits & i4b_l3_debug) \ + { printf("i4b-L3 %s: " fmt "\n", __FUNCTION__ , ##args ); } + +#define NDBGL4(bits, fmt, args...) \ + if(bits & i4b_l4_debug) \ + { printf("i4b-L4 %s: " fmt "\n", __FUNCTION__ , ##args ); } + #else /* !DO_I4B_DEBUG */ -#define DBGL1(bits, routine, what); -#define DBGL2(bits, routine, what); -#define DBGL3(bits, routine, what); -#define DBGL4(bits, routine, what); +#define NDBGL1(bits, fmt, args...); +#define NDBGL2(bits, fmt, args...); +#define NDBGL3(bits, fmt, args...); +#define NDBGL4(bits, fmt, args...); #endif /* DO_I4B_DEBUG */ @@ -98,9 +92,11 @@ extern unsigned int i4b_l4_debug; #define L1_T_ERR 0x0800 /* Timer error messages */ #define L1_H_XFRERR 0x1000 /* HSCX data xfer error */ #define L1_I_CICO 0x2000 /* ISAC command in/out */ +#define L1_S_MSG 0x4000 /* silent messages (soft-HDLC) */ +#define L1_S_ERR 0x8000 /* error messages (soft-HDLC) */ -#define L1_DEBUG_MAX 0x3fef /* all messages on except IRQ! */ -#define L1_DEBUG_ERR (L1_H_ERR | L1_I_ERR | L1_F_ERR | L1_T_ERR | L1_ERROR) +#define L1_DEBUG_MAX 0xffef /* all messages on except IRQ! */ +#define L1_DEBUG_ERR (L1_S_ERR | L1_H_ERR | L1_I_ERR | L1_F_ERR | L1_T_ERR | L1_ERROR) #ifndef L1_DEBUG_DEFAULT #ifdef DO_I4B_MAXDEBUG @@ -176,8 +172,9 @@ extern unsigned int i4b_l4_debug; #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_INGDBG 0x0800 /* ing driver debug messages */ -#define L4_DEBUG_MAX 0x07ff /* all messages on */ +#define L4_DEBUG_MAX 0x0fff /* all messages on */ #define L4_DEBUG_ERR (L4_ERR | L4_TINADBG | L4_TINAMSG | L4_TINAERR) #ifndef L4_DEBUG_DEFAULT @@ -205,9 +202,23 @@ typedef struct { #define I4B_CTL_SET_DEBUG _IOW('C', 1, ctl_debug_t) /*---------------------------------------------------------------------------* - * get hscx statistics + * generic get chipset statistics *---------------------------------------------------------------------------*/ +/* for the ihfc-driver: structure for HFC-1/S/SP statistics */ + +typedef struct { + int txframes; + int rxframes; + int xdu; + int rdo; + int crc; + int rab; +} hfcstat_t; + + +/* for the isic-driver: structure for HSCX statistics */ + typedef struct { int unit; /* controller number */ int chan; /* channel number */ @@ -218,44 +229,61 @@ typedef struct { int xdu; int rfo; } hscxstat_t; - -#define I4B_CTL_GET_HSCXSTAT _IOWR('C', 2, hscxstat_t) -#define I4B_CTL_CLR_HSCXSTAT _IOW('C', 3, hscxstat_t) +/* generic statistics structure */ + +struct chipstat { + int driver_type; /* type, L1DRVR_XXXX */ + int driver_unit; /* the unit number */ + int driver_bchannel; /* the B-channel */ + union stats { /* union for all drivers */ + hfcstat_t hfcstat; /* for ihfc driver, L1DRVR_IHFC */ + hscxstat_t hscxstat; /* for isic driver, L1DRVR_ISIC */ + } stats; +}; + +/* get statistics */ + +#define I4B_CTL_GET_CHIPSTAT _IOWR('C', 2, struct chipstat) + +/* clear statistics */ + +#define I4B_CTL_CLR_CHIPSTAT _IOW('C', 3, struct chipstat) /*---------------------------------------------------------------------------* * get LAPD/Q.921 statistics *---------------------------------------------------------------------------*/ typedef struct { - /* transmit */ - u_long tx_i; /* I */ - u_long tx_rr; /* RR */ - u_long tx_rnr; /* RNR */ - u_long tx_rej; /* REJ */ + /* transmit */ + + u_long tx_i; /* I */ + u_long tx_rr; /* RR */ + u_long tx_rnr; /* RNR */ + u_long tx_rej; /* REJ */ u_long tx_sabme; /* SABME*/ - u_long tx_dm; /* DM */ + u_long tx_dm; /* DM */ u_long tx_disc; /* DISC */ - u_long tx_ua; /* UA */ + u_long tx_ua; /* UA */ u_long tx_frmr; /* FRMR */ - u_long tx_tei; /* TEI */ + u_long tx_tei; /* TEI */ - /* receive */ + /* receive */ - u_long rx_i; /* I */ - u_long rx_rr; /* RR */ - u_long rx_rnr; /* RNR */ - u_long rx_rej; /* REJ */ + u_long rx_i; /* I */ + u_long rx_rr; /* RR */ + u_long rx_rnr; /* RNR */ + u_long rx_rej; /* REJ */ u_long rx_sabme; /* SABME*/ - u_long rx_tei; /* TEI */ - u_long rx_ui; /* UI */ + u_long rx_tei; /* TEI */ + u_long rx_ui; /* UI */ u_long rx_disc; /* DISC */ - u_long rx_xid; /* XID */ - u_long rx_dm; /* DM */ - u_long rx_ua; /* UA */ + u_long rx_xid; /* XID */ + u_long rx_dm; /* DM */ + u_long rx_ua; /* UA */ u_long rx_frmr; /* FRMR */ - /* errors */ + /* errors */ u_long err_rx_len; /* incorrect length */ u_long err_rx_badf; /* bad frame type */ diff --git a/sys/i386/include/i4b_ioctl.h b/sys/i386/include/i4b_ioctl.h index c2a2460..0a498b9 100644 --- a/sys/i386/include/i4b_ioctl.h +++ b/sys/i386/include/i4b_ioctl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,11 @@ * i4b_ioctl.h - messages kernel <--> userland * ------------------------------------------- * - * $Id: i4b_ioctl.h,v 1.150 1999/12/13 21:25:28 hm Exp $ + * $Id: i4b_ioctl.h,v 1.196 2000/10/09 11:17:07 hm Exp $ * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 22:12:16 1999] + * last edit-date: [Mon Oct 9 13:17:34 2000] * *---------------------------------------------------------------------------*/ @@ -48,8 +48,8 @@ * version and release number for isdn4bsd package *---------------------------------------------------------------------------*/ #define VERSION 0 /* version number */ -#define REL 90 /* release number */ -#define STEP 1 /* release step */ +#define REL 95 /* release number */ +#define STEP 04 /* release step */ /*---------------------------------------------------------------------------* * date/time format in i4b log messages @@ -87,6 +87,20 @@ #define CTRL_NUMTYPES 5 /* number of controller types */ /*---------------------------------------------------------------------------* + * CTRL_PASSIVE: driver types + *---------------------------------------------------------------------------*/ +#define MAXL1UNITS 8 /* max number of units */ + +#define L1DRVR_ISIC 0 /* isic - driver */ +#define L1DRVR_IWIC 1 /* iwic - driver */ +#define L1DRVR_IFPI 2 /* ifpi - driver */ +#define L1DRVR_IHFC 3 /* ihfc - driver */ +#define L1DRVR_IFPNP 4 /* ifpnp - driver */ + +/* MAXL1DRVR MUST be updated when more passive drivers are added !!! */ +#define MAXL1DRVR (L1DRVR_IFPNP + 1) + +/*---------------------------------------------------------------------------* * card types for CTRL_PASSIVE *---------------------------------------------------------------------------*/ #define CARD_TYPEP_INVAL (-1) /* invalid, error */ @@ -114,16 +128,21 @@ #define CARD_TYPEP_AVM_PNP 21 /* AVM FRITZ!CARD PnP */ #define CARD_TYPEP_SIE_ISURF2 22 /* Siemens I-Surf 2 PnP */ #define CARD_TYPEP_ASUSCOMIPAC 23 /* Asuscom ISDNlink 128 K PnP */ +#define CARD_TYPEP_WINB6692 24 /* Winbond W6692 based */ +#define CARD_TYPEP_16_3C 25 /* Teles S0/16.3c PnP (HFC-S/SP */ +#define CARD_TYPEP_ACERP10 26 /* Acer ISDN P10 (HFC-S) */ +#define CARD_TYPEP_TELEINT_NO_1 27 /* TELEINT ISDN SPEED No. 1 (HFC-1) */ + /* * in case you add support for more cards, please update: * - * isdnd: support.c, name_of_controller() + * isdnd: controller.c, name_of_controller() * diehl/diehlctl: main.c, listall() * * and adjust CARD_TYPEP_MAX below. */ -#define CARD_TYPEP_MAX 23 /* max type */ +#define CARD_TYPEP_MAX 27 /* max type */ /*---------------------------------------------------------------------------* * card types for CTRL_DAIC @@ -162,6 +181,7 @@ #define BDRV_IPR 2 /* IP over raw HDLC interface driver */ #define BDRV_ISPPP 3 /* sync Kernel PPP interface driver */ #define BDRV_IBC 4 /* BSD/OS point to point driver */ +#define BDRV_ING 5 /* NetGraph ing driver */ /*---------------------------------------------------------------------------* * B channel protocol @@ -311,6 +331,12 @@ typedef struct { #define SCR_USR_PASS 2 /* screening user provided, verified & passed */ #define SCR_USR_FAIL 3 /* screening user provided, verified & failed */ #define SCR_NET 4 /* screening network provided */ + int prs_ind;/* presentation indicator */ +#define PRS_NONE 0 /* no presentation indicator transmitted*/ +#define PRS_ALLOWED 1 /* presentation allowed */ +#define PRS_RESTRICT 2 /* presentation restricted */ +#define PRS_NNINTERW 3 /* number not available due to interworking */ +#define PRS_RESERVED 4 /* reserved */ char display[DISPLAY_MAX]; /* content of display IE*/ } msg_connect_ind_t; diff --git a/sys/i386/include/i4b_isppp.h b/sys/i386/include/i4b_isppp.h new file mode 100644 index 0000000..9d1b59e --- /dev/null +++ b/sys/i386/include/i4b_isppp.h @@ -0,0 +1,253 @@ +/* + * Defines for synchronous PPP/Cisco link level subroutines. + * + * Copyright (C) 1994 Cronyx Ltd. + * Author: Serge Vakulenko, <vak@cronyx.ru> + * + * Heavily revamped to conform to RFC 1661. + * Copyright (C) 1997, Joerg Wunsch. + * + * This software is distributed with NO WARRANTIES, not even the implied + * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Authors grant any other persons or organizations permission to use + * or modify this software as long as this message is kept with the software, + * all derivative works or modified versions. + * + * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995 + * + * From: if_sppp.h,v 1.14 1999/03/30 13:28:26 phk Exp + * + * $Id: i4b_isppp.h,v 1.5 2000/07/18 15:05:37 hm Exp $ + * + * $FreeBSD$ + */ + +#ifndef _I4B_ISPPP_H_ +#define _I4B_ISPPP_H_ + +#define SPPP_VJ /* use VJ compression */ + + +#ifdef SPPP_VJ +#if !(defined (KERNEL) || defined (_KERNEL)) +#ifdef __FreeBSD__ +#if 0 +/* + * this is needed on FreeBSD to make /usr/src/usr.bin/kdump and + * /usr/src/usr.bin/truss compile. + */ +#include <sys/mbuf.h> +#endif +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <net/slcompress.h> +#endif +#endif +#endif + +#define IDX_LCP 0 /* idx into state table */ + +struct slcp { + u_long opts; /* LCP options to send (bitfield) */ + u_long magic; /* local magic number */ + u_long mru; /* our max receive unit */ + u_long their_mru; /* their max receive unit */ + u_long protos; /* bitmask of protos that are started */ + u_char echoid; /* id of last keepalive echo request */ + /* restart max values, see RFC 1661 */ + int timeout; + int max_terminate; + int max_configure; + int max_failure; +}; + +#define IDX_IPCP 1 /* idx into state table */ + +struct sipcp { + u_long opts; /* IPCP options to send (bitfield) */ + u_int flags; +#define IPCP_HISADDR_SEEN 1 /* have seen his address already */ +#define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */ +#define IPCP_MYADDR_SEEN 4 /* have seen his address already */ +#define IPCP_VJ 8 /* We can use VJ compression */ + int max_state; /* Max-Slot-Id */ + int compress_cid; /* Comp-Slot-Id */ +}; + +#define AUTHNAMELEN 32 +#define AUTHKEYLEN 16 + +struct sauth { + u_short proto; /* authentication protocol to use */ + u_short flags; +#define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */ + /* callouts */ +#define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */ + u_char name[AUTHNAMELEN]; /* system identification name */ + u_char secret[AUTHKEYLEN]; /* secret password */ + u_char challenge[AUTHKEYLEN]; /* random challenge */ +}; + +#define IDX_PAP 2 +#define IDX_CHAP 3 + +#define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */ + +/* + * Don't change the order of this. Ordering the phases this way allows + * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to + * know whether LCP is up. + */ +enum ppp_phase { + PHASE_DEAD, PHASE_ESTABLISH, PHASE_TERMINATE, + PHASE_AUTHENTICATE, PHASE_NETWORK +}; + +struct sppp { + /* NB: pp_if _must_ be first */ + struct ifnet pp_if; /* network interface data */ + struct ifqueue pp_fastq; /* fast output queue */ + struct ifqueue pp_cpq; /* PPP control protocol queue */ + struct sppp *pp_next; /* next interface in keepalive list */ + u_int pp_mode; /* major protocol modes (cisco/ppp/...) */ + u_int pp_flags; /* sub modes */ + u_short pp_alivecnt; /* keepalive packets counter */ + u_short pp_loopcnt; /* loopback detection counter */ + u_long pp_seq; /* local sequence number */ + u_long pp_rseq; /* remote sequence number */ + time_t pp_last_sent; + time_t pp_last_recv; + enum ppp_phase pp_phase; /* phase we're currently in */ + int state[IDX_COUNT]; /* state machine */ + u_char confid[IDX_COUNT]; /* id of last configuration request */ + int rst_counter[IDX_COUNT]; /* restart counter */ + int fail_counter[IDX_COUNT]; /* negotiation failure counter */ +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */ + struct callout_handle pap_my_to_ch; /* PAP needs one more... */ +#endif + struct slcp lcp; /* LCP params */ + struct sipcp ipcp; /* IPCP params */ + struct sauth myauth; /* auth params, i'm peer */ + struct sauth hisauth; /* auth params, i'm authenticator */ +#ifdef SPPP_VJ + int enable_vj; /* enable VJ negotiation */ + struct slcompress pp_comp; /* for VJ compression */ +#endif + /* + * These functions are filled in by sppp_attach(), and are + * expected to be used by the lower layer (hardware) drivers + * in order to communicate the (un)availability of the + * communication link. Lower layer drivers that are always + * ready to communicate (like hardware HDLC) can shortcut + * pp_up from pp_tls, and pp_down from pp_tlf. + */ + void (*pp_up)(struct sppp *sp); + void (*pp_down)(struct sppp *sp); + /* + * These functions need to be filled in by the lower layer + * (hardware) drivers if they request notification from the + * PPP layer whether the link is actually required. They + * correspond to the tls and tlf actions. + */ + void (*pp_tls)(struct sppp *sp); + void (*pp_tlf)(struct sppp *sp); + /* + * These (optional) functions may be filled by the hardware + * driver if any notification of established connections + * (currently: IPCP up) is desired (pp_con) or any internal + * state change of the interface state machine should be + * signaled for monitoring purposes (pp_chg). + */ + void (*pp_con)(struct sppp *sp); + void (*pp_chg)(struct sppp *sp, int new_state); + /* These two fields are for use by the lower layer */ + void *pp_lowerp; + int pp_loweri; +}; + +#define PP_KEEPALIVE 0x01 /* use keepalive protocol */ +#define PP_CALLIN 0x08 /* we are being called */ +#define PP_NEEDAUTH 0x10 /* remote requested authentication */ + + +#define PP_MTU 1500 /* default/minimal MRU */ +#define PP_MAX_MRU 2048 /* maximal MRU we want to negotiate */ + +/* + * Definitions to pass struct sppp data down into the kernel using the + * SIOC[SG]IFGENERIC ioctl interface. + * + * In order to use this, create a struct spppreq, fill in the cmd + * field with SPPPIOGDEFS, and put the address of this structure into + * the ifr_data portion of a struct ifreq. Pass this struct to a + * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOCDEFS, + * modify the defs field as desired, and pass the struct ifreq now + * to a SIOCSIFGENERIC ioctl. + */ + +#define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) + sizeof(struct sppp))) +#define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) + sizeof(struct sppp))) + +struct spppreq { + u_long cmd; + struct sppp defs; +}; + +#ifndef SIOCSIFGENERIC +#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ +#endif + +#ifndef SIOCGIFGENERIC +#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ +#endif + +#if defined(KERNEL) || defined(_KERNEL) + +#ifndef USE_ISPPP + +void sppp_attach (struct ifnet *ifp); +void sppp_detach (struct ifnet *ifp); +void sppp_input (struct ifnet *ifp, struct mbuf *m); + +#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003 +int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); +#else +#ifdef __FreeBSD__ +int sppp_ioctl (struct ifnet *ifp, int cmd, void *data); +#else +int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); +#endif +#endif + +struct mbuf *sppp_dequeue (struct ifnet *ifp); +struct mbuf *sppp_pick(struct ifnet *ifp); +int sppp_isempty (struct ifnet *ifp); +void sppp_flush (struct ifnet *ifp); + +#else /* USE_ISPPP */ + +void isppp_attach (struct ifnet *ifp); +void isppp_detach (struct ifnet *ifp); +void isppp_input (struct ifnet *ifp, struct mbuf *m); + +#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003 +int isppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); +#else +#ifdef __FreeBSD__ +int isppp_ioctl (struct ifnet *ifp, int cmd, void *data); +#else +int isppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); +#endif +#endif + +struct mbuf *isppp_dequeue (struct ifnet *ifp); +struct mbuf *isppp_pick(struct ifnet *ifp); +int isppp_isempty (struct ifnet *ifp); +void isppp_flush (struct ifnet *ifp); +#endif /* USE_ISPPP */ + +#endif /* KERNEL */ + +#endif /* _I4B_ISPPP_H_ */ diff --git a/sys/i386/include/i4b_tel_ioctl.h b/sys/i386/include/i4b_tel_ioctl.h index 2cc9e15..0f955af 100644 --- a/sys/i386/include/i4b_tel_ioctl.h +++ b/sys/i386/include/i4b_tel_ioctl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,11 @@ * i4b_tel_ioctl.h telephony interface ioctls * ------------------------------------------ * - * $Id: i4b_tel_ioctl.h,v 1.11 1999/12/13 21:25:28 hm Exp $ + * $Id: i4b_tel_ioctl.h,v 1.13 2000/01/12 14:49:36 hm Exp $ * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 22:07:18 1999] + * last edit-date: [Wed Jan 12 15:47:11 2000] * *---------------------------------------------------------------------------*/ @@ -62,6 +62,19 @@ #define I4B_TEL_VR_REQ _IOR('A', 3, msg_vr_req_t) +/*---------------------------------------------------------------------------* + * send tones out of the tel interface + *---------------------------------------------------------------------------*/ + +#define I4B_TEL_MAXTONES 32 + +struct i4b_tel_tones { + int frequency[I4B_TEL_MAXTONES]; + int duration[I4B_TEL_MAXTONES]; +}; + +#define I4B_TEL_TONES _IOR('A', 4, struct i4b_tel_tones) + /*===========================================================================* * /dev/i4bteld<n> devices (dialer interface) *===========================================================================*/ diff --git a/sys/i386/include/i4b_trace.h b/sys/i386/include/i4b_trace.h index fa1a9a6..24229ec 100644 --- a/sys/i386/include/i4b_trace.h +++ b/sys/i386/include/i4b_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,11 @@ * i4b_trace.h - header file for trace data read device * ---------------------------------------------------- * - * $Id: i4b_trace.h,v 1.7 1999/12/13 21:25:28 hm Exp $ + * $Id: i4b_trace.h,v 1.8 2000/03/08 16:08:18 hm Exp $ * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 22:07:25 1999] + * last edit-date: [Wed Mar 8 16:41:43 2000] * *---------------------------------------------------------------------------*/ @@ -70,8 +70,7 @@ typedef struct { * get/set current trace flag settings *---------------------------------------------------------------------------*/ -#define I4B_TRC_GET _IOR('T', 0, int) /* get trace settings */ -#define I4B_TRC_SET _IOW('T', 1, int) /* set trace settings */ +#define I4B_TRC_SET _IOW('T', 0, int) /* set trace settings */ #define TRACE_OFF 0x00 /* tracing off */ #define TRACE_I 0x01 /* trace L1 INFO's on */ @@ -87,7 +86,7 @@ typedef struct { int txflags; /* d and/or b channel */ } i4b_trace_setupa_t; -#define I4B_TRC_SETA _IOW('T', 2, i4b_trace_setupa_t) /* set analyze mode */ -#define I4B_TRC_RESETA _IOW('T', 3, int) /* reset analyze mode */ +#define I4B_TRC_SETA _IOW('T', 1, i4b_trace_setupa_t) /* set analyze mode */ +#define I4B_TRC_RESETA _IOW('T', 2, int) /* reset analyze mode */ #endif /* _I4B_TRACE_H_ */ |