--- sys/conf/files.org.c4b	Wed Sep 22 21:23:37 2004
+++ sys/conf/files	Wed Mar 23 22:51:03 2005
@@ -992,6 +992,17 @@
 gnu/ext2fs/ext2_vfsops.c	optional ext2fs
 gnu/ext2fs/ext2_vnops.c		optional ext2fs
 #
+# the CAPI manager with the kernel CAPI interface for drivers and applications
+#
+c4b/kcapimgr/kcapimgr.c         optional kcapimgr
+c4b/kcapimgr/kcapi_appl.c       optional kcapimgr
+c4b/kcapimgr/kcapi_ctlr.c       optional kcapimgr
+c4b/kcapimgr/kcapi_trace.c      optional kcapimgr
+#
+# the CAPI device for CAPI support for user space applications
+#
+c4b/capidev/capidev.c   optional capidev
+#
 # isdn4bsd device drivers
 #
 i4b/driver/i4b_trace.c		count i4btrc
--- sys/conf/options.org.c4b	Wed Sep 22 21:23:37 2004
+++ sys/conf/options	Wed Mar 23 22:51:03 2005
@@ -469,6 +469,15 @@
 SI_DEBUG		opt_debug_si.h
 SX_DEBUG		opt_debug_sx.h
 
+#
+# options for the CAPI manager
+#
+KCAPIMGR_LOG_LEVEL      opt_kcapimgr.h
+#
+# options for the CAPI device to user land
+#
+CAPIDEV_LOG_LEVEL       opt_capidev.h
+
 # Fb options
 FB_DEBUG		opt_fb.h
 FB_INSTALL_CDEV		opt_fb.h
--- sys/conf/files.i386.org.c4b	Sun Oct 24 20:02:52 2004
+++ sys/conf/files.i386	Wed Mar 23 22:51:03 2005
@@ -320,6 +320,44 @@
 	warning "COMPAT_SVR4 is broken and should be avoided"
 i386/svr4/svr4_machdep.c	optional	compat_svr4
 #
+# the CAPI manager driver for AVM active ISDN controllers
+#
+c4b/driver/avmaic/avmaic.c      optional avmaic
+c4b/driver/avmaic/avmaic_misc.c optional avmaic
+c4b/driver/avmaic/avmb1.c       optional avmaic
+c4b/driver/avmaic/avmarm.c      optional avmaic
+c4b/driver/avmaic/avmdma.c      optional avmaic
+c4b/driver/avmaic/avmio.c       optional avmaic
+c4b/driver/avmaic/avmt1.c       optional avmaic
+#
+# the CAPI manager driver for legacy Diehl active ISDN controllers
+#
+c4b/driver/daic/daic.c          optional daic
+c4b/driver/daic/daic_bootstrap.c optional daic
+c4b/driver/daic/daic_dispatch.c optional daic
+c4b/driver/daic/daic_globalid.c optional daic
+c4b/driver/daic/daic_hw.c       optional daic
+c4b/driver/daic/daic_misc.c     optional daic
+c4b/driver/daic/daic_ncci.c     optional daic
+c4b/driver/daic/daic_plci.c     optional daic
+#
+# the CAPI manager driver for IX1 active ISDN controllers (ITK, Digi Datafire)
+#
+c4b/driver/ix1a/ix1a.c		optional ix1a
+c4b/driver/ix1a/ix1a_bpci.c	optional ix1a
+c4b/driver/ix1a/ix1a_isa.c	optional ix1a
+c4b/driver/ix1a/ix1a_misc.c	optional ix1a
+c4b/driver/ix1a/ix1a_ppci.c	optional ix1a
+c4b/driver/ix1a/ix1a_shm.c	optional ix1a
+#
+# i4b driver to support CAPIMGR controllers
+#
+i4b/i4bcapimgr/i4bcapimgr.c             optional i4bcapimgr
+i4b/i4bcapimgr/i4bcmgr_l4if.c           optional i4bcapimgr
+i4b/i4bcapimgr/i4bcmgr_plcism.c         optional i4bcapimgr
+i4b/i4bcapimgr/i4bcmgr_nccism.c         optional i4bcapimgr
+i4b/i4bcapimgr/i4bcmgr_capiutil.c       optional i4bcapimgr
+#
 # isdn4bsd, needed for isic | iwic | ifpi | ifpi2 | ihfc | ifpnp | itjc
 #
 i4b/layer1/i4b_hdlc.c	          	optional        itjc
--- sys/conf/options.i386.org.c4b	Mon Aug 16 14:25:47 2004
+++ sys/conf/options.i386	Wed Mar 23 22:51:03 2005
@@ -123,6 +123,31 @@
 # Enables NETGRAPH support for Cronyx adapters
 NETGRAPH_CRONYX		opt_ng_cronyx.h
 
+#
+# options for the CAPI driver for AVM active ISDN controllers
+#
+AVMAIC_LOG_LEVEL                opt_avmaic.h
+AVMAIC_MAX_APPLICATIONS         opt_avmaic.h
+AVMAIC_MAX_NCCI_PER_CHANNEL     opt_avmaic.h
+#
+# options for the CAPI driver for legacy Diehl active ISDN controllers
+#
+DAIC_LOG_LEVEL			opt_daic.h
+DAIC_MAX_APPLICATIONS		opt_daic.h
+DAIC_MAX_NCCI_PER_PLCI		opt_daic.h
+DAIC_MAX_NCCI_PER_PORT		opt_daic.h
+DAIC_MAX_PLCI_PER_PORT		opt_daic.h
+#
+# options for the CAPI driver for IX1 active ISDN controllers
+#
+IX1A_LOG_LEVEL			opt_ix1a.h
+
+#
+# options for the i4b driver to support CAPIMGR controllers
+#
+I4BCAPIMGR_LOG_LEVEL               opt_i4bcapimgr.h
+I4BCAPIMGR_ALLOC_MAX_BDATA_SIZE    opt_i4bcapimgr.h
+
 # -------------------------------
 # isdn4bsd: passive ISA cards
 # -------------------------------
--- sys/conf/files.amd64.org.c4b	Mon Aug 16 14:51:33 2004
+++ sys/conf/files.amd64	Wed Mar 23 22:58:42 2005
@@ -185,3 +185,41 @@
 compat/linux/linux_sysctl.c	optional	compat_linux32
 compat/linux/linux_uid16.c	optional	compat_linux32
 compat/linux/linux_util.c	optional	compat_linux32
+#
+# the CAPI manager driver for AVM active ISDN controllers
+#
+c4b/driver/avmaic/avmaic.c      optional avmaic
+c4b/driver/avmaic/avmaic_misc.c optional avmaic
+c4b/driver/avmaic/avmb1.c       optional avmaic
+c4b/driver/avmaic/avmarm.c      optional avmaic
+c4b/driver/avmaic/avmdma.c      optional avmaic
+c4b/driver/avmaic/avmio.c       optional avmaic
+c4b/driver/avmaic/avmt1.c       optional avmaic
+#
+# the CAPI manager driver for legacy Diehl active ISDN controllers
+#
+c4b/driver/daic/daic.c          optional daic
+c4b/driver/daic/daic_bootstrap.c optional daic
+c4b/driver/daic/daic_dispatch.c optional daic
+c4b/driver/daic/daic_globalid.c optional daic
+c4b/driver/daic/daic_hw.c       optional daic
+c4b/driver/daic/daic_misc.c     optional daic
+c4b/driver/daic/daic_ncci.c     optional daic
+c4b/driver/daic/daic_plci.c     optional daic
+#
+# the CAPI manager driver for IX1 active ISDN controllers (ITK, Digi Datafire)
+#
+c4b/driver/ix1a/ix1a.c		optional ix1a
+c4b/driver/ix1a/ix1a_bpci.c	optional ix1a
+c4b/driver/ix1a/ix1a_isa.c	optional ix1a
+c4b/driver/ix1a/ix1a_misc.c	optional ix1a
+c4b/driver/ix1a/ix1a_ppci.c	optional ix1a
+c4b/driver/ix1a/ix1a_shm.c	optional ix1a
+#
+# i4b driver to support CAPIMGR controllers
+#
+#XXX#i4b/i4bcapimgr/i4bcapimgr.c             optional i4bcapimgr
+#XXX#i4b/i4bcapimgr/i4bcmgr_l4if.c           optional i4bcapimgr
+#XXX#i4b/i4bcapimgr/i4bcmgr_plcism.c         optional i4bcapimgr
+#XXX#i4b/i4bcapimgr/i4bcmgr_nccism.c         optional i4bcapimgr
+#XXX#i4b/i4bcapimgr/i4bcmgr_capiutil.c       optional i4bcapimgr
--- sys/conf/options.amd64.org.c4b	Mon Aug 16 13:09:59 2004
+++ sys/conf/options.amd64	Wed Mar 23 22:56:31 2005
@@ -31,6 +31,31 @@
 
 ATKBD_DFLT_KEYMAP	opt_atkbd.h
 
+#
+# options for the CAPI driver for AVM active ISDN controllers
+#
+AVMAIC_LOG_LEVEL		opt_avmaic.h
+AVMAIC_MAX_APPLICATIONS		opt_avmaic.h
+AVMAIC_MAX_NCCI_PER_CHANNEL	opt_avmaic.h
+#
+# options for the CAPI driver for legacy Diehl active ISDN controllers
+#
+DAIC_LOG_LEVEL			opt_daic.h
+DAIC_MAX_APPLICATIONS		opt_daic.h
+DAIC_MAX_NCCI_PER_PLCI		opt_daic.h
+DAIC_MAX_NCCI_PER_PORT		opt_daic.h
+DAIC_MAX_PLCI_PER_PORT		opt_daic.h
+#
+# options for the CAPI driver for IX1 active ISDN controllers
+#
+IX1A_LOG_LEVEL			opt_ix1a.h
+
+#
+# options for the i4b driver to support CAPIMGR controllers
+#
+I4BCAPIMGR_LOG_LEVEL               opt_i4bcapimgr.h
+I4BCAPIMGR_ALLOC_MAX_BDATA_SIZE    opt_i4bcapimgr.h
+
 # -------------------------------
 # isdn4bsd: passive PCI cards
 # -------------------------------
--- sys/conf/NOTES.org.c4b	Wed Sep 22 21:23:36 2004
+++ sys/conf/NOTES	Wed Mar 23 22:51:03 2005
@@ -2441,6 +2441,22 @@
 #
 #options 	NSWBUF_MIN=120
 
+#
+# kernel and user space CAPI support
+#
+# Note: Compiling these two modules as separate modules (i.e. not directly into
+#       the kernel) is preferred. So it is better to comment out the following
+#       two lines.
+#
+# supported options:
+#    KCAPIMGR_LOG_LEVEL         initializes the log level for the CAPI manager,
+#                               integer value
+#    CAPIDEV_LOG_LEVEL          initialize the log level for the CAPI device to
+#                               user space applications, integer value
+#
+device   "kcapimgr"
+device   "capidev"
+
 #####################################################################
 
 # More undocumented options for linting.
--- sys/conf/kern.pre.mk.org.c4b	Fri Aug 13 16:30:26 2004
+++ sys/conf/kern.pre.mk	Wed Mar 23 22:51:03 2005
@@ -66,6 +66,10 @@
 # ... and the same for the NgATM stuff
 INCLUDES+= -I$S/contrib/ngatm
 
+# This lets us use the same CAPI header files under /usr/include and within the
+# kernel in the directory sys/c4b/include.
+INCLUDES+= -I$S/c4b/include
+
 CFLAGS=	${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
 CFLAGS+= ${INCLUDES} -D_KERNEL -include opt_global.h
 .if ${CC} != "icc"
