Remove ISDN from the kernel. It has remained unmaintained for a long time,

is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
isaki-audio2
maxv 2018-09-23 09:20:57 +00:00
parent cb46f03a9f
commit ebec90347e
137 changed files with 128 additions and 23321 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1189 2018/09/23 07:24:19 maxv Exp $
# $NetBSD: mi,v 1.1190 2018/09/23 09:20:57 maxv Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -1213,7 +1213,7 @@
./usr/include/netinet base-c-usr
./usr/include/netinet6 base-c-usr
./usr/include/netipsec base-c-usr
./usr/include/netisdn base-c-usr
./usr/include/netisdn base-obsolete obsolete
./usr/include/netiso base-obsolete obsolete
./usr/include/netkey base-obsolete obsolete
./usr/include/netmpls base-c-usr

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.2229 2018/09/22 12:54:34 rmind Exp $
# $NetBSD: mi,v 1.2230 2018/09/23 09:20:57 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@ -2469,13 +2469,13 @@
./usr/include/netipsec/ipsec_var.h comp-c-include
./usr/include/netipsec/ipsecif.h comp-c-include
./usr/include/netipsec/keydb.h comp-obsolete obsolete
./usr/include/netipsec/keysock.h comp-c-include
./usr/include/netisdn/i4b_cause.h comp-c-include
./usr/include/netisdn/i4b_debug.h comp-c-include
./usr/include/netisdn/i4b_ioctl.h comp-c-include
./usr/include/netisdn/i4b_rbch_ioctl.h comp-c-include
./usr/include/netisdn/i4b_tel_ioctl.h comp-c-include
./usr/include/netisdn/i4b_trace.h comp-c-include
./usr/include/netipsec/keysock.h comp-obsolete obsolete
./usr/include/netisdn/i4b_cause.h comp-obsolete obsolete
./usr/include/netisdn/i4b_debug.h comp-obsolete obsolete
./usr/include/netisdn/i4b_ioctl.h comp-obsolete obsolete
./usr/include/netisdn/i4b_rbch_ioctl.h comp-obsolete obsolete
./usr/include/netisdn/i4b_tel_ioctl.h comp-obsolete obsolete
./usr/include/netisdn/i4b_trace.h comp-obsolete obsolete
./usr/include/netiso/argo_debug.h comp-obsolete obsolete
./usr/include/netiso/clnl.h comp-obsolete obsolete
./usr/include/netiso/clnp.h comp-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1624 2018/09/23 07:24:19 maxv Exp $
# $NetBSD: mi,v 1.1625 2018/09/23 09:20:57 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -1332,24 +1332,24 @@
./usr/share/man/cat4/ipl.0 man-ipf-catman ipfilter,.cat
./usr/share/man/cat4/ipmi.0 man-sys-catman .cat
./usr/share/man/cat4/ipnat.0 man-ipf-catman ipfilter,.cat
./usr/share/man/cat4/ippp.0 man-sys-catman .cat
./usr/share/man/cat4/ippp.0 man-obsolete obsolete
./usr/share/man/cat4/ipsec.0 man-sys-catman .cat
./usr/share/man/cat4/ipsecif.0 man-sys-catman .cat
./usr/share/man/cat4/ipw.0 man-sys-catman .cat
./usr/share/man/cat4/irda.0 man-sys-catman .cat
./usr/share/man/cat4/irframe.0 man-sys-catman .cat
./usr/share/man/cat4/irframetty.0 man-sys-catman .cat
./usr/share/man/cat4/irip.0 man-sys-catman .cat
./usr/share/man/cat4/irip.0 man-obsolete obsolete
./usr/share/man/cat4/irmce.0 man-sys-catman .cat
./usr/share/man/cat4/isa.0 man-sys-catman .cat
./usr/share/man/cat4/isabeep.0 man-sys-catman .cat
./usr/share/man/cat4/isapnp.0 man-sys-catman .cat
./usr/share/man/cat4/isdn.0 man-sys-catman .cat
./usr/share/man/cat4/isdnbchan.0 man-sys-catman .cat
./usr/share/man/cat4/isdncapi.0 man-sys-catman .cat
./usr/share/man/cat4/isdnctl.0 man-sys-catman .cat
./usr/share/man/cat4/isdntel.0 man-sys-catman .cat
./usr/share/man/cat4/isdntrc.0 man-sys-catman .cat
./usr/share/man/cat4/isdn.0 man-obsolete obsolete
./usr/share/man/cat4/isdnbchan.0 man-obsolete obsolete
./usr/share/man/cat4/isdncapi.0 man-obsolete obsolete
./usr/share/man/cat4/isdnctl.0 man-obsolete obsolete
./usr/share/man/cat4/isdntel.0 man-obsolete obsolete
./usr/share/man/cat4/isdntrc.0 man-obsolete obsolete
./usr/share/man/cat4/isic.0 man-obsolete obsolete
./usr/share/man/cat4/ismt.0 man-sys-catman .cat
./usr/share/man/cat4/iso.0 man-obsolete obsolete
@ -4450,24 +4450,24 @@
./usr/share/man/html4/ipl.html man-ipf-htmlman ipfilter,html
./usr/share/man/html4/ipmi.html man-sys-htmlman html
./usr/share/man/html4/ipnat.html man-ipf-htmlman ipfilter,html
./usr/share/man/html4/ippp.html man-sys-htmlman html
./usr/share/man/html4/ippp.html man-obsolete obsolete
./usr/share/man/html4/ipsec.html man-sys-htmlman html
./usr/share/man/html4/ipsecif.html man-sys-htmlman html
./usr/share/man/html4/ipw.html man-sys-htmlman html
./usr/share/man/html4/irda.html man-sys-htmlman html
./usr/share/man/html4/irframe.html man-sys-htmlman html
./usr/share/man/html4/irframetty.html man-sys-htmlman html
./usr/share/man/html4/irip.html man-sys-htmlman html
./usr/share/man/html4/irip.html man-obsolete obsolete
./usr/share/man/html4/irmce.html man-sys-htmlman html
./usr/share/man/html4/isa.html man-sys-htmlman html
./usr/share/man/html4/isabeep.html man-sys-htmlman html
./usr/share/man/html4/isapnp.html man-sys-htmlman html
./usr/share/man/html4/isdn.html man-sys-htmlman html
./usr/share/man/html4/isdnbchan.html man-sys-htmlman html
./usr/share/man/html4/isdncapi.html man-sys-htmlman html
./usr/share/man/html4/isdnctl.html man-sys-htmlman html
./usr/share/man/html4/isdntel.html man-sys-htmlman html
./usr/share/man/html4/isdntrc.html man-sys-htmlman html
./usr/share/man/html4/isdn.html man-obsolete obsolete
./usr/share/man/html4/isdnbchan.html man-obsolete obsolete
./usr/share/man/html4/isdncapi.html man-obsolete obsolete
./usr/share/man/html4/isdnctl.html man-obsolete obsolete
./usr/share/man/html4/isdntel.html man-obsolete obsolete
./usr/share/man/html4/isdntrc.html man-obsolete obsolete
./usr/share/man/html4/isic.html man-obsolete obsolete
./usr/share/man/html4/ismt.html man-sys-htmlman html
./usr/share/man/html4/iso.html man-obsolete obsolete
@ -7406,24 +7406,24 @@
./usr/share/man/man4/ipl.4 man-sys-man ipfilter,.man
./usr/share/man/man4/ipmi.4 man-sys-man .man
./usr/share/man/man4/ipnat.4 man-sys-man ipfilter,.man
./usr/share/man/man4/ippp.4 man-sys-man .man
./usr/share/man/man4/ippp.4 man-obsolete obsolete
./usr/share/man/man4/ipsec.4 man-sys-man .man
./usr/share/man/man4/ipsecif.4 man-sys-man .man
./usr/share/man/man4/ipw.4 man-sys-man .man
./usr/share/man/man4/irda.4 man-sys-man .man
./usr/share/man/man4/irframe.4 man-sys-man .man
./usr/share/man/man4/irframetty.4 man-sys-man .man
./usr/share/man/man4/irip.4 man-sys-man .man
./usr/share/man/man4/irip.4 man-obsolete obsolete
./usr/share/man/man4/irmce.4 man-sys-man .man
./usr/share/man/man4/isa.4 man-sys-man .man
./usr/share/man/man4/isabeep.4 man-sys-man .man
./usr/share/man/man4/isapnp.4 man-sys-man .man
./usr/share/man/man4/isdn.4 man-sys-man .man
./usr/share/man/man4/isdnbchan.4 man-sys-man .man
./usr/share/man/man4/isdncapi.4 man-sys-man .man
./usr/share/man/man4/isdnctl.4 man-sys-man .man
./usr/share/man/man4/isdntel.4 man-sys-man .man
./usr/share/man/man4/isdntrc.4 man-sys-man .man
./usr/share/man/man4/isdn.4 man-obsolete obsolete
./usr/share/man/man4/isdnbchan.4 man-obsolete obsolete
./usr/share/man/man4/isdncapi.4 man-obsolete obsolete
./usr/share/man/man4/isdnctl.4 man-obsolete obsolete
./usr/share/man/man4/isdntel.4 man-obsolete obsolete
./usr/share/man/man4/isdntrc.4 man-obsolete obsolete
./usr/share/man/man4/isic.4 man-obsolete obsolete
./usr/share/man/man4/ismt.4 man-sys-man .man
./usr/share/man/man4/iso.4 man-obsolete obsolete

View File

@ -1,5 +1,5 @@
#!/bin/sh -
# $NetBSD: MAKEDEV.tmpl,v 1.193 2018/09/22 13:48:22 kre Exp $
# $NetBSD: MAKEDEV.tmpl,v 1.194 2018/09/23 09:20:57 maxv Exp $
#
# Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
# All rights reserved.
@ -45,7 +45,6 @@
# lua Lua device
# wscons make wscons devices
# usbs make USB devices
# isdns make ISDN devices
#
# Tapes:
# st* SCSI tapes
@ -187,14 +186,6 @@
# ttyU* USB modems
# ttyY* USB serial adapters
#
# ISDN devices:
# isdn communication between userland isdnd and kernel
# isdnctl control device
# isdnbchan* raw b-channel access
# isdntel* telephony device
# isdnteld* telephony dialout device
# isdntrc* trace device
#
# Video devices:
# bwtwo* monochromatic frame buffer
# cgtwo* 8-bit color frame buffer
@ -927,10 +918,6 @@ usbs)
makedev ugen0 ugen1 ugen2 ugen3
;;
isdns)
makedev isdn isdnctl isdnbchan0 isdnbchan1 isdntel0 isdntel1 isdnteld0 isdnteld1 isdntrc0 isdntrc1
;;
std)
mkdev console c %cons_chr% 0 600
mkdev constty c %cons_chr% 1 600
@ -1724,34 +1711,6 @@ altq)
done
;;
isdn)
mkdev isdn c %isdn_chr% 0
;;
isdnctl)
mkdev isdnctl c %isdnctl_chr% 0
;;
isdnbchan[0-9]*)
unit=${i#isdnbchan}
mkdev isdnbchan$unit c %isdnbchan_chr% $unit
;;
isdnteld[0-9]*)
unit=${i#isdnteld}
mkdev isdnteld$unit c %isdntel_chr% $(($unit + 64))
;;
isdntel[0-9]*)
unit=${i#isdntel}
mkdev isdntel$unit c %isdntel_chr% $unit
;;
isdntrc[0-9]*)
unit=${i#isdntrc}
mkdev isdntrc$unit c %isdntrc_chr% $unit
;;
wsfont)
mkdev wsfont c %wsfont_chr% 0
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.4 2018/04/28 12:45:03 jmcneill Exp $
# $NetBSD: MAKEDEV.conf,v 1.5 2018/09/23 09:20:57 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@ -7,7 +7,7 @@ all_md)
makedev tty0 tty1 plcom0 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev sysmon

View File

@ -1,11 +1,10 @@
# $NetBSD: MAKEDEV.conf,v 1.10 2012/08/16 13:31:24 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.11 2018/09/23 09:20:57 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
makedev tty0 tty1 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev isdns
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.5 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.6 2018/09/23 09:20:57 maxv Exp $
all_md)
makedev wscons sd0 sd1 sd2 sd3 sd4
@ -10,7 +10,7 @@ all_md)
makedev satlink0 speaker mlx0
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev ttyCZ0 ttyCY0
makedev altq

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.11 2014/01/24 23:59:12 martin Exp $
# $NetBSD: MAKEDEV.conf,v 1.12 2018/09/23 09:20:57 maxv Exp $
all_md)
makedev wscons stic0 sd0 sd1 sd2 sd3 sd4
@ -11,7 +11,7 @@ all_md)
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev sysmon
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev ttyCZ0 ttyCY0
makedev agp0

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.23 2016/09/08 14:44:44 nonaka Exp $
# $NetBSD: MAKEDEV.conf,v 1.24 2018/09/23 09:20:58 maxv Exp $
# As of 2003-04-17, the "init" case must not create more than 890 entries.
all_md)
@ -29,7 +29,6 @@ all_md)
makedev satlink0
makedev audio
makedev radio
makedev isdns
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.12 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.13 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons std_amiga fd0 fd1 fd2 fd3 kbd mouse0 mouse1 par0
@ -15,7 +15,6 @@ all_md)
makedev vnd4 vnd5 vnd6
makedev audio speaker
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev isdns
makedev nsmb
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.3 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.4 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons std_amiga fd0 fd1 fd2 fd3 kbd mouse0 mouse1 par0
@ -14,7 +14,6 @@ all_md)
makedev vnd4 vnd5 vnd6
makedev audio speaker
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev isdns
makedev nsmb
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.6 2007/01/15 23:35:11 hubertf Exp $
# $NetBSD: MAKEDEV.conf,v 1.7 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons sd0 sd1 sd2 sd3 sd4
@ -9,7 +9,6 @@ all_md)
makedev ttyv0 pms0 joy0
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
;;
minimal)

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.11 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.12 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev std_atari st0 ttye0 ttye1 ttye2 ttye3 ttye4 ttye5 grf0 grf1
@ -11,7 +11,6 @@ all_md)
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev audio speaker
makedev isdns
makedev wscons
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.8 2012/08/16 13:31:24 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.9 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wt0 fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 sd4
@ -10,7 +10,6 @@ all_md)
makedev ttyv0 wscons
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
makedev bktr
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.9 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.10 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons std_cats fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@ -6,7 +6,7 @@ all_md)
makedev uk0 uk1 ss0
makedev ttyv0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev pci0 pci1

View File

@ -1,11 +1,10 @@
# $NetBSD: MAKEDEV.conf,v 1.15 2018/04/09 20:17:33 christos Exp $
# $NetBSD: MAKEDEV.conf,v 1.16 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wd0 wd1 sd0 sd1 sd2 sd3
makedev st0 st1 ch0 cd0 cd1
makedev ss0 ss1 uk0 uk1
makedev tty00 tty01 tty02 tty03 ttyZ0 ttyZ1
makedev isdns
makedev audio speaker
makedev music rmidi0 rmidi1
makedev scsibus0 scsibus1 scsibus2 scsibus3

View File

@ -1,10 +1,10 @@
# $NetBSD: MAKEDEV.conf,v 1.2 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.3 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
makedev tty0 tty1 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.17 2017/06/02 22:20:21 jmcneill Exp $
# $NetBSD: MAKEDEV.conf,v 1.18 2018/09/23 09:20:58 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@ -8,7 +8,7 @@ all_md)
makedev st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev sysmon

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.8 2017/08/15 10:11:31 mrg Exp $
# $NetBSD: MAKEDEV.conf,v 1.9 2018/09/23 09:20:58 maxv Exp $
# When creating a /dev file system on MFS, init makes a FS that leaves
# only 890 (or so) inodes free. Therefore the "init" case (used by
@ -28,7 +28,7 @@ all_md)
makedev satlink0 speaker mlx0
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev ttyCZ0 ttyCY0
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.10 2016/12/08 11:31:13 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.11 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1
@ -11,7 +11,6 @@ all_md)
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
makedev sysmon
makedev bktr

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.7 2016/12/08 11:31:14 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.8 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 sd4
@ -6,7 +6,7 @@ all_md)
makedev tty0 tty1 tty2
makedev st0 st1 ch0 cd0 cd1
makedev ss0 ch0 uk0 uk1
makedev usbs isdns
makedev usbs
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev ttyTX0 ttyTX1 ucbsnd

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.26 2018/01/05 10:04:13 msaitoh Exp $
# $NetBSD: MAKEDEV.conf,v 1.27 2018/09/23 09:20:59 maxv Exp $
# As of 2005-03-15, the "init" case must not create more than 1024 entries.
all_md)
@ -31,7 +31,6 @@ all_md)
makedev cmos
makedev audio
makedev radio
makedev isdns
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.1 2016/08/05 16:22:08 scole Exp $
# $NetBSD: MAKEDEV.conf,v 1.2 2018/09/23 09:20:59 maxv Exp $
# As of 2005-03-15, the "init" case must not create more than 1024 entries.
all_md)
@ -27,7 +27,6 @@ all_md)
makedev cmos
makedev audio
makedev radio
makedev isdns
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,11 +1,11 @@
# $NetBSD: MAKEDEV.conf,v 1.3 2012/08/16 13:31:25 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.4 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
makedev tty0 tty1 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev sysmon

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.11 2017/11/15 04:31:48 macallan Exp $
# $NetBSD: MAKEDEV.conf,v 1.12 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 wd2 wd3
@ -10,7 +10,6 @@ all_md)
makedev nvram apm adb grf0 openfirm
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7 pci8 pci9 pci10 pci11
makedev pci12 pci13 pci14 pci15 pci16 pci17 pci18 pci19
makedev altq

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.7 2012/08/16 13:31:26 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.8 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev sd0 sd1 sd2 sd3 sd4
@ -8,7 +8,6 @@ all_md)
makedev ss0 ch0 uk0 uk1
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
;;
floppy)

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.5 2012/08/16 13:31:26 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.6 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@ -6,7 +6,7 @@ all_md)
makedev uk0 uk1 ss0
makedev ttyv0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev openfirm
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.9 2012/08/16 13:31:26 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.10 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 fd0 fd1
@ -10,7 +10,6 @@ all_md)
makedev nvram apm adb grf0 openfirm
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
makedev altq sysmon bktr radio kttcp
makedev lpt0 lpt1 lpt2 tun0 tun1

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.2 2016/12/08 11:31:14 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.3 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@ -7,7 +7,7 @@ all_md)
makedev tty0 tty1 plcom0 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev sysmon

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.8 2012/08/16 13:31:26 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.9 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 sd4
@ -12,7 +12,6 @@ all_md)
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
makedev nvram
makedev residual

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.3 2012/08/16 13:31:26 abs Exp $
# $NetBSD: MAKEDEV.conf,v 1.4 2018/09/23 09:20:59 maxv Exp $
all_md)
makedev wscons fd0 fd1 sd0 sd1 sd2 sd3 sd4
@ -12,7 +12,6 @@ all_md)
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev isdns
# makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
# makedev nvram
makedev cfs

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.4 2004/12/02 16:44:28 christos Exp $
# $NetBSD: MAKEDEV.conf,v 1.5 2018/09/23 09:21:00 maxv Exp $
# When creating a /dev file system on MFS, init makes a FS that leaves
# only 890 (or so) inodes free. Therefore the "init" case (used by
@ -25,7 +25,7 @@ all_md)
makedev tty00 tty01
makedev satlink0 mlx0
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev usbs isdns
makedev usbs
makedev ttyCZ0 ttyCY0
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
makedev altq

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.9 2016/12/08 11:31:14 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.10 2018/09/23 09:21:00 maxv Exp $
# When creating a /dev file system on MFS, init makes a FS that leaves
# only 890 (or so) inodes free. Therefore the "init" case (used by
@ -20,7 +20,6 @@ init)
all_md)
makedev init
makedev isdns
makedev audio speaker
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.17 2017/03/26 18:31:52 martin Exp $
# $NetBSD: MAKEDEV.conf,v 1.18 2018/09/23 09:21:00 maxv Exp $
all_md)
makedev std_sparc ttya ttyb ttyc ttyd ttyC00 ttyC01
@ -14,7 +14,6 @@ all_md)
makedev ses0 ses1 ses2 ses3
makedev sysmon
makedev apm apmctl tctrl0
makedev isdns
makedev pci0
makedev wscons
makedev kttcp

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.18 2017/11/15 04:31:48 macallan Exp $
# $NetBSD: MAKEDEV.conf,v 1.19 2018/09/23 09:21:00 maxv Exp $
all_md)
makedev std_sparc64 ttya ttyb ttyc ttyd ttyC00 ttyC01
@ -16,7 +16,6 @@ all_md)
makedev sysmon
makedev usbs
makedev radio
makedev isdns
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7 pci8 pci9 pci10 pci11
makedev pci12 pci13 pci14 pci15 pci16 pci17 pci18 pci19
makedev altq

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.15 2016/12/08 11:31:15 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.16 2018/09/23 09:21:00 maxv Exp $
all_md)
makedev std_x68k st0 st1 ttye0 ttye1 mouse0 mouse1
@ -13,7 +13,6 @@ all_md)
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3
makedev sysmon
makedev isdns
makedev usbs
;;

View File

@ -1,11 +1,11 @@
# $NetBSD: MAKEDEV.conf,v 1.10 2016/12/08 11:31:15 nat Exp $
# $NetBSD: MAKEDEV.conf,v 1.11 2018/09/23 09:21:00 maxv Exp $
all_md)
makedev wscons wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 ld0
makedev tty0 tty1 st0 st1 ch0 cd0 cd1
makedev uk0 uk1 ss0
makedev lpa0 lpt0
makedev usbs isdns
makedev usbs
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
makedev scsibus0 scsibus1 scsibus2 scsibus3
makedev ses0 ses1 ses2 ses3

View File

@ -1,4 +1,4 @@
# $NetBSD: NetBSD.dist.base,v 1.176 2018/09/23 07:24:19 maxv Exp $
# $NetBSD: NetBSD.dist.base,v 1.177 2018/09/23 09:21:00 maxv Exp $
# @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
# Do not customize this file as it may be overwritten on upgrades.
@ -219,7 +219,6 @@
./usr/include/net80211
./usr/include/netinet6
./usr/include/netipsec
./usr/include/netisdn
./usr/include/netpgp
./usr/include/netsmb
./usr/include/nfs

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.671 2018/09/22 16:22:22 maxv Exp $
# $NetBSD: Makefile,v 1.672 2018/09/23 09:21:00 maxv Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@ -144,10 +144,6 @@ MAN += hil.4 hilkbd.4 hilid.4 hilms.4
# IPv6/IPsec
MAN+= faith.4 gif.4 inet6.4 icmp6.4 ip6.4 ipsec.4 ipsecif.4 stf.4
# ISDN devices
MAN+= isdntrc.4 isdntel.4 isdnbchan.4 ippp.4 irip.4 isdnctl.4 isdn.4 \
isdncapi.4
# onewire bus and devices
MAN+= gpioow.4 onewire.4 owtemp.4

View File

@ -1,139 +0,0 @@
.\" $NetBSD: ippp.4,v 1.10 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" 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
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: ippp.4,v 1.10 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Thu Aug 31 10:40:17 2000]
.\"
.Dd August 31, 2000
.Dt IPPP 4
.Os
.Sh NAME
.Nm ippp
.Nd ISDN synchronous PPP network driver
.Sh SYNOPSIS
.Cd "pseudo-device ippp" Ar count
.Sh DESCRIPTION
The
.Nm
driver interfaces the IP subsystem of the operating system with the
ISDN layer so that a transport of IP packets over an ISDN link
is possible.
.Pp
For configuration of the
.Nm
driver, either the
.Xr ipppctl 8
utility is used or it is configured via
.Xr isdnd 8
and its associated
.Xr isdnd.rc 5
file.
.Pp
In case an IP packet for a remote side arrives in the driver and no
connection is established yet, the driver communicates with the
.Xr isdnd 8
daemon to establish a connection.
.Pp
The driver has support for interfacing to the
.Xr bpf 4
subsystem for using
.Xr tcpdump 8
with the
.Nm
interfaces.
.Pp
The
.Xr ipppctl 8
utility is used to configure all aspects of PPP required to connect to a
remote site.
.Ss LINK0 and LINK1
The
.Em link0
and
.Em link1
flags given as parameters to
.Xr ifconfig 8
have the following meaning for the
.Nm
devices:
.Bl -tag -width link0
.It Li link0
Wait passively for connection.
The administrative
.Em Open
event to the Link Control Protocol (LCP) layer will be delayed until
after the lower layers signal an
.Em Up
event (rise of
.Dq carrier ) .
This can be used by lower layers to support a dial-in connection where
the physical layer isn't available immediately at startup, but only
after some external event arrives.
Receipt of a
.Em Down
event from the lower layer will not take the interface completely down
in this case.
.It Li link1
Dial-on-demand mode.
The administrative
.Em Open
event to the LCP layer will be delayed until either an outbound
network packet arrives, or until the lower layer signals an
.Em Up
event, indicating an inbound connection.
As with passive mode, receipt of a
.Em Down
event (loss of carrier) will not automatically take the interface
down, thus it remains available for further connections.
.El
.Pp
The
.Em link0
flag is set to
.Em off
by default, the
.Em link1
flag to
.Em on .
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr isdnd.rc 5 ,
.Xr ipppctl 8 ,
.Xr isdnd 8 ,
.Xr tcpdump 8
.Sh AUTHORS
.An -nosplit
The
.Nm
device driver was written by
.An Joerg Wunsch Aq Mt joerg@freebsd.org
and then added to ISDN4BSD by
.An Gary Jennejohn Aq Mt gary@freebsd.org .
.Pp
This man page was written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,99 +0,0 @@
.\" $NetBSD: irip.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: irip.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:10:25 1999]
.\"
.Dd July 6, 1998
.Dt IRIP 4
.Os
.Sh NAME
.Nm irip
.Nd Raw IP over ISDN network driver
.Sh SYNOPSIS
.Cd "pseudo-device irip" Ar count
.Sh DESCRIPTION
The
.Nm
driver interfaces the IP subsystem of the operating system with the
ISDN layer so that transport of IP packets over an ISDN link
is possible.
.Pp
The driver just packs IP packets without anything appended or prepended
into raw HDLC packets on the B channel and transfers them to a remote site.
IP packets received from the remote site are queued into the local IP
protocol stack.
.Pp
The format of the resulting packet on the B channel is:
.Pp
.Dl (HDLC opening flag) (IP-packet) (CRC) (HDLC closing flag)
.Pp
In the case where an IP packet for a remote site arrives in the driver and no
connection has been established yet, the driver communicates with the
.Xr isdnd 8
daemon to establish a connection.
.Pp
The driver has support for interfacing to the
.Xr bpf 4
subsystem for using
.Xr tcpdump 8
with the
.Nm
interfaces.
.Pp
The driver optionally (when compiled with the IRIP_VJ option) provides Van
Jacobson header compression, under control of the link0 and link1 options to
.Xr ifconfig 8 :
.Pp
.Bl -tag -width 15n -offset indent -compact
.It link0
Apply VJ compression to outgoing packets on this interface, and assume that
incoming packets require decompression.
.It link1
Check incoming packets for Van Jacobson compression; if they appear to be
compressed, automatically set link0.
.El
.Pp
The default values are
.Em on
for
.Em link1
and
.Em off
for
.Em link0 .
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr isdnd.rc 5 ,
.Xr isdnd 8 ,
.Xr tcpdump 8
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,109 +0,0 @@
.\" $NetBSD: isdn.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdn.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:09:12 1999]
.\"
.Dd February 3, 1998
.Dt ISDN 4
.Os
.Sh NAME
.Nm isdn
.Nd ISDN kernel to userland master device
.Sh SYNOPSIS
.Cd "pseudo-device isdn"
.Sh DESCRIPTION
The
.Nm
device driver is used by the
.Xr isdnd 8
daemon to exchange messages with the ISDN kernel part for the purpose
of call establishment, control and disconnection and to access various
control and status information.
.Pp
The messages and message parameters are documented in the include
file
.Pa /usr/include/netisdn/i4b_ioctl.h .
.Pp
The available ioctl's are:
.Pp
.Bl -tag -width Ds -compact -offset indent
.It Ar I4B_CDID_REQ
Request a unique Call Description IDentifier (cdid) which identifies
uniquely a single interaction of the local D channel with the exchange.
.It Ar I4B_CONNECT_REQ
Actively request a call setup to a remote ISDN subscriber.
.It Ar I4B_CONNECT_RESP
Respond to an incoming call, either accept, reject or ignore it.
.It Ar I4B_DISCONNECT_REQ
Actively terminate a connection.
.It Ar I4B_CTRL_INFO_REQ
Request information about an installed ISDN controller card.
.It Ar I4B_DIALOUT_RESP
Give information about call setup to driver who requested dialing out.
.It Ar I4B_TIMEOUT_UPD
Update the kernels timeout value(s) in case of dynamically calculated
shorthold mode timing changes.
.It Ar I4B_UPDOWN_IND
Inform the kernel userland drivers about interface soft up/down status
changes.
.It Ar I4B_CTRL_DOWNLOAD
Download firmware to active card(s).
.It Ar I4B_ACTIVE_DIAGNOSTIC
Return diagnostic information from active cards.
.El
.Pp
Status and event messages available from the kernel are:
.Pp
.Bl -tag -width Ds -compact -offset indent
.It Ar MSG_CONNECT_IND
An incoming call from a remote ISDN user is indicated.
.It Ar MSG_CONNECT_ACTIVE_IND
After an incoming call has been accepted locally or an outgoing call has
been accepted by a remote, the exchange signaled an active connection
and the corresponding B-channel is switched through.
.It Ar MSG_DISCONNECT_IND
A call was terminated.
.It Ar MSG_DIALOUT_IND
A userland interface driver requests the daemon to dial out (typically a
network interface when a packet arrives in its send queue).
.It Ar MSG_IDLE_TIMEOUT_IND
A call was terminated by the isdn4bsd kernel driver because a B-channel
idle timeout occurred.
.It Ar MSG_ACCT_IND
Accounting information from a network driver.
.It Ar MSG_CHARGING_IND
Charging information from the kernel.
.El
.Sh SEE ALSO
.Xr isdnd 8
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,51 +0,0 @@
.\" $NetBSD: isdnbchan.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdnbchan.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:13:04 1999]
.\"
.Dd February 3, 1998
.Dt ISDNBCHAN 4
.Os
.Sh NAME
.Nm isdnbchan
.Nd ISDN Raw B-Channel access driver
.Sh SYNOPSIS
.Cd "pseudo-device isdnbchan" Ar count
.Sh DESCRIPTION
The
.Nm
driver provides an interface to the raw untranslated B-channel.
.Sh SEE ALSO
.Xr isdnd.rc 5 ,
.Xr isdnd 8
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,62 +0,0 @@
.\" $NetBSD: isdncapi.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 2001 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/usr.sbin/i4b/man/i4bcapi.4,v 1.2 2001/05/25 09:54:38 ru Exp $
.\"
.\" last edit-date: [Fri May 25 09:38:45 2001]
.\"
.Dd September 25, 2003
.Dt ISDNCAPI 4
.Os
.Sh NAME
.Nm isdncapi
.Nd CAPI driver for isdn4bsd
.Sh DESCRIPTION
.Nm
is a CAPI driver for the
.Em isdn4bsd
package.
It sits between layer\~4 of isdn4bsd and a driver for an active
ISDN card; currently only the
.Xr iavc 4
driver for the AVM B1 and T1 family of active cards is supported.
.Sh SEE ALSO
.Xr iavc 4
.Sh STANDARDS
.Pq Lk http://www.capi.org/ "CAPI 2.0"
.Sh AUTHORS
.An -nosplit
The
.Nm
device driver was written by
.An Juha-Matti Liukkonen Aq Mt jml@cubical.fi
(Cubical Solutions Ltd, Finland) for
.Fx
and ported to
.Nx
by
.An Antti Kantee Aq Mt pooka@cubical.fi .
This manpage was written by
.An Hellmuth Michaelis Aq Mt hm@FreeBSD.org .

View File

@ -1,52 +0,0 @@
.\" $NetBSD: isdnctl.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdnctl.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:09:46 1999]
.\"
.Dd February 3, 1998
.Dt ISDNCTL 4
.Os
.Sh NAME
.Nm isdnctl
.Nd control device for the ISDN kernel part
.Sh SYNOPSIS
.Cd "pseudo-device isdnctl"
.Sh DESCRIPTION
.Nm
is used by the
.Xr isdndebug 8
utility to get and set the current debugging level and other information
of the kernel ISDN handling layers.
.Sh SEE ALSO
.Xr isdndebug 8
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,135 +0,0 @@
.\" $NetBSD: isdntel.4,v 1.8 2017/07/03 21:30:58 wiz Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdntel.4,v 1.8 2017/07/03 21:30:58 wiz Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:13:39 1999]
.\"
.Dd April 21, 1999
.Dt ISDNTEL 4
.Os
.Sh NAME
.Nm isdntel
.Nd ISDN B-channel telephony interface driver
.Sh SYNOPSIS
.Cd "pseudo-device isdntel" Ar count
.Sh DESCRIPTION
The
.Nm
driver provides an interface to the B-channel for telephony applications
and is currently used by the
.Xr isdnd 8
for answering machine support. The driver is part of the isdn4bsd package.
.Pp
The lower six bits of the driver's minor number are used to specify a
unit number, whereas the upper two bits specify a functionality.
.Pp
Functionality zero is the usual telephony data stream i/o driver.
.Pp
Functionality one is used to enable commands to dial out and hang up and
receive responses about the state of the dial out progress and status.
This commands may change in the future, for details see the file
.Pa /usr/include/netisdn/i4b_tel_ioctl.h
and the
.Xr isdntel 8
utility.
.Pp
The telephony data stream comes out of the line in a bit-reversed format,
so the
.Nm
driver does the bit-reversion process in any case.
.Pp
Additionally, the user can specify to do A-law to mu-law, mu-law to A-law
or no conversion at all in the
.Nm
driver by using the
.Xr isdntelctl 8
utility.
.Pp
The driver is able to process several ioctl's:
.Pp
.Bl -tag -width Ds -compact -offset indent
.It Ar I4B_TEL_GETAUDIOFMT
get currently used audio format conversion.
.It Ar I4B_TEL_SETAUDIOFMT
set currently used audio format conversion.
.It Ar I4B_TEL_EMPTYINPUTQUEUE
clear the input queue.
.El
.Pp
For the I4B_TEL_GETAUDIOFMT and I4B_TEL_SETAUDIOFMT, the following
parameters are available:
.Pp
.Bl -tag -width Ds -compact -offset indent
.It Ar CVT_NONE
do no A-law/mu-law audio format conversion. The conversion path looks like
this:
.Pp
USER <--> bitreversing <--> ISDN-line
.Pp
.It Ar CVT_ALAW2ULAW
set audio format conversion to do an audio conversion from A-law
(on the ISDN line) to mu-law (in the userland).
The
.Xr read 2
conversion path looks like this:
.Pp
USER <-- mu-law/A-law <-- bitreversing <-- ISDN-line
.Pp
and the
.Xr write 2
conversion path looks like this:
.Pp
USER --> mu-law/A-law --> bitreversing --> ISDN-line
.Pp
.It Ar CVT_ULAW2ALAW
set audio format conversion to do an audio conversion from mu-law
(on the ISDN line) to A-law (in the userland).
The
.Xr read 2
conversion path looks like this:
.Pp
USER <-- A-law/mu-law <-- bitreversing <-- ISDN-line
.Pp
and the
.Xr write 2
conversion path looks like this:
.Pp
USER --> A-law/mu-law --> bitreversing --> ISDN-line
.El
.Sh SEE ALSO
.Xr isdnd.rc 5 ,
.Xr isdnd 8 ,
.Xr isdntel 8 ,
.Xr isdntelctl 8
.Sh STANDARDS
A-law and mu-law are specified in ITU Recommendation G.711.
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,57 +0,0 @@
.\" $NetBSD: isdntrc.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: isdntrc.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
.\"
.\" $FreeBSD$
.\"
.\" last edit-date: [Mon Dec 13 23:14:19 1999]
.\"
.Dd July 30, 1999
.Dt ISDNTRC 4
.Os
.Sh NAME
.Nm isdntrc
.Nd ISDN interface driver for D and B channel tracing
.Sh SYNOPSIS
.Cd "pseudo-device isdntrc" Ar count
.Sh DESCRIPTION
The
.Nm
driver is used to add a header to the data got from the D and/or B channel
and queues it to be read and further processed by the
.Xr isdntrace 8
utility.
Currently,
.Ar count
should be the number of B channels (twice the number of cards).
.Sh SEE ALSO
.Xr isdnd 8 ,
.Xr isdntrace 8
.Sh AUTHORS
The
.Nm
device driver and this man page were written by
.An Hellmuth Michaelis Aq Mt hm@kts.org .

View File

@ -1,4 +1,4 @@
.\" $NetBSD: rc.conf.5,v 1.173 2018/09/23 07:24:20 maxv Exp $
.\" $NetBSD: rc.conf.5,v 1.174 2018/09/23 09:21:00 maxv Exp $
.\"
.\" Copyright (c) 1996 Matthew R. Green
.\" All rights reserved.
@ -55,7 +55,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 12, 2018
.Dd September 23, 2018
.Dt RC.CONF 5
.Os
.Sh NAME
@ -280,8 +280,6 @@ events.
.Pp
All active
.Xr pppoe 4
and
.Xr ippp 4
interfaces will be automatically added to this list.
.It Sy hostname
A string.

View File

@ -1,4 +1,4 @@
.\" $NetBSD: src.7,v 1.14 2018/09/06 09:44:09 maxv Exp $
.\" $NetBSD: src.7,v 1.15 2018/09/23 09:21:00 maxv Exp $
.\"
.\" Copyright (c) 2012, 2013 Mingzhe Wang and Elvira Khabirova.
.\" All rights reserved.
@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 6, 2018
.Dd September 23, 2018
.Dt SRC 7
.Os
.Sh NAME
@ -302,9 +302,6 @@ IPv6 protocol stack.
.It Pa netipsec/
IPsec protocol stack
.Xr ipsec 4 .
.It Pa netisdn/
ISDN protocol stack
.Xr isdn 4 .
.It Pa netmpls/
MPLS protocol stack
.Xr mpls 4 .

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ioctl.9,v 1.32 2017/07/03 21:28:48 wiz Exp $
.\" $NetBSD: ioctl.9,v 1.33 2018/09/23 09:21:00 maxv Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 11, 2010
.Dd September 23, 2018
.Dt IOCTL 9
.Os
.Sh NAME
@ -74,8 +74,6 @@ can be one of
.Bl -tag -width xxxxx -compact
.It '1'
pulse-per-second interface
.It '4'
.Xr isdn 4
.It 'a'
ISO networking
.It 'A'
@ -87,8 +85,6 @@ Advanced Power Management (hpcmips, i386, sparc), see
ADB devices (mac68k, macppc)
.It 'A'
.Xr audio 4
.It 'A'
.Xr isdntel 4
.It 'b'
.Xr \&tb 4
.It 'b'
@ -112,8 +108,6 @@ coda
.Xr \&ch 4
.It 'C'
clock devices (amiga, atari, hp300, x68k)
.It 'C'
.Xr isdnctl 4
.It 'd'
the disk subsystem
.It 'E'
@ -187,8 +181,6 @@ the routing subsystem
.It 'r'
.Xr \&md 4
.It 'R'
.Xr isdnbchan 4
.It 'R'
.Xr rnd 4
.It 's'
the socket layer

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.82 2018/09/06 19:19:44 maxv Exp $
# $NetBSD: Makefile,v 1.83 2018/09/23 09:21:01 maxv Exp $
.include <bsd.own.mk>
SUBDIR= altq arch compat dev fs miscfs \
net net80211 netatalk netbt netcan netipsec netinet netinet6 \
netisdn netmpls netsmb \
netmpls netsmb \
nfs opencrypto sys ufs uvm
# interrupt implementation depends on the kernel within the port

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.aarch64,v 1.2 2015/04/23 23:22:51 pgoyette Exp $
# $NetBSD: majors.aarch64,v 1.3 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for arm32
#
@ -72,11 +72,6 @@ device-major urio char 75 urio
device-major uscanner char 76 uscanner
device-major openfirm char 77 openfirm
device-major biconsdev char 78 biconsdev
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnrchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major sacom char 84 sacom
device-major mly char 85 mly
device-major wsfont char 86 wsfont
@ -99,7 +94,6 @@ device-major apm char 103 apm
device-major sscom char 104 sscom
device-major imxcom char 104 imxuart
device-major ksyms char 105 ksyms
device-major isdnbchan char 106 isdnbchan
device-major epcom char 107 epcom
device-major tslcd char 108 tslcd
device-major twe char 109 twe

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.acorn32,v 1.25 2011/06/30 20:09:17 wiz Exp $
# $NetBSD: majors.acorn32,v 1.26 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for acorn32
#
@ -52,11 +52,6 @@ device-major raid char 71 block 71 raid
device-major wsmux char 73 wsmux
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnbchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major clockctl char 84 clockctl
device-major ksyms char 86 ksyms
device-major wsfont char 87 wsfont

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.algor,v 1.23 2016/12/08 11:31:09 nat Exp $
# $NetBSD: majors.algor,v 1.24 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for algor
#
@ -46,11 +46,6 @@ device-major ulpt char 47 ulpt
device-major ugen char 48 ugen
device-major midi char 49 midi
device-major sequencer char 50 sequencer
device-major isdn char 51 isdn
device-major isdnctl char 52 isdnctl
device-major isdnbchan char 53 isdnbchan
device-major isdntrc char 54 isdntrc
device-major isdntel char 55 isdntel
device-major wsmux char 56 wsmux
device-major ucom char 57 ucom
device-major ses char 58 ses

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.alpha,v 1.30 2016/12/08 11:31:09 nat Exp $
# $NetBSD: majors.alpha,v 1.31 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for alpha
#
@ -47,11 +47,6 @@ device-major ulpt char 47 ulpt
device-major ugen char 48 ugen
device-major midi char 49 midi
device-major sequencer char 50 sequencer
device-major isdn char 51 isdn
device-major isdnctl char 52 isdnctl
device-major isdnbchan char 53 isdnbchan
device-major isdntrc char 54 isdntrc
device-major isdntel char 55 isdntel
device-major wsmux char 56 wsmux
device-major ucom char 57 ucom
device-major ses char 58 ses

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.106 2018/09/22 16:22:22 maxv Exp $
# $NetBSD: ALL,v 1.107 2018/09/23 09:21:01 maxv Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "ALL-$Revision: 1.106 $"
#ident "ALL-$Revision: 1.107 $"
maxusers 64 # estimated number of users
@ -1892,7 +1892,6 @@ options DL_DEBUG
options DMAC_DEBUG
options DMA_DEBUG
options DMCDEBUG
options DO_I4B_MAXDEBUG
options DRACORAWKEYDEBUG
options EARLY_DEBUG_EVENT
options EBUS_DEBUG
@ -1960,9 +1959,6 @@ options HP_DEBUG
options HSCXADEBUG
options HSCXBDEBUG
options I2ODEBUG
options I4BISPPPDEBUG
options I4B_MBUF_DEBUG
options I4B_MBUF_TYPE_DEBUG
options ICONV_DEBUG
options ICP_DEBUG
options IEDEBUG

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.amd64,v 1.27 2017/01/12 05:24:36 ryo Exp $
# $NetBSD: majors.amd64,v 1.28 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for amd64
#
@ -41,11 +41,6 @@ device-major rnd char 46 rnd
device-major wsdisplay char 47 wsdisplay
device-major wskbd char 48 wskbd
device-major wsmouse char 49 wsmouse
device-major isdn char 50 isdn
device-major isdnctl char 51 isdnctl
device-major isdnbchan char 52 isdnbchan
device-major isdntrc char 53 isdntrc
device-major isdntel char 54 isdntel
device-major usb char 55 usb
device-major uhid char 56 uhid
device-major ulpt char 57 ulpt

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.amiga,v 1.23 2011/10/07 08:44:21 rkujawa Exp $
# $NetBSD: majors.amiga,v 1.24 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for amiga
#
@ -41,11 +41,6 @@ device-major audio char 41 audio
device-major rnd char 42 rnd
device-major md char 43 block 15 md
device-major scsibus char 44 scsibus
device-major isdn char 45 isdn
device-major isdnctl char 46 isdnctl
device-major isdnbchan char 47 isdnbchan
device-major isdntrc char 48 isdntrc
device-major isdntel char 49 isdntel
device-major raid char 50 block 16 raid
device-major svr4_net char 51 compat_svr4
device-major wd char 52 block 17 wd

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.amigappc,v 1.5 2011/06/30 20:09:19 wiz Exp $
# $NetBSD: majors.amigappc,v 1.6 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for amigappc
#
@ -41,11 +41,6 @@ device-major audio char 41 audio
device-major rnd char 42 rnd
device-major md char 43 block 15 md
device-major scsibus char 44 scsibus
device-major isdn char 45 isdn
device-major isdnctl char 46 isdnctl
device-major isdnbchan char 47 isdnbchan
device-major isdntrc char 48 isdntrc
device-major isdntel char 49 isdntel
device-major raid char 50 block 16 raid
device-major svr4_net char 51 compat_svr4
device-major wd char 52 block 17 wd

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.arc,v 1.24 2011/06/30 20:09:19 wiz Exp $
# $NetBSD: majors.arc,v 1.25 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for arc
#
@ -39,11 +39,6 @@ device-major rnd char 33 rnd
device-major ss char 34 ss
device-major ses char 35 ses
device-major ch char 36 ch
device-major isdn char 37 isdn
device-major isdnctl char 38 isdnctl
device-major isdnbchan char 39 isdnbchan
device-major isdntrc char 40 isdntrc
device-major isdntel char 41 isdntel
device-major clockctl char 52 clockctl
device-major cgd char 54 block 10 cgd

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.arm32,v 1.37 2015/04/23 23:22:51 pgoyette Exp $
# $NetBSD: majors.arm32,v 1.38 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for arm32
#
@ -72,11 +72,6 @@ device-major urio char 75 urio
device-major uscanner char 76 uscanner
device-major openfirm char 77 openfirm
device-major biconsdev char 78 biconsdev
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnrchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major sacom char 84 sacom
device-major mly char 85 mly
device-major wsfont char 86 wsfont
@ -100,7 +95,6 @@ device-major apm char 103 apm
device-major sscom char 104 sscom
device-major imxcom char 104 imxuart
device-major ksyms char 105 ksyms
device-major isdnbchan char 106 isdnbchan
device-major epcom char 107 epcom
device-major tslcd char 108 tslcd
device-major twe char 109 twe

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.atari,v 1.22 2011/06/30 20:09:20 wiz Exp $
# $NetBSD: majors.atari,v 1.23 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for atari
#
@ -42,11 +42,6 @@ device-major et char 40 et
device-major wsdisplay char 41 wsdisplay
device-major audio char 42 audio
device-major isdn char 44 isdn
device-major isdnctl char 45 isdnctl
device-major isdnbchan char 46 isdnbchan
device-major isdntrc char 47 isdntrc
device-major isdntel char 48 isdntel
device-major scsibus char 49 scsibus
device-major raid char 50 block 15 raid
device-major svr4_net char 51 compat_svr4

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.bebox,v 1.26 2016/12/08 11:31:09 nat Exp $
# $NetBSD: majors.bebox,v 1.27 2018/09/23 09:21:01 maxv Exp $
#
# Device majors for bebox
#
@ -49,11 +49,6 @@ device-major wsmouse char 49 wsmouse
device-major scsibus char 50 scsibus
device-major raid char 51 block 18 raid
device-major wsmux char 52 wsmux
device-major isdn char 53 isdn
device-major isdnctl char 54 isdnctl
device-major isdnbchan char 55 isdnbchan
device-major isdntrc char 56 isdntrc
device-major isdntel char 57 isdntel
device-major clockctl char 58 clockctl
device-major cgd char 60 block 19 cgd
device-major ksyms char 61 ksyms

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.cobalt,v 1.30 2011/06/30 20:09:22 wiz Exp $
# $NetBSD: majors.cobalt,v 1.31 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for cobalt
#
@ -30,11 +30,6 @@ device-major scsibus char 24 scsibus
device-major ses char 25 ses
device-major com char 26 com
device-major ld char 27 block 10 ld
device-major isdn char 28 isdn
device-major isdnctl char 29 isdnctl
device-major isdnbchan char 30 isdnbchan
device-major isdntrc char 31 isdntrc
device-major isdntel char 32 isdntel
device-major clockctl char 33 clockctl
device-major cgd char 35 block 11 cgd
device-major panel char 36 panel

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.epoc32,v 1.2 2015/04/23 23:22:51 pgoyette Exp $
# $NetBSD: majors.epoc32,v 1.3 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for epoc32
#
@ -72,11 +72,6 @@ device-major urio char 75 urio
device-major uscanner char 76 uscanner
device-major openfirm char 77 openfirm
device-major biconsdev char 78 biconsdev
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnrchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major sacom char 84 sacom
device-major mly char 85 mly
device-major wsfont char 86 wsfont
@ -98,7 +93,6 @@ device-major dmoverio char 102 dmoverio
device-major apmdev char 103 apmdev
device-major sscom char 104 sscom
device-major ksyms char 105 ksyms
device-major isdnbchan char 106 isdnbchan
device-major epcom char 107 epcom
device-major tslcd char 108 tslcd
device-major twe char 109 twe

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.evbmips,v 1.30 2016/12/08 11:31:10 nat Exp $
# $NetBSD: majors.evbmips,v 1.31 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for evbmips
#
@ -48,11 +48,6 @@ device-major ulpt char 47 ulpt
device-major ugen char 48 ugen
device-major midi char 49 midi
device-major sequencer char 50 sequencer
device-major isdn char 51 isdn
device-major isdnctl char 52 isdnctl
device-major isdnbchan char 53 isdnbchan
device-major isdntrc char 54 isdntrc
device-major isdntel char 55 isdntel
device-major wsmux char 56 wsmux
device-major ucom char 57 ucom
device-major ses char 58 ses

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.evbppc,v 1.32 2015/04/23 23:22:51 pgoyette Exp $
# $NetBSD: majors.evbppc,v 1.33 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for evbppc
# (When possible, make entries the same as macppc)
@ -55,11 +55,6 @@ device-major sequencer char 50 sequencer
device-major urio char 51 urio
device-major uscanner char 52 uscanner
# char 53
device-major isdn char 54 isdn
device-major isdnctl char 55 isdnctl
device-major isdnbchan char 56 isdnbchan
device-major isdntrc char 57 isdntrc
device-major isdntel char 58 isdntel
device-major ld char 59 block 13 ld
device-major pci char 60 pci
device-major clockctl char 61 clockctl

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.hpcarm,v 1.13 2015/04/23 23:22:51 pgoyette Exp $
# $NetBSD: majors.hpcarm,v 1.14 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for hpcarm
#
@ -72,11 +72,6 @@ device-major urio char 75 urio
device-major uscanner char 76 uscanner
device-major openfirm char 77 openfirm
device-major biconsdev char 78 biconsdev
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnrchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major sacom char 84 sacom
device-major mly char 85 mly
device-major wsfont char 86 wsfont
@ -98,7 +93,6 @@ device-major dmoverio char 102 dmoverio
device-major apmdev char 103 apmdev
device-major sscom char 104 sscom
device-major ksyms char 105 ksyms
device-major isdnbchan char 106 isdnbchan
device-major epcom char 107 epcom
device-major tslcd char 108 tslcd
device-major twe char 109 twe

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.hpcmips,v 1.31 2011/06/30 20:09:31 wiz Exp $
# $NetBSD: majors.hpcmips,v 1.32 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for hpcmips
#
@ -44,11 +44,6 @@ device-major ucom char 37 ucom
device-major wsmux char 38 wsmux
device-major urio char 39 urio
device-major uscanner char 40 uscanner
device-major isdn char 41 isdn
device-major isdnctl char 42 isdnctl
device-major isdnbchan char 43 isdnbchan
device-major isdntrc char 44 isdntrc
device-major isdntel char 45 isdntel
device-major clockctl char 46 clockctl
device-major audio char 48 audio
device-major cgd char 50 block 10 cgd

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.456 2018/09/22 16:22:23 maxv Exp $
# $NetBSD: ALL,v 1.457 2018/09/23 09:21:02 maxv Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "ALL-$Revision: 1.456 $"
#ident "ALL-$Revision: 1.457 $"
maxusers 64 # estimated number of users
@ -2024,7 +2024,6 @@ options DL_DEBUG
options DMAC_DEBUG
options DMA_DEBUG
options DMCDEBUG
options DO_I4B_MAXDEBUG
options DRACORAWKEYDEBUG
options EARLY_DEBUG_EVENT
options EBUS_DEBUG
@ -2092,9 +2091,6 @@ options HP_DEBUG
options HSCXADEBUG
options HSCXBDEBUG
options I2ODEBUG
options I4BISPPPDEBUG
options I4B_MBUF_DEBUG
options I4B_MBUF_TYPE_DEBUG
options ICONV_DEBUG
options ICP_DEBUG
options IEDEBUG

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.i386,v 1.46 2017/01/12 05:24:36 ryo Exp $
# $NetBSD: majors.i386,v 1.47 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for i386
#
@ -47,11 +47,6 @@ device-major rnd char 46 rnd
device-major wsdisplay char 47 wsdisplay
device-major wskbd char 48 wskbd
device-major wsmouse char 49 wsmouse
device-major isdn char 50 isdn
device-major isdnctl char 51 isdnctl
device-major isdnbchan char 52 isdnbchan
device-major isdntrc char 53 isdntrc
device-major isdntel char 54 isdntel
device-major usb char 55 usb
device-major uhid char 56 uhid
device-major ulpt char 57 ulpt

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.ia64,v 1.12 2016/12/08 11:31:11 nat Exp $
# $NetBSD: majors.ia64,v 1.13 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for ia64
#
@ -47,11 +47,6 @@ device-major rnd char 46 rnd
device-major wsdisplay char 47 wsdisplay
device-major wskbd char 48 wskbd
device-major wsmouse char 49 wsmouse
device-major isdn char 50 isdn
device-major isdnctl char 51 isdnctl
device-major isdnbchan char 52 isdnbchan
device-major isdntrc char 53 isdntrc
device-major isdntel char 54 isdntel
device-major usb char 55 usb
device-major uhid char 56 uhid
device-major ulpt char 57 ulpt

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.ibmnws,v 1.14 2011/06/30 20:09:31 wiz Exp $
# $NetBSD: majors.ibmnws,v 1.15 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for ibmnws
#
@ -45,11 +45,6 @@ device-major scsibus char 61 scsibus
device-major raid char 62 block 18 raid
device-major wsmux char 65 wsmux
device-major isdn char 66 isdn
device-major isdnctl char 67 isdnctl
device-major isdnbchan char 68 isdnbchan
device-major isdntrc char 69 isdntrc
device-major isdntel char 70 isdntel
device-major wsfont char 71 wsfont
device-major pci char 72 pci
device-major clockctl char 73 clockctl

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.mvmeppc,v 1.20 2011/06/30 20:09:33 wiz Exp $
# $NetBSD: majors.mvmeppc,v 1.21 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for mvmeppc
#
@ -38,11 +38,6 @@ device-major rnd char 46 rnd
device-major scsibus char 50 scsibus
device-major raid char 51 block 18 raid
device-major isdn char 53 isdn
device-major isdnctl char 54 isdnctl
device-major isdnbchan char 55 isdnbchan
device-major isdntrc char 56 isdntrc
device-major isdntel char 57 isdntel
device-major clockctl char 58 clockctl
device-major cgd char 60 block 19 cgd
device-major ksyms char 61 ksyms

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.powerpc,v 1.10 2016/12/08 11:31:11 nat Exp $
# $NetBSD: majors.powerpc,v 1.11 2018/09/23 09:21:02 maxv Exp $
#
# Device majors for shared PowerPC
#
@ -59,11 +59,6 @@ device-major sequencer char 50 sequencer
device-major urio char 51 urio
device-major uscanner char 52 uscanner
device-major openfirm char 53 openfirm
device-major isdn char 54 isdn
device-major isdnctl char 55 isdnctl
device-major isdnbchan char 56 isdnbchan
device-major isdntrc char 57 isdntrc
device-major isdntel char 58 isdntel
device-major ld char 59 block 13 ld
device-major pci char 60 pci

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.prep,v 1.23 2016/12/08 11:31:12 nat Exp $
# $NetBSD: majors.prep,v 1.24 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for prep
#
@ -53,11 +53,6 @@ device-major scsibus char 61 scsibus
device-major raid char 62 block 18 raid
device-major wsmux char 65 wsmux
device-major isdn char 66 isdn
device-major isdnctl char 67 isdnctl
device-major isdnbchan char 68 isdnbchan
device-major isdntrc char 69 isdntrc
device-major isdntel char 70 isdntel
device-major wsfont char 71 wsfont
device-major pci char 72 pci
device-major clockctl char 73 clockctl

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.riscv,v 1.2 2016/12/08 11:31:12 nat Exp $
# $NetBSD: majors.riscv,v 1.3 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for evbmips
#
@ -15,11 +15,6 @@ device-major satlink char 38 satlink
device-major esh char 44 esh
device-major midi char 49 midi
device-major sequencer char 50 sequencer
device-major isdn char 51 isdn
device-major isdnctl char 52 isdnctl
device-major isdnbchan char 53 isdnbchan
device-major isdntrc char 54 isdntrc
device-major isdntel char 55 isdntel
device-major cy char 60 cy
device-major cz char 61 cz
device-major altq char 64 altq

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.sgimips,v 1.28 2015/04/23 23:22:52 pgoyette Exp $
# $NetBSD: majors.sgimips,v 1.29 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for sgimips
#
@ -36,11 +36,6 @@ device-major scsibus char 34 scsibus
device-major zstty char 35 zstty
device-major com char 36 com
device-major arcbios char 37
device-major isdn char 38 isdn
device-major isdnctl char 39 isdnctl
device-major isdnbchan char 40 isdnbchan
device-major isdntrc char 41 isdntrc
device-major isdntel char 42 isdntel
device-major svr4_net char 43 compat_svr4
device-major ses char 44 ses

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.sparc,v 1.35 2017/03/26 13:57:53 martin Exp $
# $NetBSD: majors.sparc,v 1.36 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for sparc
#
@ -63,11 +63,6 @@ device-major altq char 68 altq
device-major audio char 69 audio
device-major openprom char 70
device-major tctrl char 71 tctrl
device-major isdn char 72 isdn
device-major isdnctl char 73 isdnctl
device-major isdnbchan char 74 isdnbchan
device-major isdntrc char 75 isdntrc
device-major isdntel char 76 isdntel
# sparc64: device-major sabtty char 77 sabtty
# sparc64: device-major usb char 78 usb
# sparc64: device-major uhid char 79 uhid

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.sparc64,v 1.34 2017/03/26 13:57:53 martin Exp $
# $NetBSD: majors.sparc64,v 1.35 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for sparc64
#
@ -60,11 +60,6 @@ device-major altq char 68 altq
device-major audio char 69 audio
device-major openprom char 70
# sparc: device-major tctrl char 71 tctrl
device-major isdn char 72 isdn
device-major isdnctl char 73 isdnctl
device-major isdnbchan char 74 isdnbchan
device-major isdntrc char 75 isdntrc
device-major isdntel char 76 isdntel
device-major sabtty char 77 sabtty
device-major usb char 78 usb
device-major uhid char 79 uhid

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.x68k,v 1.27 2015/04/23 23:22:52 pgoyette Exp $
# $NetBSD: majors.x68k,v 1.28 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for x68k
#
@ -40,11 +40,6 @@ device-major rnd char 39 rnd
device-major scsibus char 40 scsibus
device-major raid char 41 block 16 raid
device-major svr4_net char 42 compat_svr4
device-major isdn char 43 isdn
device-major isdnctl char 44 isdnctl
device-major isdnbchan char 45 isdnbchan
device-major isdntrc char 46 isdntrc
device-major isdntel char 47 isdntel
device-major clockctl char 48 clockctl
device-major usb char 50 usb
device-major ugen char 51 ugen

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.zaurus,v 1.7 2015/04/23 23:22:52 pgoyette Exp $
# $NetBSD: majors.zaurus,v 1.8 2018/09/23 09:21:03 maxv Exp $
#
# Device majors for zaurus
#
@ -72,11 +72,6 @@ device-major urio char 75 urio
device-major uscanner char 76 uscanner
device-major openfirm char 77 openfirm
device-major biconsdev char 78 biconsdev
device-major isdn char 79 isdn
device-major isdnctl char 80 isdnctl
device-major isdnrchan char 81 isdnbchan
device-major isdntrc char 82 isdntrc
device-major isdntel char 83 isdntel
device-major sacom char 84 sacom
device-major mly char 85 mly
device-major wsfont char 86 wsfont
@ -98,7 +93,6 @@ device-major dmoverio char 102 dmoverio
device-major apmdev char 103 apmdev
device-major sscom char 104 sscom
device-major ksyms char 105 ksyms
device-major isdnbchan char 106 isdnbchan
device-major epcom char 107 epcom
device-major tslcd char 108 tslcd
device-major twe char 109 twe

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.1212 2018/09/22 16:22:23 maxv Exp $
# $NetBSD: files,v 1.1213 2018/09/23 09:21:03 maxv Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20171118
@ -1357,13 +1357,6 @@ attach cpciic at cpcbus with iic_cpcbus
file dev/ic/iic_cpcbus.c iic_cpcbus
# Attributes used by the ISDN subsystem
#
define isdndev # the ISDN subsystem
define passive_isdn # files needed by passive cards (XXX - protocol
# specific)
define isdncapi # ISDN CAPI (http://www.capi.org/)
# Broadcom AirForce / Apple Airport Extreme
device bwi: arp, ifnet, firmload, wlan
file dev/ic/bwi.c bwi
@ -1435,19 +1428,6 @@ defpseudo clockctl
defpseudo accf_data
defpseudo accf_http
# ISDN userland pseudo devices
#
defpseudo isdntrc: isdndev, tty
defpseudo isdnbchan: isdndev, tty
defpseudo isdntel: isdndev, tty
defpseudo isdnctl: isdndev, tty
defpseudo isdn: isdndev, tty
# ISDN network interfaces
defpseudo irip: isdndev, ifnet
defflag opt_irip.h IRIP_VJ
defpseudo ippp: isdndev, sppp, ifnet
# KTTCP network throughput testing pseudo-device
defpseudo kttcp
file dev/kttcp.c kttcp needs-flag

View File

@ -1,4 +1,4 @@
# $NetBSD: DEVNAMES,v 1.317 2018/09/22 16:22:23 maxv Exp $
# $NetBSD: DEVNAMES,v 1.318 2018/09/23 09:21:03 maxv Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@ -664,13 +664,11 @@ ipaqpcic hpcarm
ipmi amd64
ipmi i386
ipmi xen
ippp MI
ipw MI
irdasir MI Attribute
irframe MI
irframedrv MI Attribute
irif hpcmips
irip MI
isa MI
isabeep alpha
isabeep prep
@ -679,11 +677,6 @@ isabus MI Attribute
isabus atari
isadma MI Attribute
isapnp MI
isdn MI
isdnbchan MI
isdnctl MI
isdntel MI
isdntrc MI
ismt amd64
ismt i386
isp MI

View File

@ -1,4 +1,4 @@
# $NetBSD: files.net,v 1.18 2018/09/06 06:42:00 maxv Exp $
# $NetBSD: files.net,v 1.19 2018/09/23 09:21:03 maxv Exp $
# XXX CLEANUP
define net
@ -66,5 +66,3 @@ file netinet6/in6_gif.c gif & inet6
file netinet6/in6_l2tp.c l2tp & inet6
include "net/agr/files.agr"
include "netisdn/files.i4b"

View File

@ -1,8 +0,0 @@
# $NetBSD: Makefile,v 1.3 2002/11/26 23:30:35 lukem Exp $
INCSDIR= /usr/include/netisdn
INCS= i4b_cause.h i4b_trace.h i4b_debug.h i4b_ioctl.h i4b_tel_ioctl.h \
i4b_rbch_ioctl.h
.include <bsd.kinc.mk>

View File

@ -1,35 +0,0 @@
# $NetBSD: files.i4b,v 1.1 2010/03/02 13:27:27 uebayasi Exp $
file netisdn/i4b_ctl.c isdnctl needs-flag
file netisdn/i4b_isppp.c ippp needs-count
file netisdn/i4b_ipr.c irip needs-count
file netisdn/i4b_rbch.c isdnbchan needs-count
file netisdn/i4b_tel.c isdntel needs-count
file netisdn/i4b_trace.c isdntrc needs-count
file netisdn/i4b_mbuf.c passive_isdn
file netisdn/i4b_l2.c passive_isdn
file netisdn/i4b_l2fsm.c passive_isdn
file netisdn/i4b_uframe.c passive_isdn
file netisdn/i4b_tei.c passive_isdn
file netisdn/i4b_sframe.c passive_isdn
file netisdn/i4b_iframe.c passive_isdn
file netisdn/i4b_l2timer.c passive_isdn
file netisdn/i4b_util.c passive_isdn
file netisdn/i4b_lme.c passive_isdn
# Q.931 handler
file netisdn/i4b_q931.c passive_isdn
file netisdn/i4b_q932fac.c passive_isdn
file netisdn/i4b_l3fsm.c passive_isdn
file netisdn/i4b_l3timer.c passive_isdn
file netisdn/i4b_l2if.c passive_isdn
file netisdn/i4b_l4if.c passive_isdn
# isdn device driver, interface to isdnd
file netisdn/i4b_i4bdrv.c isdn needs-flag
file netisdn/i4b_l4.c isdndev needs-flag
file netisdn/i4b_l4mgmt.c isdndev needs-flag
file netisdn/i4b_l4timer.c isdndev needs-flag
# capi
file netisdn/i4b_capi_l4if.c isdncapi
file netisdn/i4b_capi_llif.c isdncapi
file netisdn/i4b_capi_msgs.c isdncapi

View File

@ -1,134 +0,0 @@
/* $NetBSD: i4b_capi.h,v 1.6 2013/05/29 09:26:02 martin Exp $ */
/*
* Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* capi/capi.h The CAPI device interface.
*
* $FreeBSD: src/sys/i4b/capi/capi.h,v 1.1 2001/05/25 08:39:31 hm Exp $
*/
#ifndef _NETISDN_I4B_CAPI_H_
#define _NETISDN_I4B_CAPI_H_
/*
// CAPI driver context: B channels and controller softcs.
*/
#define INVALID -1
enum capi_b_state {
B_FREE, /* 0: channel free, ncci invalid */
B_CONNECT_CONF, /* 1: wait for CONNECT_CONF */
B_CONNECT_IND, /* 2: IND got, wait for appl RESP */
B_CONNECT_ACTIVE_IND, /* 3: wait for CONNECT_ACTIVE_IND */
B_CONNECT_B3_CONF, /* 4: wait for CONNECT_B3_CONF */
B_CONNECT_B3_IND, /* 5: wait for CONNECT_B3_IND */
B_CONNECT_B3_ACTIVE_IND, /* 6: wait for CONNECT_B3_ACTIVE_IND */
B_CONNECTED, /* 7: channel connected & in use */
B_DISCONNECT_CONF, /* 8: wait for DISCONNECT_CONF */
B_DISCONNECT_B3_CONF, /* 9: wait for DISCONNECT_B3_CONF */
B_DISCONNECT_IND, /* 10: wait for DISCONNECT_IND */
};
typedef struct capi_bchan
{
/* Channel state */
int ncci;
#define CAPI_CTRL_MASK 0x000000ff
#define CAPI_PLCI_MASK 0x0000ffff
#define CAPI_NCCI_MASK 0xffff0000
u_int16_t msgid;
int busy;
enum capi_b_state state;
struct ifqueue tx_queue;
struct ifqueue rx_queue;
int rxcount;
int txcount;
/* The rest is needed for i4b integration */
int bprot;
int cdid;
struct mbuf *in_mbuf;
isdn_link_t capi_isdn_linktab;
const struct isdn_l4_driver_functions *l4_driver;
void *l4_driver_softc;
} capi_bchan_t;
enum capi_c_state {
C_DOWN, /* controller uninitialized */
C_READY, /* controller initialized but not listening */
C_UP, /* controller listening */
};
typedef struct capi_softc {
int sc_unit; /* index in capi_sc[] */
int card_type; /* CARD_TYPEC_xxx, filled by ll driver */
int sc_nbch; /* number of b channels on this controller */
int sc_enabled; /* is daemon connected TRUE/FALSE */
int sc_msgid; /* next CAPI message id */
int capi_isdnif; /* isdnif identifier */
char sc_profile[64];/* CAPI profile data */
enum capi_c_state sc_state;
capi_bchan_t sc_bchan[MAX_BCHAN];
/* Link layer driver context holder and methods */
void *ctx;
int (*load)(struct capi_softc *, int, u_int8_t *);
int (*reg_appl)(struct capi_softc *, int, int);
int (*rel_appl)(struct capi_softc *, int);
int (*send)(struct capi_softc *, struct mbuf *);
} capi_softc_t;
#define CARD_TYPEC_CAPI_UNK 0
#define CARD_TYPEC_AVM_T1_PCI 1
#define CARD_TYPEC_AVM_B1_PCI 2
#define CARD_TYPEC_AVM_B1_ISA 3
/*
// CAPI upcalls for the link layer.
*/
#define I4BCAPI_APPLID 1
extern int capi_ll_attach(capi_softc_t *, const char *, const char *);
extern int capi_ll_control(capi_softc_t *, int op, intptr_t arg);
extern int capi_ll_detach(capi_softc_t *);
#define CAPI_CTRL_READY 0 /* ctrl ready, value=TRUE/FALSE */
#define CAPI_CTRL_PROFILE 1 /* set CAPI profile */
#define CAPI_CTRL_NEW_NCCI 2 /* new ncci value, assign bchan */
#define CAPI_CTRL_FREE_NCCI 3 /* free ncci value, clear bchan */
extern int capi_ll_receive(capi_softc_t *, struct mbuf *);
extern int capi_start_tx(void *, int bchan);
#endif /* !_NETISDN_I4B_CAPI_H_ */

View File

@ -1,427 +0,0 @@
/* $NetBSD: i4b_capi_l4if.c,v 1.9 2006/11/16 01:33:49 christos Exp $ */
/*
* Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* capi/capi_l4if.c The CAPI i4b L4/device interface.
*
* $FreeBSD: src/sys/i4b/capi/capi_l4if.c,v 1.4 2002/04/04 21:03:20 jhb Exp $
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_capi_l4if.c,v 1.9 2006/11/16 01:33:49 christos Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/callout.h>
#include <net/if.h>
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#include <netisdn/i4b_cause.h>
#include <netisdn/i4b_l3l4.h>
#include <netisdn/i4b_mbuf.h>
#include <netisdn/i4b_global.h>
#include <netisdn/i4b_l4.h>
#include <netisdn/i4b_capi.h>
#include <netisdn/i4b_capi_msgs.h>
static void n_connect_request(call_desc_t *);
static void n_connect_response(call_desc_t *, int response, int cause);
static void n_disconnect_request(call_desc_t *, int cause);
static void n_alert_request(call_desc_t *);
static void n_mgmt_command(struct isdn_l3_driver *, int cmd, void *parm);
static int n_download(void *, int, struct isdn_dr_prot *);
static int ncapi = 0;
/*
// i4b_capi_{ret,set}_linktab
// i4b driver glue.
//
// i4b_capi_bch_config
// Called by i4b driver to flush + {en,dis}able a channel.
//
// i4b_capi_bch_start_tx
// Called by i4b driver to transmit a queued mbuf.
//
// i4b_capi_bch_stat
// Called by i4b driver to obtain statistics information.
*/
static isdn_link_t *
i4b_capi_ret_linktab(void *token, int channel)
{
capi_softc_t *sc = token;
return &sc->sc_bchan[channel].capi_isdn_linktab;
}
static void
i4b_capi_set_link(void *token, int channel,
const struct isdn_l4_driver_functions *l4_driver, void *l4_inst)
{
capi_softc_t *sc = token;
sc->sc_bchan[channel].l4_driver = l4_driver;
sc->sc_bchan[channel].l4_driver_softc = l4_inst;
}
static void
i4b_capi_bch_config(void *token, int chan, int bprot, int activate)
{
capi_softc_t *sc = token;
i4b_Bcleanifq(&sc->sc_bchan[chan].tx_queue);
sc->sc_bchan[chan].tx_queue.ifq_maxlen = IFQ_MAXLEN;
sc->sc_bchan[chan].txcount = 0;
/* The telephony drivers use rx_queue for receive. */
i4b_Bcleanifq(&sc->sc_bchan[chan].rx_queue);
sc->sc_bchan[chan].rx_queue.ifq_maxlen = IFQ_MAXLEN;
sc->sc_bchan[chan].rxcount = 0;
/* HDLC frames are put to in_mbuf */
i4b_Bfreembuf(sc->sc_bchan[chan].in_mbuf);
sc->sc_bchan[chan].in_mbuf = NULL;
/* Because of the difference, we need to remember the protocol. */
sc->sc_bchan[chan].bprot = bprot;
sc->sc_bchan[chan].busy = 0;
}
static void
i4b_capi_bch_start_tx(void *token, int chan)
{
capi_softc_t *sc = token;
int s;
s = splnet();
if (sc->sc_bchan[chan].state != B_CONNECTED) {
splx(s);
printf("capi%d: start_tx on unconnected channel\n", sc->sc_unit);
return;
}
if (sc->sc_bchan[chan].busy) {
splx(s);
return;
}
capi_start_tx(sc, chan);
splx(s);
}
static void
i4b_capi_bch_stat(void *token, int chan, bchan_statistics_t *bsp)
{
capi_softc_t *sc = token;
int s = splnet();
bsp->outbytes = sc->sc_bchan[chan].txcount;
bsp->inbytes = sc->sc_bchan[chan].rxcount;
sc->sc_bchan[chan].txcount = 0;
sc->sc_bchan[chan].rxcount = 0;
splx(s);
}
int capi_start_tx(void *token, int chan)
{
capi_softc_t *sc = token;
struct mbuf *m_b3;
int sent = 0;
IF_DEQUEUE(&sc->sc_bchan[chan].tx_queue, m_b3);
while (m_b3) {
struct mbuf *m = m_b3->m_next;
sc->sc_bchan[chan].txcount += m_b3->m_len;
capi_data_b3_req(sc, chan, m_b3);
sent++;
m_b3 = m;
}
if (sc->sc_bchan[chan].l4_driver) {
capi_bchan_t *bch = &sc->sc_bchan[chan];
/* Notify i4b driver of activity, and if the queue is drained. */
if (sent)
(*bch->l4_driver->bch_activity)(bch->l4_driver_softc, ACT_TX);
if (IF_QEMPTY(&bch->tx_queue))
(*bch->l4_driver->bch_tx_queue_empty)(bch->l4_driver_softc);
}
return sent;
}
static const struct isdn_l4_bchannel_functions
capi_l4_driver = {
i4b_capi_bch_config,
i4b_capi_bch_start_tx,
i4b_capi_bch_stat
};
/*
// n_mgmt_command
// i4b L4 management command.
*/
static void
n_mgmt_command(struct isdn_l3_driver *l3, int op, void *arg)
{
capi_softc_t *sc = l3->l1_token;
#if 0
printf("capi%d: mgmt command %d\n", sc->sc_unit, op);
#endif
switch(op) {
case CMR_DOPEN:
sc->sc_enabled = 1;
break;
case CMR_DCLOSE:
sc->sc_enabled = 0;
break;
case CMR_SETTRACE:
break;
default:
break;
}
}
/*
// n_connect_request
// i4b L4 wants to connect. We assign a B channel to the call,
// send a CAPI_CONNECT_REQ, and set the channel to B_CONNECT_CONF.
*/
static void
n_connect_request(call_desc_t *cd)
{
capi_softc_t *sc;
int bch, s;
sc = cd->l3drv->l1_token;
bch = cd->channelid;
s = splnet();
if ((bch < 0) || (bch >= sc->sc_nbch))
for (bch = 0; bch < sc->sc_nbch; bch++)
if (sc->sc_bchan[bch].state == B_FREE)
break;
if (bch == sc->sc_nbch) {
splx(s);
printf("capi%d: no free B channel\n", sc->sc_unit);
return;
}
cd->channelid = bch;
capi_connect_req(sc, cd);
splx(s);
}
/*
// n_connect_response
// i4b L4 answers a call. We send a CONNECT_RESP with the proper
// Reject code, and set the channel to B_CONNECT_B3_IND or B_FREE,
// depending whether we answer or not.
*/
static void
n_connect_response(call_desc_t *cd, int response, int cause)
{
capi_softc_t *sc;
int s;
sc = cd->l3drv->l1_token;
T400_stop(cd);
cd->response = response;
cd->cause_out = cause;
s = splnet();
capi_connect_resp(sc, cd);
splx(s);
}
/*
// n_disconnect_request
// i4b L4 wants to disconnect. We send a DISCONNECT_REQ and
// set the channel to B_DISCONNECT_CONF.
*/
static void
n_disconnect_request(call_desc_t *cd, int cause)
{
capi_softc_t *sc;
int s;
sc = cd->l3drv->l1_token;
cd->cause_out = cause;
s = splnet();
capi_disconnect_req(sc, cd);
splx(s);
}
/*
// n_alert_request
// i4b L4 wants to alert an incoming call. We send ALERT_REQ.
*/
static void
n_alert_request(call_desc_t *cd)
{
capi_softc_t *sc;
int s;
sc = cd->l3drv->l1_token;
s = splnet();
capi_alert_req(sc, cd);
splx(s);
}
/*
// n_download
// L4 -> firmware download
*/
static int
n_download(void *token, int numprotos, struct isdn_dr_prot *protocols)
{
capi_softc_t *sc = token;
if (sc->load) {
(*sc->load)(sc, protocols[0].bytecount,
protocols[0].microcode);
return(0);
}
return(ENXIO);
}
static const struct isdn_l3_driver_functions
capi_l3_functions = {
i4b_capi_ret_linktab,
i4b_capi_set_link,
n_connect_request,
n_connect_response,
n_disconnect_request,
n_alert_request,
n_download,
NULL,
n_mgmt_command
};
/*
// capi_ll_attach
// Called by a link layer driver at boot time.
*/
int
capi_ll_attach(capi_softc_t *sc, const char *devname, const char *cardname)
{
struct isdn_l3_driver *l3drv;
int i;
/* Unit state */
sc->sc_enabled = 0;
sc->sc_state = C_DOWN;
sc->sc_msgid = 0;
for (i = 0; i < sc->sc_nbch; i++) {
sc->sc_bchan[i].ncci = INVALID;
sc->sc_bchan[i].msgid = 0;
sc->sc_bchan[i].busy = 0;
sc->sc_bchan[i].state = B_FREE;
memset(&sc->sc_bchan[i].tx_queue, 0, sizeof(struct ifqueue));
memset(&sc->sc_bchan[i].rx_queue, 0, sizeof(struct ifqueue));
sc->sc_bchan[i].tx_queue.ifq_maxlen = IFQ_MAXLEN;
sc->sc_bchan[i].rx_queue.ifq_maxlen = IFQ_MAXLEN;
sc->sc_bchan[i].txcount = 0;
sc->sc_bchan[i].rxcount = 0;
sc->sc_bchan[i].cdid = CDID_UNUSED;
sc->sc_bchan[i].bprot = BPROT_NONE;
sc->sc_bchan[i].in_mbuf = NULL;
sc->sc_bchan[i].capi_isdn_linktab.l1token = sc;
sc->sc_bchan[i].capi_isdn_linktab.channel = i;
sc->sc_bchan[i].capi_isdn_linktab.bchannel_driver = &capi_l4_driver;
sc->sc_bchan[i].capi_isdn_linktab.tx_queue = &sc->sc_bchan[i].tx_queue;
sc->sc_bchan[i].capi_isdn_linktab.rx_queue = &sc->sc_bchan[i].rx_queue;
sc->sc_bchan[i].capi_isdn_linktab.rx_mbuf = &sc->sc_bchan[i].in_mbuf;
}
l3drv = isdn_attach_isdnif(devname, cardname, sc, &capi_l3_functions,
sc->sc_nbch);
l3drv->tei = -1;
l3drv->dl_est = DL_DOWN;
l3drv->nbch = sc->sc_nbch;
sc->sc_unit = ncapi++;
sc->capi_isdnif = l3drv->isdnif;
isdn_isdnif_ready(l3drv->isdnif);
printf("capi%d: card type %d attached\n", sc->sc_unit, sc->card_type);
return(0);
}
/*
// capi_ll_detach
*/
int
capi_ll_detach(capi_softc_t *sc)
{
(void)sc;
/* TODO */
return(0);
}

View File

@ -1,164 +0,0 @@
/* $NetBSD: i4b_capi_llif.c,v 1.6 2013/05/29 09:26:02 martin Exp $ */
/*
* Copyright (c) 2001 Cubical Solutions Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* capi/capi_llif.c The i4b CAPI link layer interface.
*
* $FreeBSD: src/sys/i4b/capi/capi_llif.c,v 1.1 2001/05/25 08:39:31 hm Exp $
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_capi_llif.c,v 1.6 2013/05/29 09:26:02 martin Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/callout.h>
#include <net/if.h>
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#include <netisdn/i4b_cause.h>
#include <netisdn/i4b_l3l4.h>
#include <netisdn/i4b_mbuf.h>
#include <netisdn/i4b_global.h>
#include <netisdn/i4b_l4.h>
#include <netisdn/i4b_capi.h>
#include <netisdn/i4b_capi_msgs.h>
/*
// capi_ll_control
// CAPI link layer control routine. Called by a link layer
// driver when its state changes.
*/
int
capi_ll_control(capi_softc_t *sc, int op, intptr_t arg)
{
switch (op) {
case CAPI_CTRL_READY:
if (arg) {
sc->sc_state = C_READY;
/*
* Register our CAPI ApplId and send CAPI_LISTEN_REQ
* with CIP Mask value 1 (match all).
*/
sc->reg_appl(sc, I4BCAPI_APPLID, sc->sc_nbch);
capi_listen_req(sc, 0x10007);
} else {
sc->sc_state = C_DOWN;
/* XXX go through cds and notify L4 of pdeact? XXX */
}
break;
case CAPI_CTRL_PROFILE:
memcpy(&sc->sc_profile, (char*) arg, sizeof(sc->sc_profile));
break;
case CAPI_CTRL_NEW_NCCI:
case CAPI_CTRL_FREE_NCCI:
/* We ignore the controller's NCCI notifications. */
break;
default:
printf("capi%d: unknown control %d\n", sc->sc_unit, op);
}
return 0;
}
/*
// i4b_capi_handlers
// Array of message-handler pairs used to dispatch CAPI
// messages sent to I4BCAPI_APPLID.
*/
static struct capi_cmdtab {
u_int16_t cmd;
void (*handler)(capi_softc_t *, struct mbuf *);
} i4b_capi_handlers[] = {
{ CAPI_LISTEN_CONF, capi_listen_conf },
{ CAPI_INFO_IND, capi_info_ind },
{ CAPI_ALERT_CONF, capi_alert_conf },
{ CAPI_CONNECT_CONF, capi_connect_conf },
{ CAPI_CONNECT_IND, capi_connect_ind },
{ CAPI_CONNECT_ACTIVE_IND, capi_connect_active_ind },
{ CAPI_CONNECT_B3_CONF, capi_connect_b3_conf },
{ CAPI_CONNECT_B3_IND, capi_connect_b3_ind },
{ CAPI_CONNECT_B3_ACTIVE_IND, capi_connect_b3_active_ind },
{ CAPI_DATA_B3_CONF, capi_data_b3_conf },
{ CAPI_DATA_B3_IND, capi_data_b3_ind },
{ CAPI_DISCONNECT_B3_IND, capi_disconnect_b3_ind },
{ CAPI_DISCONNECT_CONF, capi_disconnect_conf },
{ CAPI_DISCONNECT_IND, capi_disconnect_ind },
{ 0, 0 }
};
/*
// capi_ll_receive
// CAPI link layer receive upcall. Called by a link layer
// driver to dispatch incoming CAPI messages.
*/
int
capi_ll_receive(capi_softc_t *sc, struct mbuf *m)
{
u_int8_t *p = mtod(m, u_int8_t*);
u_int16_t len, applid, msgid, cmd;
capimsg_getu16(p + 0, &len);
capimsg_getu16(p + 2, &applid);
capimsg_getu16(p + 4, &cmd);
capimsg_getu16(p + 6, &msgid);
#if 0
printf("capi%d: ll_receive hdr %04x %04x %04x %04x\n", sc->sc_unit,
len, applid, cmd, msgid);
#endif
if (applid == I4BCAPI_APPLID) {
struct capi_cmdtab *e;
for (e = i4b_capi_handlers; e->cmd && e->cmd != cmd; e++);
if (e->cmd) (*e->handler)(sc, m);
else printf("capi%d: unknown message %04x\n", sc->sc_unit, cmd);
} else {
/* XXX we could handle arbitrary ApplIds here XXX */
printf("capi%d: message %04x for unknown applid %d\n", sc->sc_unit,
cmd, applid);
}
if (m->m_next) {
i4b_Bfreembuf(m->m_next);
m->m_next = NULL;
}
i4b_Dfreembuf(m);
return(0);
}

View File

@ -1,982 +0,0 @@
/* $NetBSD: i4b_capi_msgs.c,v 1.9 2017/03/28 08:47:19 ozaki-r Exp $ */
/*
* Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* capi/capi_msgs.c The CAPI i4b message handlers.
*
* $FreeBSD: src/sys/i4b/capi/capi_msgs.c,v 1.2 2001/10/21 08:51:54 hm Exp $
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_capi_msgs.c,v 1.9 2017/03/28 08:47:19 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/callout.h>
#include <net/if.h>
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#include <netisdn/i4b_cause.h>
#include <netisdn/i4b_l3l4.h>
#include <netisdn/i4b_mbuf.h>
#include <netisdn/i4b_global.h>
#include <netisdn/i4b_l4.h>
#include <netisdn/i4b_capi.h>
#include <netisdn/i4b_capi_msgs.h>
/*
// Administrative messages:
// ------------------------
*/
void capi_listen_req(capi_softc_t *sc, u_int32_t CIP)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 18);
u_int8_t *msg;
u_int16_t msgid;
if (!m) {
printf("capi%d: can't get mbuf for listen_req\n", sc->sc_unit);
return;
}
msgid = sc->sc_msgid++;
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_LISTEN_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, sc->sc_unit + 1); /* Controller */
msg = capimsg_setu32(msg, 0); /* Info mask */
msg = capimsg_setu32(msg, CIP);
msg = capimsg_setu32(msg, 0);
msg = capimsg_setu8(msg, 0);
msg = capimsg_setu8(msg, 0);
sc->send(sc, m);
}
void capi_listen_conf(capi_softc_t *sc, struct mbuf *m_in)
{
struct isdn_l3_driver *l3drv;
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t Info;
capimsg_getu16(msg + 12, &Info);
if (Info == 0) {
/* We are now listening. */
sc->sc_state = C_UP;
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
l3drv->dl_est = DL_UP;
i4b_l4_l12stat(l3drv, 1, 1);
i4b_l4_l12stat(l3drv, 2, 1);
} else {
/* XXX sc->sc_state = C_DOWN ? XXX */
printf("capi%d: can't listen, info=%04x\n", sc->sc_unit, Info);
}
}
void capi_info_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 4);
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t applid, msgid;
u_int32_t PLCI;
if (!m) {
printf("capi%d: can't get mbuf for info_resp\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &PLCI);
/* i4b_l4_info_ind() */
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, applid);
msg = capimsg_setu16(msg, CAPI_INFO_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
sc->send(sc, m);
}
void capi_alert_req(capi_softc_t *sc, call_desc_t *cd)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 5);
u_int8_t *msg;
u_int16_t msgid;
u_int32_t PLCI;
if (!m) {
printf("capi%d: can't get mbuf for alert_req\n", sc->sc_unit);
return;
}
msgid = sc->sc_bchan[cd->channelid].msgid = sc->sc_msgid++;
PLCI = (sc->sc_bchan[cd->channelid].ncci & CAPI_PLCI_MASK);
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_ALERT_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
msg = capimsg_setu8(msg, 0);
sc->send(sc, m);
}
void capi_alert_conf(capi_softc_t *sc, struct mbuf *m_in)
{
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t Info;
msg = capimsg_getu16(msg + 12, &Info);
if (Info) {
printf("capi%d: can't alert, info=%04x\n", sc->sc_unit, Info);
}
}
/*
// Outgoing call setup:
// --------------------
//
// CAPI_CONNECT_REQ -->
// <-- CAPI_CONNECT_CONF
// (notify Layer 4)
// <-- CAPI_CONNECT_ACTIVE_IND
// CAPI_CONNECT_ACTIVE_RESP -->
// CAPI_CONNECT_B3_REQ -->
// <-- CAPI_CONNECT_B3_CONF
// <-- CAPI_CONNECT_B3_ACTIVE_IND
// CAPI_CONNECT_B3_ACTIVE_RESP -->
// (notify Layer 4)
*/
void capi_connect_req(capi_softc_t *sc, call_desc_t *cd)
{
struct isdn_l3_driver *l3drv;
struct mbuf *m;
u_int8_t *msg;
u_int16_t msgid;
int slen = strlen(cd->src_telno);
int dlen = strlen(cd->dst_telno);
m = i4b_Dgetmbuf(8 + 27 + slen + dlen);
if (!m) {
printf("capi%d: can't get mbuf for connect_req\n", sc->sc_unit);
return;
}
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
cd->crflag = CRF_ORIG;
sc->sc_bchan[cd->channelid].cdid = cd->cdid;
sc->sc_bchan[cd->channelid].bprot = cd->bprot;
sc->sc_bchan[cd->channelid].state = B_CONNECT_CONF;
msgid = sc->sc_bchan[cd->channelid].msgid = sc->sc_msgid++;
l3drv->bch_state[cd->channelid] = BCH_ST_RSVD;
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_CONNECT_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, sc->sc_unit + 1); /* Controller */
switch (cd->bprot) {
case BPROT_NONE:
msg = capimsg_setu16(msg, 0x0010); /* Telephony */
break;
case BPROT_RHDLC:
msg = capimsg_setu16(msg, 0x0002); /* Unrestricted digital */
break;
default:
msg = capimsg_setu16(msg, 0x0002); /* Unrestricted digital */
}
msg = capimsg_setu8(msg, 1 + dlen);
msg = capimsg_setu8(msg, 0x80);
strncpy(msg, cd->dst_telno, dlen);
msg = capimsg_setu8(msg + dlen, 2 + slen);
msg = capimsg_setu8(msg, 0x00);
msg = capimsg_setu8(msg, 0x80); /* Presentation and screening indicator */
strncpy(msg, cd->src_telno, slen);
msg = capimsg_setu8(msg + slen, 0); /* Called & */
msg = capimsg_setu8(msg, 0); /* Calling party subaddress */
msg = capimsg_setu8(msg, 15); /* B protocol */
if (cd->bprot == BPROT_NONE)
msg = capimsg_setu16(msg, 1); /* B1 protocol = transparent */
else
msg = capimsg_setu16(msg, 0); /* B1 protocol = HDLC */
msg = capimsg_setu16(msg, 1); /* B2 protocol = transparent */
msg = capimsg_setu16(msg, 0); /* B3 protocol = transparent */
msg = capimsg_setu8(msg, 0); /* B1 parameters */
msg = capimsg_setu8(msg, 0); /* B2 parameters */
msg = capimsg_setu8(msg, 0); /* B3 parameters */
msg = capimsg_setu8(msg, 0); /* Bearer Capability */
msg = capimsg_setu8(msg, 0); /* Low Layer Compatibility */
msg = capimsg_setu8(msg, 0); /* High Layer Compatibility */
msg = capimsg_setu8(msg, 0); /* Additional Info */
sc->send(sc, m);
}
void capi_connect_conf(capi_softc_t *sc, struct mbuf *m_in)
{
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t msgid;
u_int32_t PLCI;
u_int16_t Info;
int bch;
msg = capimsg_getu16(msg + 6, &msgid);
msg = capimsg_getu32(msg, &PLCI);
msg = capimsg_getu16(msg, &Info);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECT_CONF) &&
(sc->sc_bchan[bch].msgid == msgid))
break;
if ((bch == sc->sc_nbch) ||
(cd = cd_by_cdid(sc->sc_bchan[bch].cdid)) == NULL) {
printf("capi%d: can't find channel for connect_conf PLCI %x\n",
sc->sc_unit, PLCI);
return;
}
if (Info == 0) {
sc->sc_bchan[bch].state = B_CONNECT_ACTIVE_IND;
sc->sc_bchan[bch].ncci = PLCI;
i4b_l4_proceeding_ind(cd);
} else {
struct isdn_l3_driver *l3drv;
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
SET_CAUSE_TV(cd->cause_out, CAUSET_I4B, CAUSE_I4B_L1ERROR);
i4b_l4_disconnect_ind(cd);
freecd_by_cd(cd);
sc->sc_bchan[bch].state = B_FREE;
l3drv->bch_state[bch] = BCH_ST_FREE;
printf("capi%d: can't connect out, info=%04x\n", sc->sc_unit, Info);
}
}
void capi_connect_active_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 4);
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t applid, msgid;
u_int32_t PLCI;
int bch;
if (!m) {
printf("capi%d: can't get mbuf for active_ind\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &PLCI);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECT_ACTIVE_IND) &&
(sc->sc_bchan[bch].ncci == PLCI))
break;
if ((bch == sc->sc_nbch) ||
(cd = cd_by_cdid(sc->sc_bchan[bch].cdid)) == NULL) {
printf("capi%d: can't find channel for active_resp, PLCI %x\n",
sc->sc_unit, PLCI);
return;
}
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, applid);
msg = capimsg_setu16(msg, CAPI_CONNECT_ACTIVE_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
sc->send(sc, m);
if (cd->crflag == CRF_ORIG) {
capi_connect_b3_req(sc, cd);
} else {
sc->sc_bchan[bch].state = B_CONNECT_B3_IND;
}
}
void capi_connect_b3_req(capi_softc_t *sc, call_desc_t *cd)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 5);
u_int8_t *msg;
u_int16_t msgid;
u_int32_t PLCI;
if (!m) {
printf("capi%d: can't get mbuf for connect_b3_req\n", sc->sc_unit);
return;
}
sc->sc_bchan[cd->channelid].state = B_CONNECT_B3_CONF;
msgid = sc->sc_bchan[cd->channelid].msgid = sc->sc_msgid++;
PLCI = (sc->sc_bchan[cd->channelid].ncci & CAPI_PLCI_MASK);
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_CONNECT_B3_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
msg = capimsg_setu8(msg, 0); /* NCPI */
sc->send(sc, m);
}
void capi_connect_b3_conf(capi_softc_t *sc, struct mbuf *m_in)
{
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t msgid;
u_int32_t NCCI;
u_int16_t Info;
int bch;
msg = capimsg_getu16(msg + 6, &msgid);
msg = capimsg_getu32(msg, &NCCI);
msg = capimsg_getu16(msg, &Info);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECT_B3_CONF) &&
(sc->sc_bchan[bch].ncci == (NCCI & CAPI_PLCI_MASK)))
break;
if ((bch == sc->sc_nbch) ||
(cd = cd_by_cdid(sc->sc_bchan[bch].cdid)) == NULL) {
printf("capi%d: can't find channel for connect_b3_conf NCCI %x\n",
sc->sc_unit, NCCI);
return;
}
if (Info == 0) {
sc->sc_bchan[bch].ncci = NCCI;
sc->sc_bchan[bch].state = B_CONNECT_B3_ACTIVE_IND;
} else {
struct isdn_l3_driver *l3drv;
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
SET_CAUSE_TV(cd->cause_in, CAUSET_I4B, CAUSE_I4B_OOO); /* XXX */
i4b_l4_disconnect_ind(cd);
freecd_by_cd(cd);
l3drv->bch_state[bch] = BCH_ST_RSVD;
printf("capi%d: can't connect_b3 out, info=%04x\n", sc->sc_unit, Info);
capi_disconnect_req(sc, cd);
}
}
void capi_connect_b3_active_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 4);
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t applid, msgid;
u_int32_t NCCI;
int bch;
if (!m) {
printf("capi%d: can't get mbuf for b3_active_ind\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &NCCI);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECT_B3_ACTIVE_IND) &&
(sc->sc_bchan[bch].ncci == NCCI))
break;
if ((bch == sc->sc_nbch) ||
(cd = cd_by_cdid(sc->sc_bchan[bch].cdid)) == NULL) {
printf("capi%d: can't find channel for b3_active_resp NCCI %x\n",
sc->sc_unit, NCCI);
return;
}
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_CONNECT_B3_ACTIVE_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, NCCI);
sc->send(sc, m);
sc->sc_bchan[bch].state = B_CONNECTED;
i4b_l4_connect_active_ind(cd);
}
/*
// Incoming call setup:
// --------------------
//
// <-- CAPI_CONNECT_IND
// (consult Layer 4)
// CAPI_CONNECT_RESP -->
// <-- CAPI_CONNECT_ACTIVE_IND
// CAPI_CONNECT_ACTIVE_RESP -->
// <-- CAPI_CONNECT_B3_IND
// CAPI_CONNECT_B3_RESP -->
// <-- CAPI_CONNECT_B3_ACTIVE_IND
// CAPI_CONNECT_B3_ACTIVE_RESP -->
// (notify Layer 4)
*/
void capi_connect_ind(capi_softc_t *sc, struct mbuf *m_in)
{
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t applid, msgid;
u_int32_t PLCI;
u_int16_t CIP;
u_int8_t x, y, z;
int bch;
if ((cd = reserve_cd()) == NULL) {
printf("capi%d: can't get cd for connect_ind\n", sc->sc_unit);
return;
}
cd->isdnif = sc->capi_isdnif;
cd->channelexcl = 0;
cd->l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
for (bch = 0; bch < sc->sc_nbch; bch++)
if (sc->sc_bchan[bch].state == B_FREE)
break;
sc->sc_bchan[bch].state = B_CONNECT_IND;
cd->channelid = bch; /* XXX CHAN_ANY XXX */
cd->crflag = CRF_DEST;
cd->cr = get_rand_cr(sc->sc_unit);
cd->scr_ind = SCR_NONE;
cd->prs_ind = PRS_NONE;
cd->bprot = BPROT_NONE;
cd->ilt = NULL;
cd->display[0] = '\0';
cd->datetime[0] = '\0';
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &PLCI);
msg = capimsg_getu16(msg, &CIP);
cd->event = (int) msgid; /* XXX overload */
cd->Q931state = (int) PLCI; /* XXX overload */
switch (CIP) {
case 0x0010:
case 0x0001: cd->bprot = BPROT_NONE; break;
case 0x0002: cd->bprot = BPROT_RHDLC; break;
default:
#if 0
NDBGL4(L4_CAPIDBG, "capi%d: unknown CIP = %d", sc->sc_unit, CIP);
#endif
cd->bprot = BPROT_NONE;
}
msg = capimsg_getu8(msg, &x); /* Called party struct len */
if (x) {
msg = capimsg_getu8(msg, &y); /* Numbering plan */
z = x - 1;
if (z >= TELNO_MAX) z = (TELNO_MAX-1);
strncpy(cd->dst_telno, msg, z);
msg += x;
x = z;
}
cd->dst_telno[x] = '\0';
msg = capimsg_getu8(msg, &x); /* Calling party struct len */
if (x) {
msg = capimsg_getu8(msg, &y); /* Numbering plan */
msg = capimsg_getu8(msg, &y); /* Screening/Presentation */
if ((y & 0x80) == 0) { /* screening used */
cd->scr_ind = (y & 3) + SCR_USR_NOSC;
cd->prs_ind = ((y >> 5) & 3) + PRS_ALLOWED;
}
z = x - 2;
if (z >= TELNO_MAX) z = (TELNO_MAX-1);
strncpy(cd->src_telno, msg, z);
msg += x;
x = z;
}
cd->src_telno[x] = '\0';
i4b_l4_connect_ind(cd);
}
void capi_connect_resp(capi_softc_t *sc, call_desc_t *cd)
{
struct isdn_l3_driver *l3drv;
struct mbuf *m;
u_int8_t *msg;
u_int16_t msgid;
u_int32_t PLCI;
int dlen = strlen(cd->dst_telno);
m = i4b_Dgetmbuf(8 + 21 + dlen);
if (!m) {
printf("capi%d: can't get mbuf for connect_resp\n", sc->sc_unit);
return;
}
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
msgid = (u_int16_t) cd->event;
PLCI = (u_int32_t) cd->Q931state;
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_CONNECT_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
switch (cd->response) {
case SETUP_RESP_ACCEPT:
sc->sc_bchan[cd->channelid].cdid = cd->cdid;
sc->sc_bchan[cd->channelid].ncci = PLCI;
sc->sc_bchan[cd->channelid].state = B_CONNECT_ACTIVE_IND;
l3drv->bch_state[cd->channelid] = BCH_ST_USED;
msg = capimsg_setu16(msg, 0); /* Accept the call */
break;
case SETUP_RESP_REJECT:
sc->sc_bchan[cd->channelid].state = B_FREE;
l3drv->bch_state[cd->channelid] = BCH_ST_FREE;
msg = capimsg_setu16(msg, 2); /* Reject, normal call clearing */
break;
case SETUP_RESP_DNTCRE:
sc->sc_bchan[cd->channelid].state = B_FREE;
l3drv->bch_state[cd->channelid] = BCH_ST_FREE;
if (sc->sc_nbch == 30) {
/* With PRI, we can't really ignore calls -- normal clearing */
msg = capimsg_setu16(msg, (0x3480|CAUSE_Q850_NCCLR));
} else {
msg = capimsg_setu16(msg, 1); /* Ignore */
}
break;
default:
sc->sc_bchan[cd->channelid].state = B_FREE;
l3drv->bch_state[cd->channelid] = BCH_ST_FREE;
msg = capimsg_setu16(msg, (0x3480|CAUSE_Q850_CALLREJ));
}
msg = capimsg_setu8(msg, 15); /* B protocol */
if (cd->bprot == BPROT_NONE)
msg = capimsg_setu16(msg, 1); /* B1 protocol = transparent */
else
msg = capimsg_setu16(msg, 0); /* B1 protocol = HDLC */
msg = capimsg_setu16(msg, 1); /* B2 protocol = transparent */
msg = capimsg_setu16(msg, 0); /* B3 protocol = transparent */
msg = capimsg_setu8(msg, 0); /* B1 parameters */
msg = capimsg_setu8(msg, 0); /* B2 parameters */
msg = capimsg_setu8(msg, 0); /* B3 parameters */
msg = capimsg_setu8(msg, 1 + dlen);
msg = capimsg_setu8(msg, 0x80); /* Numbering plan */
strncpy(msg, cd->dst_telno, dlen);
msg = capimsg_setu8(msg + dlen, 0); /* Connected subaddress */
msg = capimsg_setu8(msg, 0); /* Low Layer Compatibility */
msg = capimsg_setu8(msg, 0); /* Additional Info */
sc->send(sc, m);
}
void capi_connect_b3_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 7);
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t applid, msgid;
u_int32_t NCCI;
int bch;
if (!m) {
printf("capi%d: can't get mbuf for connect_b3_resp\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &NCCI);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECT_B3_IND) &&
(sc->sc_bchan[bch].ncci == (NCCI & CAPI_PLCI_MASK)))
break;
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, applid);
msg = capimsg_setu16(msg, CAPI_CONNECT_B3_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, NCCI);
if (bch == sc->sc_nbch) {
printf("capi%d: can't get cd for connect_b3_resp NCCI %x\n",
sc->sc_unit, NCCI);
msg = capimsg_setu16(msg, 8); /* Reject, destination OOO */
} else {
sc->sc_bchan[bch].ncci = NCCI;
sc->sc_bchan[bch].state = B_CONNECT_B3_ACTIVE_IND;
msg = capimsg_setu16(msg, 0); /* Accept */
}
msg = capimsg_setu8(msg, 0); /* NCPI */
sc->send(sc, m);
}
/*
// Data transfer:
// --------------
*/
void capi_data_b3_req(capi_softc_t *sc, int chan, struct mbuf *m_b3)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 14);
u_int8_t *msg;
u_int16_t msgid;
if (!m) {
printf("capi%d: can't get mbuf for data_b3_req\n", sc->sc_unit);
return;
}
msgid = sc->sc_bchan[chan].msgid = sc->sc_msgid++;
sc->sc_bchan[chan].busy = 1;
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_DATA_B3_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, sc->sc_bchan[chan].ncci);
/* XXX: 32bit Pointer */
msg = capimsg_setu32(msg, (u_int32_t)(intptr_t)m_b3->m_data);
msg = capimsg_setu16(msg, m_b3->m_len);
msg = capimsg_setu16(msg, chan);
msg = capimsg_setu16(msg, 0); /* Flags */
m->m_next = m_b3;
sc->send(sc, m);
}
void capi_data_b3_conf(capi_softc_t *sc, struct mbuf *m_in)
{
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int32_t NCCI;
u_int16_t handle;
u_int16_t Info;
msg = capimsg_getu32(msg + 8, &NCCI);
msg = capimsg_getu16(msg, &handle);
msg = capimsg_getu16(msg, &Info);
if (Info == 0) {
sc->sc_bchan[handle].busy = 0;
capi_start_tx(sc, handle);
} else {
printf("capi%d: data_b3_conf NCCI %x handle %x info=%04x\n",
sc->sc_unit, NCCI, handle, Info);
}
}
void capi_data_b3_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 6);
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t applid, msgid;
u_int32_t NCCI;
u_int16_t handle;
int bch;
if (!m) {
printf("capi%d: can't get mbuf for data_b3_resp\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &NCCI);
msg = capimsg_getu16(msg + 6, &handle);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_CONNECTED) &&
(sc->sc_bchan[bch].ncci == NCCI))
break;
if (bch == sc->sc_nbch) {
printf("capi%d: can't find channel for data_b3_ind NCCI %x\n",
sc->sc_unit, NCCI);
} else {
if (sc->sc_bchan[bch].bprot == BPROT_RHDLC) {
/* HDLC drivers use rx_mbuf */
sc->sc_bchan[bch].in_mbuf = m_in->m_next;
sc->sc_bchan[bch].rxcount += m_in->m_next->m_len;
m_in->m_next = NULL; /* driver frees */
(*sc->sc_bchan[bch].l4_driver->bch_rx_data_ready)(
sc->sc_bchan[bch].l4_driver_softc);
} else {
/* Telephony drivers use rx_queue */
if (!IF_QFULL(&sc->sc_bchan[bch].rx_queue)) {
sc->sc_bchan[bch].rxcount += m_in->m_next->m_len;
IF_ENQUEUE(&sc->sc_bchan[bch].rx_queue, m_in->m_next);
m_in->m_next = NULL; /* driver frees */
}
(*sc->sc_bchan[bch].l4_driver->bch_rx_data_ready)(
sc->sc_bchan[bch].l4_driver_softc);
}
}
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_DATA_B3_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, NCCI);
msg = capimsg_setu16(msg, handle);
sc->send(sc, m);
}
/*
// Connection teardown:
// --------------------
*/
void capi_disconnect_req(capi_softc_t *sc, call_desc_t *cd)
{
struct isdn_l3_driver *l3drv;
struct mbuf *m = i4b_Dgetmbuf(8 + 5);
u_int8_t *msg;
u_int16_t msgid;
u_int32_t PLCI;
if (!m) {
printf("capi%d: can't get mbuf for disconnect_req\n", sc->sc_unit);
return;
}
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
sc->sc_bchan[cd->channelid].state = B_DISCONNECT_CONF;
l3drv->bch_state[cd->channelid] = BCH_ST_RSVD;
msgid = sc->sc_bchan[cd->channelid].msgid = sc->sc_msgid++;
PLCI = (sc->sc_bchan[cd->channelid].ncci & CAPI_PLCI_MASK);
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, I4BCAPI_APPLID);
msg = capimsg_setu16(msg, CAPI_DISCONNECT_REQ);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
msg = capimsg_setu8(msg, 0); /* Additional Info */
sc->send(sc, m);
}
void capi_disconnect_conf(capi_softc_t *sc, struct mbuf *m_in)
{
struct isdn_l3_driver *l3drv;
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int32_t PLCI;
int bch;
msg = capimsg_getu32(msg + 8, &PLCI);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state == B_DISCONNECT_CONF) &&
((sc->sc_bchan[bch].ncci & CAPI_PLCI_MASK) == PLCI))
break;
if (bch == sc->sc_nbch) {
printf("capi%d: can't find channel for disconnect_conf PLCI %x\n",
sc->sc_unit, PLCI);
return;
}
cd = cd_by_cdid(sc->sc_bchan[bch].cdid);
if (!cd) {
printf("capi%d: can't find cd for disconnect_conf PLCI %x\n",
sc->sc_unit, PLCI);
} else {
i4b_l4_disconnect_ind(cd);
freecd_by_cd(cd);
}
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
sc->sc_bchan[bch].state = B_FREE;
l3drv->bch_state[bch] = BCH_ST_FREE;
}
void capi_disconnect_b3_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct mbuf *m = i4b_Dgetmbuf(8 + 4);
u_int8_t *msg = mtod(m_in, u_int8_t*);
u_int16_t applid, msgid;
u_int32_t NCCI;
if (!m) {
printf("capi%d: can't get mbuf for disconnect_b3_resp\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &NCCI);
/* XXX update bchan state? XXX */
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, applid);
msg = capimsg_setu16(msg, CAPI_DISCONNECT_B3_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, NCCI);
sc->send(sc, m);
}
void capi_disconnect_ind(capi_softc_t *sc, struct mbuf *m_in)
{
struct isdn_l3_driver *l3drv;
struct mbuf *m = i4b_Dgetmbuf(8 + 4);
u_int8_t *msg = mtod(m_in, u_int8_t*);
call_desc_t *cd;
u_int16_t applid, msgid;
u_int32_t PLCI;
u_int16_t Reason;
int bch;
if (!m) {
printf("capi%d: can't get mbuf for disconnect_resp\n", sc->sc_unit);
return;
}
msg = capimsg_getu16(msg + 2, &applid);
msg = capimsg_getu16(msg + 2, &msgid);
msg = capimsg_getu32(msg, &PLCI);
msg = capimsg_getu16(msg, &Reason);
for (bch = 0; bch < sc->sc_nbch; bch++)
if ((sc->sc_bchan[bch].state != B_FREE) &&
((sc->sc_bchan[bch].ncci & CAPI_PLCI_MASK) == PLCI))
break;
if (bch < sc->sc_nbch) {
/* We may not have a bchan assigned if call was ignored. */
cd = cd_by_cdid(sc->sc_bchan[bch].cdid);
sc->sc_bchan[bch].state = B_DISCONNECT_IND;
} else
cd = NULL;
if (cd) {
if ((Reason & 0xff00) == 0x3400) {
SET_CAUSE_TV(cd->cause_in, CAUSET_Q850, (Reason & 0x7f));
} else {
SET_CAUSE_TV(cd->cause_in, CAUSET_I4B, CAUSE_I4B_NORMAL);
}
i4b_l4_disconnect_ind(cd);
freecd_by_cd(cd);
sc->sc_bchan[bch].state = B_FREE;
l3drv = isdn_find_l3_by_isdnif(sc->capi_isdnif);
l3drv->bch_state[bch] = BCH_ST_FREE;
}
msg = capimsg_setu16(mtod(m, u_int8_t*), m->m_len);
msg = capimsg_setu16(msg, applid);
msg = capimsg_setu16(msg, CAPI_DISCONNECT_RESP);
msg = capimsg_setu16(msg, msgid);
msg = capimsg_setu32(msg, PLCI);
sc->send(sc, m);
}

View File

@ -1,382 +0,0 @@
/* $NetBSD: i4b_capi_msgs.h,v 1.4 2006/02/16 20:17:20 perry Exp $ */
/*
* Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* capi/capi_msgs.h The CAPI i4b message and handler declarations.
*
* $FreeBSD: src/sys/i4b/capi/capi_msgs.h,v 1.1 2001/05/25 08:39:31 hm Exp $
*/
#ifndef _NETISDN_I4B_CAPI_MSGS_H_
#define _NETISDN_I4B_CAPI_MSGS_H_
/* CAPI commands */
#define CAPI_ALERT 0x01
#define CAPI_CONNECT 0x02
#define CAPI_CONNECT_ACTIVE 0x03
#define CAPI_CONNECT_B3 0x82
#define CAPI_CONNECT_B3_ACTIVE 0x83
#define CAPI_CONNECT_B3_T90_ACTIVE 0x88
#define CAPI_DATA_B3 0x86
#define CAPI_DISCONNECT_B3 0x84
#define CAPI_DISCONNECT 0x04
#define CAPI_FACILITY 0x80
#define CAPI_INFO 0x08
#define CAPI_LISTEN 0x05
#define CAPI_MANUFACTURER 0xff
#define CAPI_RESET_B3 0x87
#define CAPI_SELECT_B_PROTOCOL 0x41
/* CAPI subcommands */
#define CAPI_REQ 0x80
#define CAPI_CONF 0x81
#define CAPI_IND 0x82
#define CAPI_RESP 0x83
/* CAPI combined commands */
#define CAPICMD(cmd,subcmd) (((subcmd)<<8)|(cmd))
#define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
#define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
#define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
#define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
#define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
#define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
#define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
#define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
#define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
#define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
#define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
#define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
#define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
#define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
#define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
#define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
#define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
#define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
#define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
#define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
#define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
#define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
#define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
#define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
#define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
#define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
#define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
#define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
#define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
#define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
#define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
#define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
#define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
#define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
#define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
#define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
#define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
#define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
#define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
#define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
#define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
#define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
#define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
#define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
/* CAPI message access helpers */
/*
* CAPI message header:
* word Length
* word ApplId
* byte Command
* byte Subcommand
* word MsgId
*
* Note that in the following, Controller/PLCI/NCCI is coded as follows:
* bits 0..6 = controller, bit 7 = ext/int, bits 8..15 = PLCI, and
* bits 16..31 = NCCI value.
*
* ALERT_REQ, 01 80:
* dword PLCI
* struct Additional Info
*
* ALERT_CONF, 01 81:
* dword PLCI
* word Info (0 = OK, other = cause)
*
* CONNECT_REQ, 02 80:
* dword controller
* word CIP
* struct Called party number
* struct Calling party number
* struct Called party subaddress
* struct Calling party subaddress
* struct Bearer Capability
* struct Low Layer Compatibility
* struct High Layer Compatibility
* struct Additional Info
*
* CONNECT_CONF, 02 81:
* dword PLCI
* word Info (0 = OK, other = cause)
*
* CONNECT_IND, 02 82:
* dword PLCI
* word CIP
* struct Called party number
* struct Calling party number
* struct Called party subaddress
* struct Calling party subaddress
* struct Bearer Capability
* struct Low Layer Compatibility
* struct High Layer Compatibility
* struct Additional Info
* struct Second Calling party number
*
* CONNECT_RESP, 02 83:
* dword PLCI
* word Reject (0 = accept, 1 = ignore, 2 = reject/normal clearing)
* struct B protocol
* struct Connected number
* struct Connected subaddress
* struct Low Layer Compatibility
* struct Additional Info
*
* CONNECT_ACTIVE_IND, 03 82:
* dword PLCI
* struct Connected number
* struct Connected subaddress
* struct Low Layer Compatibility
*
* CONNECT_ACTIVE_RESP, 03 83:
* dword PLCI
*
* CONNECT_B3_REQ, 82 80:
* dword PLCI
* struct NCPI
*
* CONNECT_B3_CONF, 82 81:
* dword NCCI
* word Info (0 = connected, other = cause)
*
* CONNECT_B3_IND, 82 82:
* dword NCCI
* struct NCPI
*
* CONNECT_B3_RESP, 82 83:
* dword NCCI
* word Reject (0 = accept, 2 = reject/normal clearing)
* struct NCPI
*
* CONNECT_B3_ACTIVE_IND, 83 82:
* dword NCCI
* struct NCPI
*
* CONNECT_B3_ACTIVE_RESP, 83 83:
* dword NCCI
*
* DATA_B3_REQ, 86 80:
* dword NCCI
* dword Data pointer
* word Data length
* word Data handle (packet id)
* word Flags (02 = more)
*
* DATA_B3_CONF, 86 81:
* dword NCCI
* word Data handle (packet id)
* word Info (0 = OK, other = cause)
*
* DATA_B3_IND, 86 82:
* dword NCCI
* dword Data pointer
* word Data length
* word Data handle (packet id)
* word Flags (02 = more)
*
* DATA_B3_RESP, 86 83:
* dword NCCI
* word Data handle (packet id)
*
* DISCONNECT_B3_REQ, 84 80:
* dword NCCI
* struct NCPI
*
* DISCONNECT_B3_CONF, 84 81:
* dword NCCI
* word Info (0 = OK, other = cause)
*
* DISCONNECT_B3_IND, 84 82:
* dword NCCI
* word Reason
* struct NCPI
*
* DISCONNECT_B3_RESP, 84 83:
* dword NCCI
*
* DISCONNECT_REQ, 04 80:
* dword PLCI
* struct Additional Info
*
* DISCONNECT_CONF, 04 81:
* dword PLCI
* word Info (0 = OK, other = cause)
*
* DISCONNECT_IND, 04 82:
* dword PLCI
* word Reason
*
* DISCONNECT_RESP, 04 83:
* dword PLCI
*
* LISTEN_REQ, 05 80:
* dword Controller
* dword Info mask (bits 0..9 used)
* dword CIP Mask (bit 0 = any match)
* dword CIP Mask 2 (bit 0 = any match)
* struct Calling party number
* struct Calling party subaddress
*
* LISTEN_CONF, 05 81:
* dword Controller
* word Info (0 = OK, other = cause)
*
* INFO_REQ, 08 80:
* dword Controller/PLCI
* struct Called party number
* struct Additional Info
*
* INFO_CONF, 08 81:
* dword Controller/PLCI
* word Info (0 = OK, other = cause)
*
* INFO_IND, 08 82:
* dword Controller/PLCI
* word Info number
* struct Info element
*
* INFO_RESP, 08 83:
* dword Controller/PLCI
*/
#define CAPIMSG_LEN(msg) (msg[0]|(msg[1]<<8))
#define CAPIMSG_DATALEN(msg) (msg[16]|(msg[17]<<8))
static __inline u_int8_t* capimsg_getu8(u_int8_t *msg, u_int8_t *val)
{
*val = *msg;
return (msg + 1);
}
static __inline u_int8_t* capimsg_getu16(u_int8_t *msg, u_int16_t *val)
{
*val = (msg[0]|(msg[1]<<8));
return (msg + 2);
}
static __inline u_int8_t* capimsg_getu32(u_int8_t *msg, u_int32_t *val)
{
*val = (msg[0]|(msg[1]<<8)|(msg[2]<<16)|(msg[3]<<24));
return (msg + 4);
}
static __inline u_int8_t* capimsg_setu8(u_int8_t *msg, u_int8_t val)
{
msg[0] = val;
return (msg + 1);
}
static __inline u_int8_t* capimsg_setu16(u_int8_t *msg, u_int16_t val)
{
msg[0] = (val & 0xff);
msg[1] = (val >> 8) & 0xff;
return (msg + 2);
}
static __inline u_int8_t* capimsg_setu32(u_int8_t *msg, u_int32_t val)
{
msg[0] = (val & 0xff);
msg[1] = (val >> 8) & 0xff;
msg[2] = (val >> 16) & 0xff;
msg[3] = (val >> 24) & 0xff;
return (msg + 4);
}
/*
// CAPI message handlers called by higher layers
*/
extern void capi_listen_req(capi_softc_t *sc, u_int32_t CIP);
extern void capi_alert_req(capi_softc_t *sc, call_desc_t *cd);
extern void capi_connect_req(capi_softc_t *sc, call_desc_t *cd);
extern void capi_connect_b3_req(capi_softc_t *sc, call_desc_t *cd);
extern void capi_connect_resp(capi_softc_t *sc, call_desc_t *cd);
extern void capi_data_b3_req(capi_softc_t *sc, int chan, struct mbuf *m);
extern void capi_disconnect_req(capi_softc_t *sc, call_desc_t *cd);
/*
// CAPI message handlers called by the receive routine
*/
extern void capi_listen_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_info_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_alert_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_active_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_b3_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_b3_active_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_connect_b3_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_data_b3_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_data_b3_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_disconnect_conf(capi_softc_t *sc, struct mbuf *m);
extern void capi_disconnect_b3_ind(capi_softc_t *sc, struct mbuf *m);
extern void capi_disconnect_ind(capi_softc_t *sc, struct mbuf *m);
#endif /* !_NETISDN_I4B_CAPI_MSGS_H_ */

View File

@ -1,149 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_cause.h - causes and cause handling for i4b
* -----------------------------------------------
*
* $Id: i4b_cause.h,v 1.3 2005/12/10 23:51:50 elad Exp $
*
* $FreeBSD$
*
* last edit-date: [Sun Feb 6 19:46:41 2000]
*
*---------------------------------------------------------------------------*/
#ifndef _NETISDN_I4B_CAUSE_H_
#define _NETISDN_I4B_CAUSE_H_
/*---------------------------------------------------------------------------*
* ISDN4BSD internal causes specification
*---------------------------------------------------------------------------*/
#define CAUSE_VAL 0x000000ff /* cause value */
#define CAUSE_TYPE 0x0000ff00 /* cause type */
#define CAUSET_Q850 0 /* value coded according to Q.850 */
#define CAUSET_I4B 1 /* i4b protocol independent causes*/
#define GET_CAUSE_VAL(cause) ((cause) & 0xff)
#define SET_CAUSE_VAL(dest, val) ((dest) = ((dest & 0xffffff00) | \
(val & 0x000000ff)))
#define GET_CAUSE_TYPE(cause) (((cause) >> 8) & 0xff)
#define SET_CAUSE_TYPE(dest, type) ((dest) = ((dest & 0xffff00ff) | \
((type << 8) & 0x0000ff00)))
#define SET_CAUSE_TV(dest, type, val) ((dest) = ((val & 0x000000ff) | \
((type << 8) & 0x0000ff00)))
/* CAUSET_I4B - protocol independent cause values */
#define CAUSE_I4B_NORMAL 0 /* normal call clearing */
#define CAUSE_I4B_BUSY 1 /* user busy */
#define CAUSE_I4B_NOCHAN 2 /* circuit/channel not available*/
#define CAUSE_I4B_INCOMP 3 /* incompatible source/dest */
#define CAUSE_I4B_REJECT 4 /* call rejected */
#define CAUSE_I4B_OOO 5 /* destination out of order */
#define CAUSE_I4B_TMPFAIL 6 /* temporary failure */
#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 layer3/i4b_q931.c when adding causes !!!!! */
/* CAUSET_Q850 - causes defined in Q.850 */
#define CAUSE_Q850_SHUTDN 0x00 /* normal D-channel shutdown */
#define CAUSE_Q850_NUNALLC 0x01 /* Unallocated (unassigned) number */
#define CAUSE_Q850_NRTTN 0x02 /* No route to specified transit network */
#define CAUSE_Q850_NRTDST 0x03 /* No route to destination */
#define CAUSE_Q850_SSINFTN 0x04 /* Send special information tone */
#define CAUSE_Q850_MDIALTP 0x05 /* Misdialled trunk prefix */
#define CAUSE_Q850_CHUNACC 0x06 /* Channel unacceptable */
#define CAUSE_Q850_CALLAWD 0x07 /* Call awarded and being delivered in an established channel */
#define CAUSE_Q850_PREEMPT 0x08 /* Preemption */
#define CAUSE_Q850_PREECRR 0x09 /* Preemption - circuit reserved for reuse */
#define CAUSE_Q850_NCCLR 0x10 /* Normal call clearing */
#define CAUSE_Q850_USRBSY 0x11 /* User busy */
#define CAUSE_Q850_NOUSRRSP 0x12 /* No user responding */
#define CAUSE_Q850_NOANSWR 0x13 /* No answer from user (user alerted) */
#define CAUSE_Q850_SUBSABS 0x14 /* Subscriber absent */
#define CAUSE_Q850_CALLREJ 0x15 /* Call rejected */
#define CAUSE_Q850_NUCHNG 0x16 /* Number changed */
#define CAUSE_Q850_NONSELUC 0x1A /* Non-selected user clearing */
#define CAUSE_Q850_DSTOOORDR 0x1B /* Destination out of order */
#define CAUSE_Q850_INVNUFMT 0x1C /* Invalid number format */
#define CAUSE_Q850_FACREJ 0x1D /* Facility rejected */
#define CAUSE_Q850_STENQRSP 0x1E /* Response to STATUS ENQUIRY */
#define CAUSE_Q850_NORMUNSP 0x1F /* Normal, unspecified */
#define CAUSE_Q850_NOCAVAIL 0x22 /* No circuit / channel available */
#define CAUSE_Q850_NETOOORDR 0x26 /* Network out of order */
#define CAUSE_Q850_PFMCDOOSERV 0x27 /* Permanent frame mode connection out of service */
#define CAUSE_Q850_PFMCOPER 0x28 /* Permanent frame mode connection operational */
#define CAUSE_Q850_TMPFAIL 0x29 /* Temporary failure */
#define CAUSE_Q850_SWEQCONG 0x2A /* Switching equipment congestion */
#define CAUSE_Q850_ACCINFDIS 0x2B /* Access information discarded */
#define CAUSE_Q850_REQCNOTAV 0x2C /* Requested circuit/channel not available */
#define CAUSE_Q850_PRECALBLK 0x2E /* Precedence call blocked */
#define CAUSE_Q850_RESUNAVAIL 0x2F /* Resources unavailable, unspecified */
#define CAUSE_Q850_QOSUNAVAIL 0x31 /* Quality of service unavailable */
#define CAUSE_Q850_REQSERVNS 0x32 /* Requested facility not subscribed */
#define CAUSE_Q850_OCBARRCUG 0x35 /* Outgoing calls barred within CUG */
#define CAUSE_Q850_ICBARRCUG 0x36 /* Incoming calls barred within CUG */
#define CAUSE_Q850_BCAPNAUTH 0x39 /* Bearer capability not authorized */
#define CAUSE_Q850_BCAPNAVAIL 0x3A /* Bearer capability not presently available */
#define CAUSE_Q850_INCSTOACISC 0x3E /* Inconsistenciy in designated outgoing access information and subscriber class */
#define CAUSE_Q850_SOONOTAVAIL 0x3F /* Service or option not available, unspecified */
#define CAUSE_Q850_BCAPNOTIMPL 0x41 /* Bearer capability not implemented */
#define CAUSE_Q850_CHTYPNIMPL 0x42 /* Channel type not implemented */
#define CAUSE_Q850_REQFACNIMPL 0x45 /* Requested facility not implemented */
#define CAUSE_Q850_ORDINBCAVL 0x46 /* Only restricted digital information bearer capability is available */
#define CAUSE_Q850_SOONOTIMPL 0x4F /* Service or option not implemented, unspecified */
#define CAUSE_Q850_INVCLRFVAL 0x51 /* Invalid call reference value */
#define CAUSE_Q850_IDCHDNOEX 0x52 /* Identified channel does not exist */
#define CAUSE_Q850_SUSCAEXIN 0x53 /* A suspended call exists, but this call identity does not */
#define CAUSE_Q850_CLIDINUSE 0x54 /* Call identity in use */
#define CAUSE_Q850_NOCLSUSP 0x55 /* No call suspended */
#define CAUSE_Q850_CLIDCLRD 0x56 /* Call having the requested call identity has been cleared */
#define CAUSE_Q850_UNOTMEMCUG 0x57 /* User not member of CUG */
#define CAUSE_Q850_INCDEST 0x58 /* Incompatible destination */
#define CAUSE_Q850_NONEXCUG 0x5A /* Non-existent CUG */
#define CAUSE_Q850_INVNTWSEL 0x5B /* Invalid transit network selection */
#define CAUSE_Q850_INVMSG 0x5F /* Invalid message, unspecified */
#define CAUSE_Q850_MIEMISS 0x60 /* Mandatory information element is missing */
#define CAUSE_Q850_MSGTNI 0x61 /* Message type non-existent or not implemented */
#define CAUSE_Q850_MSGNCMPT 0x62 /* Message not compatible with call state or message type non-existent or not implemented */
#define CAUSE_Q850_IENENI 0x63 /* Information element/parameter non-existent or not implemented */
#define CAUSE_Q850_INVIEC 0x64 /* Invalid information element contents */
#define CAUSE_Q850_MSGNCWCS 0x65 /* Message not compatible with call state */
#define CAUSE_Q850_RECOTIMEXP 0x66 /* Recovery on timer expiry */
#define CAUSE_Q850_PARMNENIPO 0x67 /* Parameter non-existent or not implemented, passed on */
#define CAUSE_Q850_MSGUNRDPRM 0x6E /* Message with unrecognized parameter, discarded */
#define CAUSE_Q850_PROTERR 0x6F /* Protocol error, unspecified */
#define CAUSE_Q850_INTWRKU 0x7F /* Interworking, unspecified */
#define CAUSE_Q850_MAX 128
#endif /* !_NETISDN_I4B_CAUSE_H_ */

View File

@ -1,383 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_ctl.c - i4b system control port driver
* ------------------------------------------
*
* $Id: i4b_ctl.c,v 1.24 2014/07/25 08:10:40 dholland Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Jan 5 11:33:46 2001]
*
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_ctl.c,v 1.24 2014/07/25 08:10:40 dholland Exp $");
#include "isdnctl.h"
#if NISDNCTL > 0
#include <sys/param.h>
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include <sys/ioccom.h>
#include <i386/isa/isa_device.h>
#else
#include <sys/ioctl.h>
#endif
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/fcntl.h>
#include <sys/socket.h>
#include <net/if.h>
#ifdef __FreeBSD__
#if defined(__FreeBSD__) && __FreeBSD__ == 3
#include "opt_devfs.h"
#endif
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
#endif /* __FreeBSD__ */
#ifdef __FreeBSD__
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
#elif defined(__bsdi__)
#include <i4b/i4b_debug.h>
#include <i4b/i4b_ioctl.h>
#else
#include <sys/bus.h>
#include <sys/device.h>
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#endif
#include <netisdn/i4b_global.h>
#include <netisdn/i4b_mbuf.h>
#include <netisdn/i4b_l3l4.h>
#include <netisdn/i4b_l2.h>
#include <netisdn/i4b_l1l2.h>
static int openflag = 0;
#if BSD > 199306 && defined(__FreeBSD__)
static d_open_t i4bctlopen;
static d_close_t i4bctlclose;
static d_ioctl_t i4bctlioctl;
#ifdef OS_USES_POLL
static d_poll_t i4bctlpoll;
#define POLLFIELD i4bctlpoll
#else
#define POLLFIELD noselect
#endif
#define CDEV_MAJOR 55
#if defined(__FreeBSD__) && __FreeBSD__ >= 4
static struct cdevsw i4bctl_cdevsw = {
/* open */ i4bctlopen,
/* close */ i4bctlclose,
/* read */ noread,
/* write */ nowrite,
/* ioctl */ i4bctlioctl,
/* poll */ POLLFIELD,
/* mmap */ nommap,
/* strategy */ nostrategy,
/* name */ "i4bctl",
/* maj */ CDEV_MAJOR,
/* dump */ nodump,
/* psize */ nopsize,
/* flags */ 0,
/* bmaj */ -1
};
#else
static struct cdevsw i4bctl_cdevsw =
{ i4bctlopen, i4bctlclose, noread, nowrite,
i4bctlioctl, nostop, nullreset, nodevtotty,
POLLFIELD, nommap, NULL, "i4bctl", NULL, -1 };
#endif
static void i4bctlattach(void *);
PSEUDO_SET(i4bctlattach, i4b_i4bctldrv);
#define PDEVSTATIC static
#endif /* __FreeBSD__ */
#if defined(__FreeBSD__) && __FreeBSD__ == 3
#ifdef DEVFS
static void *devfs_token;
#endif
#endif
#ifndef __FreeBSD__
#define PDEVSTATIC /* */
void isdnctlattach(void);
int isdnctlopen(dev_t dev, int flag, int fmt, struct lwp *l);
int isdnctlclose(dev_t dev, int flag, int fmt, struct lwp *l);
int isdnctlioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l);
#endif /* !FreeBSD */
#ifdef __NetBSD__
const struct cdevsw isdnctl_cdevsw = {
.d_open = isdnctlopen,
.d_close = isdnctlclose,
.d_read = noread,
.d_write = nowrite,
.d_ioctl = isdnctlioctl,
.d_stop = nostop,
.d_tty = notty,
.d_poll = nopoll,
.d_mmap = nommap,
.d_kqfilter = nokqfilter,
.d_discard = nodiscard,
.d_flag = D_OTHER
};
#endif /* __NetBSD__ */
#if BSD > 199306 && defined(__FreeBSD__)
/*---------------------------------------------------------------------------*
* initialization at kernel load time
*---------------------------------------------------------------------------*/
static void
i4bctlinit(void *unused)
{
#if defined(__FreeBSD__) && __FreeBSD__ >= 4
cdevsw_add(&i4bctl_cdevsw);
#else
dev_t dev = makedev(CDEV_MAJOR, 0);
cdevsw_add(&dev, &i4bctl_cdevsw, NULL);
#endif
}
SYSINIT(i4bctldev, SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR, &i4bctlinit, NULL);
#endif /* BSD > 199306 && defined(__FreeBSD__) */
#ifdef __bsdi__
int i4bctlmatch(device_t parent, cfdata_t cf, void *aux);
void dummy_i4bctlattach(struct device*, struct device *, void *);
#define CDEV_MAJOR 64
static struct cfdriver i4bctlcd =
{ NULL, "i4bctl", i4bctlmatch, dummy_i4bctlattach, DV_DULL,
sizeof(struct cfdriver) };
struct devsw i4bctlsw =
{ &i4bctlcd,
i4bctlopen, i4bctlclose, noread, nowrite,
i4bctlioctl, seltrue, nommap, nostrat,
nodump, nopsize, 0, nostop
};
int
i4bctlmatch(device_t parent, cfdata_t cf, void *aux)
{
printf("i4bctlmatch: aux=0x%x\n", aux);
return 1;
}
void
dummy_i4bctlattach(device_t parent, device_t self, void *aux)
{
printf("dummy_i4bctlattach: aux=0x%x\n", aux);
}
#endif /* __bsdi__ */
/*---------------------------------------------------------------------------*
* interface attach routine
*---------------------------------------------------------------------------*/
PDEVSTATIC void
#ifdef __FreeBSD__
isdnctlattach(void *dummy)
#else
isdnctlattach(void)
#endif
{
#if defined(__FreeBSD__)
#if __FreeBSD__ == 3
#ifdef DEVFS
devfs_token = devfs_add_devswf(&i4bctl_cdevsw, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0600,
"i4bctl");
#endif
#else
make_dev(&i4bctl_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "i4bctl");
#endif
#endif
}
/*---------------------------------------------------------------------------*
* i4bctlopen - device driver open routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
isdnctlopen(dev_t dev, int flag, int fmt,
struct lwp *l)
{
if(minor(dev))
return (ENXIO);
if(openflag)
return (EBUSY);
openflag = 1;
return (0);
}
/*---------------------------------------------------------------------------*
* i4bctlclose - device driver close routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
isdnctlclose(dev_t dev, int flag, int fmt,
struct lwp *l)
{
openflag = 0;
return (0);
}
/*---------------------------------------------------------------------------*
* i4bctlioctl - device driver ioctl routine
*---------------------------------------------------------------------------*/
PDEVSTATIC int
isdnctlioctl(dev_t dev, u_long cmd, void *data, int flag,
struct lwp *l)
{
#if DO_I4B_DEBUG
ctl_debug_t *cdbg;
int error = 0;
#endif
#if !DO_I4B_DEBUG
return(ENODEV);
#else
if(minor(dev))
return(ENODEV);
switch(cmd)
{
case I4B_CTL_GET_DEBUG:
cdbg = (ctl_debug_t *)data;
cdbg->l1 = i4b_l1_debug;
cdbg->l2 = i4b_l2_debug;
cdbg->l3 = i4b_l3_debug;
cdbg->l4 = i4b_l4_debug;
break;
case I4B_CTL_SET_DEBUG:
cdbg = (ctl_debug_t *)data;
i4b_l1_debug = cdbg->l1;
i4b_l2_debug = cdbg->l2;
i4b_l3_debug = cdbg->l3;
i4b_l4_debug = cdbg->l4;
break;
case I4B_CTL_GET_CHIPSTAT:
{
struct chipstat *cst;
l2_softc_t * scl2;
cst = (struct chipstat *)data;
scl2 = (l2_softc_t*)isdn_find_softc_by_isdnif(cst->driver_unit);
scl2->driver->mph_command_req(scl2->l1_token, CMR_GCST, cst);
break;
}
case I4B_CTL_CLR_CHIPSTAT:
{
struct chipstat *cst;
l2_softc_t * scl2;
cst = (struct chipstat *)data;
scl2 = (l2_softc_t*)isdn_find_softc_by_isdnif(cst->driver_unit);
scl2->driver->mph_command_req(scl2->l1_token, CMR_CCST, cst);
break;
}
case I4B_CTL_GET_LAPDSTAT:
{
l2stat_t *l2s;
l2_softc_t *sc;
l2s = (l2stat_t *)data;
sc = (l2_softc_t*)isdn_find_softc_by_isdnif(l2s->unit);
if (sc == NULL) {
error = EINVAL;
break;
}
memcpy(&l2s->lapdstat, &sc->stat, sizeof(lapdstat_t));
break;
}
case I4B_CTL_CLR_LAPDSTAT:
{
int *up;
l2_softc_t *sc;
up = (int *)data;
sc = (l2_softc_t*)isdn_find_softc_by_isdnif(*up);
if (sc == NULL) {
error = EINVAL;
break;
}
memset(&sc->stat, 0, sizeof(lapdstat_t));
break;
}
default:
error = ENOTTY;
break;
}
return(error);
#endif /* DO_I4B_DEBUG */
}
#if defined(__FreeBSD__) && defined(OS_USES_POLL)
/*---------------------------------------------------------------------------*
* i4bctlpoll - device driver poll routine
*---------------------------------------------------------------------------*/
static int
isdnctlpoll (dev_t dev, int events, struct lwp *l)
{
return (ENODEV);
}
#endif
#endif /* NISDNCTL > 0 */

View File

@ -1,311 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_debug.h - i4b debug header file
* -----------------------------------
*
* $Id: i4b_debug.h,v 1.10 2015/09/06 06:01:01 dholland Exp $
*
* $FreeBSD$
*
* last edit-date: [Wed May 31 09:51:34 2000]
*
*---------------------------------------------------------------------------*/
#ifndef _NETISDN_I4B_DEBUG_H_
#define _NETISDN_I4B_DEBUG_H_
#include <sys/ioccom.h>
#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 /* default = disable ALL debug messages */
#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 NDBGL1(bits, fmt, args...) \
if(bits & i4b_l1_debug) \
{ printf("%s (L1): %s: " fmt "\n", device_xname(sc->sc_dev), __func__ , ##args ); }
#define NDBGL2(bits, fmt, args...) \
if(bits & i4b_l2_debug) \
{ printf("i4b-L2 %s: " fmt "\n", __func__ , ##args ); }
#define NDBGL3(bits, fmt, args...) \
if(bits & i4b_l3_debug) \
{ printf("i4b-L3 %s: " fmt "\n", __func__ , ##args ); }
#define NDBGL4(bits, fmt, args...) \
if(bits & i4b_l4_debug) \
{ printf("i4b-L4 %s: " fmt "\n", __func__ , ##args ); }
#else /* !DO_I4B_DEBUG */
#define NDBGL1(bits, fmt, args...);
#define NDBGL2(bits, fmt, args...);
#define NDBGL3(bits, fmt, args...);
#define NDBGL4(bits, fmt, args...);
#endif /* DO_I4B_DEBUG */
/* Layer 1 */
#define L1_ERROR 0x0001 /* general error message*/
#define L1_PRIM 0x0002 /* interlayer primitives*/
#define L1_BCHAN 0x0004 /* B channel action */
#define L1_H_ERR 0x0008 /* HSCX errors */
#define L1_H_IRQ 0x0010 /* HSCX IRQ messages */
#define L1_I_ERR 0x0020 /* ISAC errors */
#define L1_I_MSG 0x0040 /* ISAC messages */
#define L1_I_SETUP 0x0080 /* ISAC setup messages */
#define L1_F_MSG 0x0100 /* FSM messages */
#define L1_F_ERR 0x0200 /* FSM error messages */
#define L1_T_MSG 0x0400 /* Timer messages */
#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 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
#define L1_DEBUG_DEFAULT L1_DEBUG_MAX
#else
#define L1_DEBUG_DEFAULT L1_DEBUG_ERR
#endif
#endif
/* Layer 2 */
#define L2_ERROR 0x0001 /* general error message */
#define L2_PRIM 0x0002 /* interlayer primitives */
#define L2_U_MSG 0x0004 /* U frame messages */
#define L2_U_ERR 0x0008 /* U frame error messages */
#define L2_S_MSG 0x0010 /* S frame messages */
#define L2_S_ERR 0x0020 /* S frame error messages */
#define L2_I_MSG 0x0040 /* I frame messages */
#define L2_I_ERR 0x0080 /* I frame error messages */
#define L2_F_MSG 0x0100 /* FSM messages */
#define L2_F_ERR 0x0200 /* FSM error messages */
#define L2_T_MSG 0x0400 /* timer messages */
#define L2_T_ERR 0x0800 /* timer error messages */
#define L2_TEI_MSG 0x1000 /* TEI messages */
#define L2_TEI_ERR 0x2000 /* TEI error messages */
#define L2_DEBUG_MAX 0x3fff /* all messages on */
#define L2_DEBUG_ERR (L2_ERROR | L2_I_ERR | L2_F_ERR | L2_T_ERR | L2_S_ERR | L2_TEI_ERR | L2_U_ERR )
#ifndef L2_DEBUG_DEFAULT
#ifdef DO_I4B_MAXDEBUG
#define L2_DEBUG_DEFAULT L2_DEBUG_MAX
#else
#define L2_DEBUG_DEFAULT L2_DEBUG_ERR
#endif
#endif
/* Layer 3 */
#define L3_ERR 0x0001 /* general error message */
#define L3_MSG 0x0002 /* general message */
#define L3_F_MSG 0x0004 /* FSM messages */
#define L3_F_ERR 0x0008 /* FSM error messages */
#define L3_T_MSG 0x0010 /* timer messages */
#define L3_T_ERR 0x0020 /* timer error messages */
#define L3_P_MSG 0x0040 /* protocol messages */
#define L3_P_ERR 0x0080 /* protocol error messages */
#define L3_A_MSG 0x0100 /* AOC messages */
#define L3_A_ERR 0x0200 /* AOC error messages */
#define L3_PRIM 0x0400 /* messages exchanged */
#define L3_DEBUG_MAX 0x07ff /* all messages on */
#define L3_DEBUG_ERR (L3_ERR | L3_F_ERR | L3_T_ERR | L3_P_ERR | L3_A_ERR)
#ifndef L3_DEBUG_DEFAULT
#ifdef DO_I4B_MAXDEBUG
#define L3_DEBUG_DEFAULT L3_DEBUG_MAX
#else
#define L3_DEBUG_DEFAULT L3_DEBUG_ERR
#endif
#endif
/* Layer 4 */
#define L4_ERR 0x0001 /* general error message */
#define L4_MSG 0x0002 /* general message */
#define L4_TIMO 0x0004 /* b channel idle timeout msgs */
#define L4_DIALST 0x0008 /* network driver dial states */
#define L4_IPRDBG 0x0010 /* ipr driver debug messages */
#define L4_RBCHDBG 0x0020 /* rbch driver debug messages */
#define L4_ISPDBG 0x0040 /* isp driver debug messages */
#define L4_TELDBG 0x0080 /* tel driver debug messages */
#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_IAVCDBG 0x1000 /* iavc driver debug messages */
#define L4_DEBUG_MAX 0x0fff /* all messages on */
#define L4_DEBUG_ERR (L4_ERR | L4_TINADBG | L4_TINAMSG | L4_TINAERR)
#ifndef L4_DEBUG_DEFAULT
#ifdef DO_I4B_MAXDEBUG
#define L4_DEBUG_DEFAULT L4_DEBUG_MAX
#else
#define L4_DEBUG_DEFAULT L4_DEBUG_ERR
#endif
#endif
/*---------------------------------------------------------------------------*
* ioctl via /dev/i4bctl:
* get/set current debug bits settings
*---------------------------------------------------------------------------*/
typedef struct {
unsigned int l1;
unsigned int l2;
unsigned int l3;
unsigned int l4;
} ctl_debug_t;
#define I4B_CTL_GET_DEBUG _IOR('C', 0, ctl_debug_t)
#define I4B_CTL_SET_DEBUG _IOW('C', 1, ctl_debug_t)
/*---------------------------------------------------------------------------*
* 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 */
int vfr;
int rdo;
int crc;
int rab;
int xdu;
int rfo;
} 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 */
u_long tx_sabme; /* SABME*/
u_long tx_dm; /* DM */
u_long tx_disc; /* DISC */
u_long tx_ua; /* UA */
u_long tx_frmr; /* FRMR */
u_long tx_tei; /* TEI */
/* receive */
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_disc; /* DISC */
u_long rx_xid; /* XID */
u_long rx_dm; /* DM */
u_long rx_ua; /* UA */
u_long rx_frmr; /* FRMR */
/* errors */
u_long err_rx_len; /* incorrect length */
u_long err_rx_badf; /* bad frame type */
u_long err_rx_bads; /* bad s frame */
u_long err_rx_badu; /* bad u frame */
u_long err_rx_badui; /* bad ui frame */
} lapdstat_t;
typedef struct {
int unit;
lapdstat_t lapdstat;
} l2stat_t;
#define I4B_CTL_GET_LAPDSTAT _IOWR('C', 4, l2stat_t)
#define I4B_CTL_CLR_LAPDSTAT _IOW('C', 5, int)
#endif /* !_NETISDN_I4B_DEUBG_H_ */
/* EOF */

View File

@ -1,157 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_global.h - i4b global include file
* --------------------------------------
*
* $Id: i4b_global.h,v 1.8 2007/10/14 23:44:49 martin Exp $
*
* $FreeBSD$
*
* last edit-date: [Thu Aug 24 12:38:50 2000]
*
*---------------------------------------------------------------------------*/
#ifndef _NETISDN_I4B_GLOBAL_H_
#define _NETISDN_I4B_GLOBAL_H_
/*---------------------------------------------------------------------------*
* hiding OS differences in the kernel
*---------------------------------------------------------------------------*/
/*---------------*/
/* time handling */
/*---------------*/
#ifdef __FreeBSD__
#include <sys/param.h>
#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000 && __FreeBSD_version < 400011
#error "Unsupported FreeBSD-current version,"
#error "you need a FreeBSD-current >= 400011"
#endif
#if defined(__FreeBSD_version) && __FreeBSD_version >= 300001
#define TIMEOUT_FUNC_T timeout_t *
#define SECOND time_second
#define MICROTIME(x) getmicrotime(&(x))
#else /* FreeBSD < 3 */
#define TIMEOUT_FUNC_T timeout_func_t
#define SECOND time.tv_sec
#define MICROTIME(x) microtime(&(x))
#endif /* >= 3 */
#endif /* __FreeBSD__ */
#if defined(__NetBSD__) /* after timecounter merge */
#define TIMEOUT_FUNC_T void *
#define SECOND time_uptime
#define MICROTIME(x) getmicrotime(&(x))
#endif /* __NetBSD__ */
#if defined (__OpenBSD__) || defined(__bsdi__)
#define TIMEOUT_FUNC_T void *
#define SECOND time.tv_sec
#define MICROTIME(x) microtime(&(x))
#endif /* __OpenBSD__ */
/*----------------*/
/* timer handling */
/*----------------*/
#if defined(__NetBSD__)
#if __NetBSD_Version__ >= 104230000
#define START_TIMER(XHANDLE, XF, XSC, XTIME) callout_reset(&XHANDLE, XTIME, (TIMEOUT_FUNC_T)XF, (void*)XSC)
#define STOP_TIMER(XHANDLE, XF, XSC) callout_stop(&XHANDLE)
#else
#define START_TIMER(XHANDLE, XF, XSC, XTIME) timeout((TIMEOUT_FUNC_T)XF, (void*)XSC, XTIME)
#define STOP_TIMER(XHANDLE, XF, XSC) untimeout((TIMEOUT_FUNC_T)XF, (void*)XSC)
#endif
#else
#define START_TIMER(XHANDLE, XF, XSC, XTIME) XHANDLE = timeout((TIMEOUT_FUNC_T)XF, (void*)XSC, XTIME)
#ifdef __FreeBSD__
#define STOP_TIMER(XHANDLE, XF, XSC) untimeout((TIMEOUT_FUNC_T)XF, (void*)XSC, XHANDLE)
#else
#define STOP_TIMER(XHANDLE, XF, XSC) untimeout((TIMEOUT_FUNC_T)XF, (void*)XSC)
#endif
#endif
/*----------------------*/
/* poll/select handling */
/*----------------------*/
#if (defined(__FreeBSD__) && \
(!defined(__FreeBSD_version) || (__FreeBSD_version < 300001))) \
|| defined (__OpenBSD__) || defined(__bsdi__)
#define OS_USES_SELECT
#else
#define OS_USES_POLL
#endif
/*---------------------------------------------------------------------------*
* misc globally used things in the kernel
*---------------------------------------------------------------------------*/
/* timer states */
#define TIMER_IDLE 1 /* a timer is running */
#define TIMER_ACTIVE 2 /* a timer is idle */
/* definitions for the STATUS indications L1 -> L2 -> L3 */
#define STI_ATTACH 0 /* attach at boot time */
#define STI_L1STAT 1 /* layer 1 status */
#define STI_L2STAT 2 /* layer 2 status */
#define STI_TEIASG 3 /* TEI assignments */
#define STI_PDEACT 4 /* Layer 1 T4 expired = persistent deactivation */
#define STI_NOL1ACC 5 /* no outgoing L1 access possible */
/* definitions for the COMMAND requests L3 -> L2 -> L1 */
#define CMR_DOPEN 0 /* daemon opened /dev/i4b */
#define CMR_DCLOSE 1 /* daemon closed /dev/i4b */
#define CMR_SETTRACE 2 /* set D-channel and B-channel trace */
#define CMR_GCST 3 /* get chipset statistics */
#define CMR_CCST 4 /* clear chipset statistics */
#define CMR_SETLEDS 5 /* set LEDs (if available) */
/* param for CMR_SETLEDS: */
#define CMRLEDS_TEI 1 /* this controller has a TEI */
#define CMRLEDS_B0 2 /* first B channel is in use */
#define CMRLEDS_B0_IN 4 /* first B channel handles an incoming call */
#define CMRLEDS_B1 8 /* second B channel is in use */
#define CMRLEDS_B1_IN 16 /* second B channel handles an incoming call */
#endif /* !_NETISDN_I4B_GLOBAL_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,292 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_iframe.c - i frame handling routines
* ------------------------------------------
*
* $Id: i4b_iframe.c,v 1.8 2005/12/11 12:25:06 christos Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Jan 5 11:33:47 2001]
*
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_iframe.c,v 1.8 2005/12/11 12:25:06 christos Exp $");
#ifdef __FreeBSD__
#include "i4bq921.h"
#else
#define NI4BQ921 1
#endif
#if NI4BQ921 > 0
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000
#include <sys/callout.h>
#endif
#ifdef __FreeBSD__
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#else
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#include <netisdn/i4b_trace.h>
#endif
#include <netisdn/i4b_global.h>
#include <netisdn/i4b_l2.h>
#include <netisdn/i4b_l1l2.h>
#include <netisdn/i4b_isdnq931.h>
#include <netisdn/i4b_mbuf.h>
#include <netisdn/i4b_l2fsm.h>
/*---------------------------------------------------------------------------*
* process i frame
* implements the routine "I COMMAND" Q.921 03/93 pp 68 and pp 77
*---------------------------------------------------------------------------*/
void
i4b_rxd_i_frame(l2_softc_t *l2sc, struct isdn_l3_driver *drv, struct mbuf *m)
{
u_char *ptr = m->m_data;
int nr;
int ns;
int p;
int s;
if(!((l2sc->tei_valid == TEI_VALID) &&
(l2sc->tei == GETTEI(*(ptr+OFF_TEI)))))
{
i4b_Dfreembuf(m);
return;
}
if((l2sc->Q921_state != ST_MULTIFR) && (l2sc->Q921_state != ST_TIMREC))
{
i4b_Dfreembuf(m);
NDBGL2(L2_I_ERR, "ERROR, state != (MF || TR)!");
return;
}
s = splnet();
l2sc->stat.rx_i++; /* update frame count */
nr = GETINR(*(ptr + OFF_INR));
ns = GETINS(*(ptr + OFF_INS));
p = GETIP(*(ptr + OFF_INR));
i4b_rxd_ack(l2sc, drv, nr); /* last packet ack */
if(l2sc->own_busy) /* own receiver busy ? */
{
i4b_Dfreembuf(m); /* yes, discard information */
if(p == 1) /* P bit == 1 ? */
{
i4b_tx_rnr_response(l2sc, p); /* yes, tx RNR */
l2sc->ack_pend = 0; /* clear ACK pending */
}
}
else /* own receiver ready */
{
if(ns == l2sc->vr) /* expected sequence number ? */
{
M128INC(l2sc->vr); /* yes, update */
l2sc->rej_excpt = 0; /* clr reject exception */
m_adj(m, I_HDR_LEN); /* strip i frame header */
l2sc->iframe_sent = 0; /* reset i acked already */
i4b_dl_data_ind(drv, m); /* pass data up */
if(!l2sc->iframe_sent)
{
i4b_tx_rr_response(l2sc, p); /* yes, tx RR */
l2sc->ack_pend = 0; /* clr ACK pending */
}
}
else /* ERROR, sequence number NOT expected */
{
i4b_Dfreembuf(m); /* discard information */
if(l2sc->rej_excpt == 1) /* already exception ? */
{
if(p == 1) /* immediate response ? */
{
i4b_tx_rr_response(l2sc, p); /* yes, tx RR */
l2sc->ack_pend = 0; /* clr ack pend */
}
}
else /* not in exception cond */
{
l2sc->rej_excpt = 1; /* set exception */
i4b_tx_rej_response(l2sc, p); /* tx REJ */
l2sc->ack_pend = 0; /* clr ack pending */
}
}
}
/* sequence number ranges as expected ? */
if(i4b_l2_nr_ok(nr, l2sc->va, l2sc->vs))
{
if(l2sc->Q921_state == ST_TIMREC)
{
l2sc->va = nr;
splx(s);
return;
}
if(l2sc->peer_busy) /* yes, other side busy ? */
{
l2sc->va = nr; /* yes, update ack count */
}
else /* other side ready */
{
if(nr == l2sc->vs) /* count expected ? */
{
l2sc->va = nr; /* update ack */
i4b_T200_stop(l2sc);
i4b_T203_restart(l2sc);
}
else
{
if(nr != l2sc->va)
{
l2sc->va = nr;
i4b_T200_restart(l2sc);
}
}
}
}
else
{
i4b_nr_error_recovery(l2sc); /* sequence error */
l2sc->Q921_state = ST_AW_EST;
}
splx(s);
}
/*---------------------------------------------------------------------------*
* internal I FRAME QUEUED UP routine (Q.921 03/93 p 61)
*---------------------------------------------------------------------------*/
void
i4b_i_frame_queued_up(l2_softc_t *l2sc)
{
struct mbuf *m;
u_char *ptr;
int s;
s = splnet();
if((l2sc->peer_busy) || (l2sc->vs == ((l2sc->va + MAX_K_VALUE) & 127)))
{
if(l2sc->peer_busy)
{
NDBGL2(L2_I_MSG, "regen IFQUP, cause: peer busy!");
}
if(l2sc->vs == ((l2sc->va + MAX_K_VALUE) & 127))
{
NDBGL2(L2_I_MSG, "regen IFQUP, cause: vs=va+k!");
}
/*
* XXX see: Q.921, page 36, 5.6.1 ".. may retransmit an I
* frame ...", shall we retransmit the last i frame ?
*/
if(!(IF_QEMPTY(&l2sc->i_queue)))
{
NDBGL2(L2_I_MSG, "re-scheduling IFQU call!");
START_TIMER(l2sc->IFQU_callout, i4b_i_frame_queued_up, l2sc, IFQU_DLY);
}
splx(s);
return;
}
IF_DEQUEUE(&l2sc->i_queue, m); /* fetch next frame to tx */
if(!m)
{
NDBGL2(L2_I_ERR, "ERROR, mbuf NULL after IF_DEQUEUE");
splx(s);
return;
}
ptr = m->m_data;
PUTSAPI(SAPI_CCP, CR_CMD_TO_NT, *(ptr + OFF_SAPI));
PUTTEI(l2sc->tei, *(ptr + OFF_TEI));
*(ptr + OFF_INS) = (l2sc->vs << 1) & 0xfe; /* bit 0 = 0 */
*(ptr + OFF_INR) = (l2sc->vr << 1) & 0xfe; /* P bit = 0 */
l2sc->stat.tx_i++; /* update frame counter */
l2sc->driver->ph_data_req(l2sc->l1_token, m, MBUF_DONTFREE); /* free'd when ack'd ! */
l2sc->iframe_sent = 1; /* in case we ack an I frame with another I frame */
if(l2sc->ua_num != UA_EMPTY) /* failsafe */
{
NDBGL2(L2_I_ERR, "ERROR, l2sc->ua_num: %d != UA_EMPTY", l2sc->ua_num);
i4b_print_l2var(l2sc);
i4b_Dfreembuf(l2sc->ua_frame);
}
l2sc->ua_frame = m; /* save unacked frame */
l2sc->ua_num = l2sc->vs; /* save frame number */
M128INC(l2sc->vs);
l2sc->ack_pend = 0;
splx(s);
if(l2sc->T200 == TIMER_IDLE)
{
i4b_T203_stop(l2sc);
i4b_T200_start(l2sc);
}
}
#endif /* NI4BQ921 > 0 */

View File

@ -1,630 +0,0 @@
/*
* 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
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
*
* i4b_ioctl.h - messages kernel <--> userland
* -------------------------------------------
*
* $Id: i4b_ioctl.h,v 1.14 2016/12/12 15:58:45 maya Exp $
*
* $FreeBSD$
*
* last edit-date: [Tue Oct 10 15:30:55 2000]
*
*---------------------------------------------------------------------------*/
#ifndef _NETISDN_I4B_IOCTL_H_
#define _NETISDN_I4B_IOCTL_H_
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#ifndef _MACHINE_TYPES_H_
#include <machine/types.h>
#endif /* _MACHINE_TYPES_H_ */
#endif /* __FreeBSD__ */
#include <sys/ioccom.h>
/*---------------------------------------------------------------------------*
* version and release number for isdn4bsd package
*---------------------------------------------------------------------------*/
#define VERSION 0 /* version number */
#define REL 96 /* release number */
#define STEP 00 /* release step */
/*---------------------------------------------------------------------------*
* date/time format in i4b log messages
* ------------------------------------
* Being year 2000 clean is not easy with the current state of the
* ANSI C library standard and its implementation for some locales.
* You might like to use the "%c" format of "strftime" sometimes,
* but this breaks Y2K in some locales. Also the old standard logfile
* format "%d.%m.%y %H:%M:%S" is non compliant.
* NetBSD's current toolset warns about this problems, and we compile
* with -Werror, so this problems need to be resolved.
*---------------------------------------------------------------------------*/
#define I4B_TIME_FORMAT "%d.%m.%Y %H:%M:%S"
/*---------------------------------------------------------------------------*
* ISDN D-channel protocols
*---------------------------------------------------------------------------*/
#define PROTOCOL_DSS1 0 /* default, Euro-ISDN/DSS1 */
#define PROTOCOL_D64S 1 /* 64k leased line, no protocol */
/*---------------------------------------------------------------------------*
* max length of some strings
*---------------------------------------------------------------------------*/
#define TELNO_MAX 41 /* max length of a telephone number (+ '\0') */
#define SUBADDR_MAX 22 /* max length of subaddres IE */
#define DISPLAY_MAX 91 /* max length of display information (+ '\0') */
#define DATETIME_MAX 21 /* max length of datetime information (+ '\0')*/
/*---------------------------------------------------------------------------*
* in case the src or dst telephone number is empty
*---------------------------------------------------------------------------*/
#define TELNO_EMPTY "NotAvailable"
/*---------------------------------------------------------------------------*
* B channel parameters
*---------------------------------------------------------------------------*/
#define BCH_MAX_DATALEN 2048 /* max length of a B channel frame */
/*---------------------------------------------------------------------------*
* B channel protocol
*---------------------------------------------------------------------------*/
#define BPROT_NONE 0 /* no protocol at all, raw data */
#define BPROT_RHDLC 1 /* raw HDLC: flag, data, crc, flag */
/*---------------------------------------------------------------------------*
* causes data type
*---------------------------------------------------------------------------*/
typedef unsigned int cause_t; /* 32 bit unsigned int */
/*---------------------------------------------------------------------------*
* call descriptor id (cdid) definitions
*---------------------------------------------------------------------------*/
#define CDID_UNUSED 0 /* cdid is invalid and unused */
#define CDID_MAX 99999 /* highest valid cdid, wraparound to 1 */
/*---------------------------------------------------------------------------*
* The shorthold algorithm to use
*---------------------------------------------------------------------------*/
#define SHA_FIXU 0 /* timeout algorithm for fix unit charging */
#define SHA_VARU 1 /* timeout algorithm for variable unit charging */
/*---------------------------------------------------------------------------*
* The shorthold data struct
*---------------------------------------------------------------------------*/
typedef struct {
int shorthold_algorithm; /* shorthold algorithm to use */
int unitlen_time; /* length of a charging unit */
int idle_time; /* time without activity on b ch*/
int earlyhup_time; /* safety area at end of unit */
} msg_shorthold_t;
/****************************************************************************
outgoing call:
--------------
userland kernel
-------- ------
CDID_REQ ----------------->
<------------------ cdid
CONNECT_REQ -------------->
<------------------ PROCEEDING_IND (if connect req ok)
<------------------ CONNECT_ACTIVE_IND (if connection ok)
or
<------------------ DISCONNECT_IND (if connection failed)
incoming call:
--------------
userland kernel
-------- ------
<------------------ CONNECT_IND
CONNECT_RESP ------------->
<------------------ CONNECT_ACTIVE_IND (if accepted)
active disconnect:
------------------
userland kernel
-------- ------
DISCONNECT_REQ ------------>
<------------------ DISCONNECT_IND
passive disconnect:
-------------------
userland kernel
-------- ------
<------------------ DISCONNECT_IND
****************************************************************************/
/*===========================================================================*
*===========================================================================*
* "read" messages from kernel -> userland
*===========================================================================*
*===========================================================================*/
/*---------------------------------------------------------------------------*
* message header, included in every message
*---------------------------------------------------------------------------*/
typedef struct {
char type; /* message identifier */
#define MSG_CONNECT_IND 'a'
#define MSG_CONNECT_ACTIVE_IND 'b'
#define MSG_DISCONNECT_IND 'c'
#define MSG_DIALOUT_IND 'd'
#define MSG_IDLE_TIMEOUT_IND 'e'
#define MSG_ACCT_IND 'f'
#define MSG_CHARGING_IND 'g'
#define MSG_PROCEEDING_IND 'h'
#define MSG_ALERT_IND 'i'
#define MSG_DRVRDISC_REQ 'j'
#define MSG_L12STAT_IND 'k'
#define MSG_TEIASG_IND 'l'
#define MSG_PDEACT_IND 'm'
#define MSG_NEGCOMP_IND 'n'
#define MSG_IFSTATE_CHANGED_IND 'o'
#define MSG_DIALOUTNUMBER_IND 'p'
#define MSG_PACKET_IND 'q'
#define MSG_CONTR_EV_IND 'r'
int cdid; /* call descriptor id */
} msg_hdr_t;
/*---------------------------------------------------------------------------*
* connect indication
* indicates incoming connection
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller number */
int channel; /* channel number */
#define CHAN_B1 0 /* this _must_ be 0, HSCX B1 is also 0 */
#define CHAN_B2 1 /* this _must_ be 1, HSCX B2 is also 1 */
#define CHAN_ANY (-1) /* outgoing, not possible for incoming */
#define CHAN_NO (-2) /* call waiting (CW) for incoming */
int bprot; /* b channel protocot, see BPROT_XXX */
char dst_telno[TELNO_MAX]; /* destination telno */
char src_telno[TELNO_MAX]; /* source telno */
int scr_ind;/* screening indicator */
#define SCR_NONE 0 /* no screening indicator transmitted */
#define SCR_USR_NOSC 1 /* screening user provided, not screened*/
#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*/
u_int8_t src_subaddr[SUBADDR_MAX];
u_int8_t dest_subaddr[SUBADDR_MAX];
u_int8_t type_plan;
} msg_connect_ind_t;
/*---------------------------------------------------------------------------*
* connect active indication
* indicates active connection
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller number actually used */
int channel; /* channel number actually used */
char datetime[DATETIME_MAX]; /* content of date/time IE */
} msg_connect_active_ind_t;
/*---------------------------------------------------------------------------*
* disconnect indication
* indicates a disconnect
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
cause_t cause; /* cause code */
} msg_disconnect_ind_t;
/*---------------------------------------------------------------------------*
* negotiation complete
* indicates an interface is completely up & running
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
} msg_negcomplete_ind_t;
/*---------------------------------------------------------------------------*
* interface changes internal state
* indicates an interface has somehow switched its FSM
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int state; /* new interface state */
} msg_ifstatechg_ind_t;
/*---------------------------------------------------------------------------*
* initiate a call to a remote site
* i.e. the IP driver got a packet and wants a connection
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int driver; /* driver type */
int driver_unit; /* driver unit number */
} msg_dialout_ind_t;
/*---------------------------------------------------------------------------*
* dial a number
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int driver; /* driver type */
int driver_unit; /* driver unit number */
int cmdlen; /* length of string */
char cmd[TELNO_MAX]; /* the number to dial */
} msg_dialoutnumber_ind_t;
/*---------------------------------------------------------------------------*
* idle timeout disconnect sent indication
* kernel has sent disconnect request because of b-ch idle
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
} msg_idle_timeout_ind_t;
/*---------------------------------------------------------------------------*
* accounting information from userland interface driver to daemon
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int accttype; /* accounting type */
#define ACCT_DURING 0
#define ACCT_FINAL 1
int ioutbytes; /* ISDN # of bytes sent */
int iinbytes; /* ISDN # of bytes received */
int outbps; /* bytes per sec out */
int inbps; /* bytes per sec in */
int outbytes; /* driver # of bytes sent */
int inbytes; /* driver # of bytes received */
} msg_accounting_ind_t;
/*---------------------------------------------------------------------------*
* charging information from isdn driver to daemon
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int units; /* number of units */
int units_type; /* type of units info */
#define CHARGE_INVALID 0 /* invalid, unknown */
#define CHARGE_AOCD 1 /* advice of charge during call */
#define CHARGE_AOCE 2 /* advice of charge at end of call */
#define CHARGE_CALC 3 /* locally calculated from rates information */
} msg_charging_ind_t;
/*---------------------------------------------------------------------------*
* call proceeding indication
* indicates outgoing SETUP has been acknowledged
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller number actually used */
int channel; /* channel number actually used */
} msg_proceeding_ind_t;
/*---------------------------------------------------------------------------*
* alert indication
* indicates remote user side "rings"
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
} msg_alert_ind_t;
/*---------------------------------------------------------------------------*
* driver requests to disconnect line
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
} msg_drvrdisc_req_t;
/*---------------------------------------------------------------------------*
* connect packet logging
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int driver; /* driver type */
int driver_unit; /* driver unit number */
int direction; /* 0=in 1=out */
#define DIRECTION_IN 0 /* sending packet to remote */
#define DIRECTION_OUT 1 /* received packet from remote */
#define MAX_PACKET_LOG 40 /* space for IP and TCP header */
u_int8_t pktdata[MAX_PACKET_LOG];
} msg_packet_ind_t;
/*---------------------------------------------------------------------------*
* state of layer 1/2
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller unit */
int layer; /* layer number (1/2) */
#define LAYER_ONE 1
#define LAYER_TWO 2
int state; /* state info */
#define LAYER_IDLE 0
#define LAYER_ACTIVE 1
} msg_l12stat_ind_t;
/*---------------------------------------------------------------------------*
* TEI assignment messages
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller unit */
int tei; /* TEI or -1 if invalid */
} msg_teiasg_ind_t;
/*---------------------------------------------------------------------------*
* persistent deactivation state of stack
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller unit */
int numactive; /* number of active connections */
} msg_pdeact_ind_t;
/*---------------------------------------------------------------------------*
* connect indication
* indicates incoming connection
*---------------------------------------------------------------------------*/
typedef struct {
msg_hdr_t header; /* common header */
int controller; /* controller number */
int event;
#define CTRL_EV_IND_DETACH 0
#define CTRL_EV_IND_ATTACH 1
} msg_ctrl_ev_ind_t;
/*===========================================================================*
*===========================================================================*
* "ioctl" messages from userland -> kernel
*===========================================================================*
*===========================================================================*/
/*---------------------------------------------------------------------------*
* request a unique cdid (to setup an outgoing call)
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
} msg_cdid_req_t;
#define I4B_CDID_REQ _IOWR('4', 0, int)
/*---------------------------------------------------------------------------*
* connect request
* requests an outgoing connection
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
int controller; /* controller to use */
int channel; /* channel to use */
int txdelay; /* tx delay after connect */
int bprot; /* b channel protocol */
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
msg_shorthold_t shorthold_data; /* the shorthold data */
int unitlen_method; /* how to calculate the unitlength */
#define ULEN_METHOD_STATIC 0 /* use unitlen_time value (see above) */
#define ULEN_METHOD_DYNAMIC 1 /* use AOCD */
char dst_telno[TELNO_MAX]; /* destination telephone no */
char src_telno[TELNO_MAX]; /* source telephone number */
} msg_connect_req_t;
#define I4B_CONNECT_REQ _IOW('4', 1, msg_connect_req_t)
/*---------------------------------------------------------------------------*
* connect response
* this is the answer to an incoming connect indication
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
int response; /* what to do with incoming call */
#define SETUP_RESP_DNTCRE 0 /* dont care, call is not for me */
#define SETUP_RESP_REJECT 1 /* reject call */
#define SETUP_RESP_ACCEPT 2 /* accept call */
cause_t cause; /* cause for case SETUP_RESP_REJECT */
/* the following are only used for SETUP_RESP_ACCEPT !! */
int txdelay; /* tx delay after connect */
int bprot; /* B chan protocol */
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
int max_idle_time; /* max time without activity on b ch */
} msg_connect_resp_t;
#define I4B_CONNECT_RESP _IOW('4', 2, msg_connect_resp_t)
/*---------------------------------------------------------------------------*
* disconnect request
* active disconnect request
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
cause_t cause; /* protocol independent cause */
} msg_discon_req_t;
#define I4B_DISCONNECT_REQ _IOW('4', 3, msg_discon_req_t)
/*---------------------------------------------------------------------------*
* controller info request
*---------------------------------------------------------------------------*/
typedef struct {
int controller; /* controller number */
int ncontroller; /* number of controllers in system */
int max_isdnif; /* highest available ISDN interface num */
int tei; /* tei controller probably has */
char devname[64]; /* autoconfig device name, i.e. "isic0" */
char cardname[80]; /* human readable brand / version */
int nbch; /* number of b channels provided */
} msg_ctrl_info_req_t;
#define I4B_CTRL_INFO_REQ _IOWR('4', 4, msg_ctrl_info_req_t)
/*---------------------------------------------------------------------------*
* dialout response
* status report to driver who requested a dialout
*---------------------------------------------------------------------------*/
typedef struct {
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
int stat; /* state of dialout request */
#define DSTAT_NONE 0
#define DSTAT_TFAIL 1 /* transient failure */
#define DSTAT_PFAIL 2 /* permanent failure */
#define DSTAT_INONLY 3 /* no outgoing dials allowed */
cause_t cause; /* exact i4b cause */
} msg_dialout_resp_t;
#define I4B_DIALOUT_RESP _IOW('4', 5, msg_dialout_resp_t)
/*---------------------------------------------------------------------------*
* timeout value update
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
msg_shorthold_t shorthold_data;
} msg_timeout_upd_t;
#define I4B_TIMEOUT_UPD _IOW('4', 6, msg_timeout_upd_t)
/*---------------------------------------------------------------------------*
* soft enable/disable
*---------------------------------------------------------------------------*/
typedef struct {
int driver; /* driver to route b channel data to */
int driver_unit; /* unit number for above driver */
int updown; /* what to do */
#define SOFT_ENA 0 /* enable interface */
#define SOFT_DIS 1 /* disable interface */
} msg_updown_ind_t;
#define I4B_UPDOWN_IND _IOW('4', 7, msg_updown_ind_t)
/*---------------------------------------------------------------------------*
* send alert request
*---------------------------------------------------------------------------*/
typedef struct {
int cdid; /* call descriptor id */
} msg_alert_req_t;
#define I4B_ALERT_REQ _IOW('4', 8, msg_alert_req_t)
/*---------------------------------------------------------------------------*
* request version and release info from kernel part
* (msg_vr_req_t is also used by tel & rbch drivers)
*---------------------------------------------------------------------------*/
typedef struct {
int version; /* version number */
int release; /* release number */
int step; /* release step number */
} msg_vr_req_t;
#define I4B_VR_REQ _IOR('4', 9, msg_vr_req_t)
/*---------------------------------------------------------------------------*
* set ISDN protocol used by a controller
*---------------------------------------------------------------------------*/
typedef struct {
int controller; /* controller number */
int protocol; /* ISDN D-channel protocol type */
} msg_prot_ind_t;
#define I4B_PROT_IND _IOW('4', 10, msg_prot_ind_t)
/*---------------------------------------------------------------------------*
* Query the identifier for a B channel driver
*---------------------------------------------------------------------------*/
#define L4DRIVER_NAME_SIZ 16
typedef struct {
char name[L4DRIVER_NAME_SIZ]; /* lookup this driver */
int driver_id; /* returned driver id */
} msg_l4driver_lookup_t;
#define I4B_L4DRIVER_LOOKUP _IOWR('4', 11, msg_l4driver_lookup_t)
/*---------------------------------------------------------------------------*
* Protocol download to active cards
*---------------------------------------------------------------------------*/
struct isdn_dr_prot {
size_t bytecount; /* length of code */
u_int8_t *microcode; /* pointer to microcode */
};
struct isdn_download_request {
int controller; /* controller number */
int numprotos; /* number of protocols in 'protocols' */
struct isdn_dr_prot *protocols;
};
#define I4B_CTRL_DOWNLOAD _IOW('4', 100, struct isdn_download_request)
/*---------------------------------------------------------------------------*
* Generic diagnostic interface for active cards
*---------------------------------------------------------------------------*/
struct isdn_diagnostic_request {
int controller; /* controller number */
u_int32_t cmd; /* diagnostic command to execute */
size_t in_param_len; /* length of additional input parameter */
#define I4B_ACTIVE_DIAGNOSTIC_MAXPARAMLEN 65536
void *in_param; /* optional input parameter */
size_t out_param_len; /* available output space */
void *out_param; /* output data goes here */
};
#define I4B_ACTIVE_DIAGNOSTIC _IOW('4', 102, struct isdn_diagnostic_request)
#endif /* !_NETISDN_I4B_IOCTL_H_ */

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More