summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Knoblich <stkn@gentoo.org>2005-11-18 16:34:14 +0000
committerStefan Knoblich <stkn@gentoo.org>2005-11-18 16:34:14 +0000
commit21f682ddb1beeaee850d3927d2bdfc5a61cc4858 (patch)
tree7a1ad90c9a27ba8c18646a511e39f2f27c71c7e7 /net-misc/zaptel/files
parentAdded several new use flags for zaptel-1.2.0 (diff)
downloadgentoo-2-21f682ddb1beeaee850d3927d2bdfc5a61cc4858.tar.gz
gentoo-2-21f682ddb1beeaee850d3927d2bdfc5a61cc4858.tar.bz2
gentoo-2-21f682ddb1beeaee850d3927d2bdfc5a61cc4858.zip
Version bumped and removed old beta version
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'net-misc/zaptel/files')
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.2.01
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.2.0_beta11
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.0-devfs26.diff220
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.0-gentoo.diff (renamed from net-misc/zaptel/files/zaptel-1.2.0_beta1-gentoo.diff)89
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.0-ukcid.patch139
5 files changed, 399 insertions, 51 deletions
diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.0 b/net-misc/zaptel/files/digest-zaptel-1.2.0
new file mode 100644
index 000000000000..16f5dc990fb5
--- /dev/null
+++ b/net-misc/zaptel/files/digest-zaptel-1.2.0
@@ -0,0 +1 @@
+MD5 83d4aaab1594c5aa0dedc6b4f221fb48 zaptel-1.2.0.tar.gz 596257
diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.0_beta1 b/net-misc/zaptel/files/digest-zaptel-1.2.0_beta1
deleted file mode 100644
index 4692000c31fd..000000000000
--- a/net-misc/zaptel/files/digest-zaptel-1.2.0_beta1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 528633610716bdb79f65e8d73a171b47 zaptel-1.2.0-beta1.tar.gz 571870
diff --git a/net-misc/zaptel/files/zaptel-1.2.0-devfs26.diff b/net-misc/zaptel/files/zaptel-1.2.0-devfs26.diff
new file mode 100644
index 000000000000..d9cfef230180
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.0-devfs26.diff
@@ -0,0 +1,220 @@
+--- zaptel-1.2.0-beta2/zaptel.c.orig 2005-10-04 20:34:36.000000000 +0000
++++ zaptel-1.2.0-beta2/zaptel.c 2005-11-07 21:08:39.000000000 +0000
+@@ -148,12 +148,14 @@
+
+ /* Here are a couple important little additions for devfs */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t zaptel_devfs_dir;
+ static devfs_handle_t channel;
+ static devfs_handle_t pseudo;
+ static devfs_handle_t ctl;
+ static devfs_handle_t timer;
+ #endif
++#endif
+
+ /* udev necessary data structures. Yeah! */
+ #ifdef CONFIG_ZAP_UDEV
+@@ -1123,6 +1125,7 @@
+ }
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ static devfs_handle_t register_devfs_channel(struct zt_chan *chan, devfs_handle_t dir)
+ {
+ char path[100];
+@@ -1165,6 +1168,36 @@
+
+ return chan_dev;
+ }
++#else
++static dev_t register_devfs_channel(struct zt_chan *chan, dev_t dir)
++{
++#ifdef HAS_DEVFS_MK_SYMLINK
++ char link[100];
++ char path[100];
++#endif
++ dev_t chan_dev;
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++
++ /* create /dev/zap/span%d/%d channel device node */
++ if ((chan_dev = devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/span%d/%d", dir, chan->chanpos)) < 0) {
++ printk("zaptel: Something really bad happened. Unable to register devfs entry\n");
++ return 0;
++ }
++
++#ifdef HAS_DEVFS_MK_SYMLINK
++ /* link /dev/zap/span%d/%d -> /dev/zap/%d ?!? */
++ sprintf(path, "zap/span%d/%d", dir, chan->chanpos);
++ sprintf(link, "zap/%d", chan->channo);
++ devfs_mk_symlink(link, path);
++#else
++ /* register /dev/zap/%d channel node directly */
++ if(devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/%d", chan->channo) < 0) {
++ printk("zaptel: Unable to register compat devfs entry\n");
++ }
++#endif
++ return chan_dev;
++}
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ static int zt_chan_reg(struct zt_chan *chan)
+@@ -4429,6 +4462,7 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ char span_name[50];
+ sprintf(span_name, "span%d", span->spanno);
+@@ -4438,6 +4472,15 @@
+ chan->fhandle = register_devfs_channel(chan, chan->span->dhandle); /* Register our stuff with devfs */
+ }
+ }
++#else
++ {
++ devfs_mk_dir("zap/span%d", span->spanno);
++ for (x = 0; x < span->channels; x++) {
++ struct zt_chan *chan = &span->chans[x];
++ register_devfs_channel(chan, span->spanno); /* Register our stuff with devfs */
++ }
++ }
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -4485,11 +4528,22 @@
+ remove_proc_entry(tempfile, NULL);
+ #endif /* CONFIG_PROC_FS */
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ for (x = 0; x < span->channels; x++) {
+ devfs_unregister(span->chans[x].fhandle);
+ devfs_unregister(span->chans[x].fhandle_symlink);
+ }
+ devfs_unregister(span->dhandle);
++#else
++ for (x = 0; x < span->channels; x++) {
++ /* remove symlink/compat device first */
++ devfs_remove("zap/%d", span->chans[x].channo);
++ /* remove channel device */
++ devfs_remove("zap/span%d/%d", span->spanno, span->chans[x].chanpos);
++ }
++ /* remove span dir */
++ devfs_remove("zap/span%d", span->spanno);
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+
+ #ifdef CONFIG_ZAP_UDEV
+@@ -6510,6 +6564,7 @@
+ #endif /* CONFIG_ZAP_UDEV */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ {
+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
+ devfs_register_chrdev(ZT_MAJOR, "zaptel", &zt_fops);
+@@ -6521,6 +6576,22 @@
+ ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, mode, &zt_fops, NULL);
+ }
+ #else
++ {
++ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
++ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops)) < 0) {
++ printk(KERN_ERR "Unable to register for device on %d, error: %d\n", ZT_MAJOR, res);
++ return res;
++ }
++
++ devfs_mk_dir("zap");
++
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 253), mode, "zap/timer");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 254), mode, "zap/channel");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 255), mode, "zap/pseudo");
++ devfs_mk_cdev(MKDEV(ZT_MAJOR, 0), mode, "zap/ctl");
++ }
++#endif
++#else
+ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops))) {
+ printk(KERN_ERR "Unable to register tor device on %d\n", ZT_MAJOR);
+ return res;
+@@ -6551,6 +6622,7 @@
+ if (tone_zones[x])
+ kfree(tone_zones[x]);
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_unregister(timer);
+ devfs_unregister(channel);
+ devfs_unregister(pseudo);
+@@ -6566,6 +6638,16 @@
+ class_destroy(zap_class);
+ #endif /* CONFIG_ZAP_UDEV */
+ unregister_chrdev(ZT_MAJOR, "zaptel");
++
++ devfs_remove("zap/timer");
++ devfs_remove("zap/ctl");
++ devfs_remove("zap/pseudo");
++ devfs_remove("zap/channel");
++
++ devfs_remove("zap");
++#endif
++#else
++ unregister_chrdev(ZT_MAJOR, "zaptel");
+ #endif
+ #ifdef CONFIG_ZAPTEL_WATCHDOG
+ watchdog_cleanup();
+--- zaptel-1.2.0-beta2/zaptel.h.orig 2005-10-27 16:05:07.000000000 +0000
++++ zaptel-1.2.0-beta2/zaptel.h 2005-11-07 21:08:39.000000000 +0000
+@@ -52,18 +52,17 @@
+ #define zap_pci_module pci_register_driver
+ #else
+ #define zap_pci_module pci_module_init
++/* devfs_mk_symlink has been removed in 2.6.10 */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
++#define HAS_DEVFS_MK_SYMLINK
++#endif
+ #endif
+
+ #include "ecdis.h"
+ #include "fasthdlc.h"
+ #endif
+ #ifdef CONFIG_DEVFS_FS
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+ #include <linux/devfs_fs_kernel.h>
+-#else
+-#undef CONFIG_DEVFS_FS
+-//#warning "Zaptel doesn't support DEVFS in post 2.4 kernels. Disabling DEVFS in zaptel"
+-#endif
+ #endif /* CONFIG_DEVFS_FS */
+ #include <linux/ioctl.h>
+
+@@ -71,6 +70,8 @@
+ #define ELAST 500
+ #endif
+
++
++
+ /* Per-span configuration values */
+ #define ZT_CONFIG_TXLEVEL 7 /* bits 0-2 are tx level */
+
+@@ -1172,8 +1173,10 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t fhandle; /* File handle in devfs for the channel */
+ devfs_handle_t fhandle_symlink;
++#endif
+ #endif /* CONFIG_DEVFS_FS */
+ };
+
+@@ -1309,7 +1312,9 @@
+ int lastalarms; /* Previous alarms */
+
+ #ifdef CONFIG_DEVFS_FS
++#ifndef LINUX26
+ devfs_handle_t dhandle; /* Directory name */
++#endif
+ #endif
+ /* If the watchdog detects no received data, it will call the
+ watchdog routine */
diff --git a/net-misc/zaptel/files/zaptel-1.2.0_beta1-gentoo.diff b/net-misc/zaptel/files/zaptel-1.2.0-gentoo.diff
index f8445f72290f..2470a576cd3c 100644
--- a/net-misc/zaptel/files/zaptel-1.2.0_beta1-gentoo.diff
+++ b/net-misc/zaptel/files/zaptel-1.2.0-gentoo.diff
@@ -1,5 +1,5 @@
---- zaptel/Makefile.orig 2005-08-15 18:18:49.000000000 +0200
-+++ zaptel/Makefile 2005-08-15 18:33:42.000000000 +0200
+--- zaptel-1.2.0-beta2/Makefile.orig 2005-10-16 16:07:49.000000000 +0000
++++ zaptel-1.2.0-beta2/Makefile 2005-11-07 21:01:42.000000000 +0000
@@ -21,7 +21,7 @@
endif
KINCLUDES:=$(KSRC)/include
@@ -47,78 +47,67 @@
endif
CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
-@@ -312,7 +292,7 @@
- docbook2man -o doc doc/ztmonitor.sgml
- gzip doc/ztmonitor.8
+@@ -296,7 +276,7 @@
+ @echo "**** If you are running udev, read README.udev"
+ endif
-install: all devices
+install: devices
install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
if [ -f sethdlc-new ]; then \
install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
-@@ -339,49 +319,27 @@
+@@ -323,39 +303,22 @@
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o; \
fi
install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
- [ `id -u` = 0 ] && /sbin/ldconfig || :
++ [ `id -u` = 0 ] && /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib || :
rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); fi
install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h
install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
-- install -m 644 doc/ztcfg.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- install -m 644 doc/ztmonitor.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- install -m 644 doc/zttool.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-- if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi
-- cat $(MODCONF).bak | grep -v "alias char-major-250" | \
-- grep -v "post-install torisa /sbin/ztcfg" | \
-- grep -v "post-install wcfxsusb /sbin/ztcfg" | \
-- grep -v "alias wctdm" | \
-- grep -v "post-install wctdm /sbin/ztcfg" > $(MODCONF) || true
-+ install -D -m 644 doc/ztcfg.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-+ install -D -m 644 doc/ztmonitor.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
-+ install -D -m 644 doc/zttool.8.gz $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
++ install -D -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
++ install -D -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
+ if [ ! -d `dirname $(MODCONF)` ]; then install -d -m 755 `dirname $(MODCONF)` ; fi
- if ! grep "options torisa" $(MODCONF); then \
- echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \
- fi
- if ! grep "alias char-major-196" $(MODCONF); then \
- echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \
- fi
-- for x in $(MODULES); do \
-- if ! grep -q "post-install $$x" $(MODCONF); then \
-- if ! grep -q "install $$x " $(MODCONF); then \
-- if [ "$$x" != "zaptel" ] ; then \
-- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \
-- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \
+ if [ -n "$(MODCONF)" ]; then \
+- if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi; \
+- cat $(MODCONF).bak | grep -v "alias char-major-250" | \
+- grep -v "post-install torisa /sbin/ztcfg" | \
+- grep -v "post-install wcfxsusb /sbin/ztcfg" | \
+- grep -v "alias wctdm" | \
+- grep -v "post-install wctdm /sbin/ztcfg" > $(MODCONF); \
+ if ! grep "options torisa" $(MODCONF); then \
+ echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \
+ fi; \
+ if ! grep "alias char-major-196" $(MODCONF); then \
+ echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \
+ fi; \
+- for x in $(MODULES); do \
+- if ! grep -q "post-install $$x" $(MODCONF); then \
+- if ! grep -q "install $$x " $(MODCONF); then \
+- if [ "$$x" != "zaptel" ] ; then \
+- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \
+- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \
+- fi; \
- fi; \
- fi; \
- fi; \
-- fi; \
-- done
- if ! grep "alias wcfxs" $(MODCONF); then \
- echo "alias wcfxs wctdm" >> $(MODCONF); \
- fi
- if ! grep "alias wct2xxp" $(MODCONF); then \
- echo "alias wct2xxp wct4xxp" >> $(MODCONF); \
+- done; \
+ if ! grep "ias wcfxs" $(MODCONF); then \
+ echo "alias wcfxs wctdm" >> $(MODCONF); \
+ fi; \
+@@ -363,10 +325,6 @@
+ echo "alias wct2xxp wct4xxp" >> $(MODCONF); \
+ fi; \
fi
- if [ -d /etc/modutils ]; then \
- /sbin/update-modules ; \
- fi
-- [ `id -u` = 0 ] && /sbin/depmod -a || :
+- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
[ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
install-udev:
---- zaptel/zconfig.h.orig 2005-08-16 21:33:25.000000000 +0200
-+++ zaptel/zconfig.h 2005-08-16 21:33:58.000000000 +0200
-@@ -133,5 +133,10 @@
- */
- /* #define EMFLASH */
-
-+/*
-+ * Enable RTC support
-+ */
-+/* #define USE_RTC */
-+
- #endif
diff --git a/net-misc/zaptel/files/zaptel-1.2.0-ukcid.patch b/net-misc/zaptel/files/zaptel-1.2.0-ukcid.patch
new file mode 100644
index 000000000000..940abf8b0a98
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.0-ukcid.patch
@@ -0,0 +1,139 @@
+Index: zaptel.c
+===================================================================
+RCS file: /usr/cvsroot/zaptel/zaptel.c,v
+retrieving revision 1.95.2.1
+diff -u -r1.95.2.1 zaptel.c
+--- zaptel.c 6 Oct 2004 22:11:41 -0000 1.95.2.1
++++ zaptel.c 2 Nov 2004 10:59:16 -0000
+@@ -703,6 +703,20 @@
+ unsigned char *newbuf, *oldbuf;
+ unsigned long flags;
+ int x;
++
++ /* Allocate history buffer, or not. This probably shouldn't
++ * be here, but it's convenient */
++ if(!j)
++ {
++ if(ss->history) kfree(ss->history);
++ ss->history = NULL;
++ }
++ else
++ {
++ if(!ss->history) ss->history=kmalloc(ZT_HISTORY_BUF_LEN, GFP_KERNEL);
++ }
++ ss->historypos=0;
++
+ /* Check numbufs */
+ if (numbufs < 2)
+ numbufs = 2;
+@@ -3856,11 +3870,12 @@
+ {
+ struct zt_chan *chan = chans[unit];
+ unsigned long flags;
+- int j, rv;
++ int j, k1, k2, rv;
+ int ret;
+ int oldconf;
+ void *rxgain=NULL;
+ echo_can_state_t *ec, *tec;
++ struct zt_history hist;
+
+ if (!chan)
+ return -ENOSYS;
+@@ -4186,6 +4201,29 @@
+ return -EINVAL;
+ break;
+ #endif
++ case ZT_GET_HISTORY:
++ if (copy_from_user(&hist,(struct zt_history *) data,sizeof(hist)))
++ return -EIO;
++
++ if (!(chan->flags & ZT_FLAG_AUDIO)) return (-EINVAL);
++ if (!chan->history) return -EINVAL;
++ j=hist.len;
++ k1=ZT_HISTORY_BUF_LEN-chan->historypos;
++ k2=chan->historypos;
++ if(j>0 && k1>0)
++ {
++ if (copy_to_user(hist.buf,chan->history+chan->historypos,min(j,k1)))
++ return -EIO;
++ j-=min(j,k1);
++ }
++ if(j>0 && k2>0)
++ {
++ if (copy_to_user(hist.buf+k1,chan->history,min(j,k2)))
++ return -EIO;
++ j-=min(j,k2);
++ }
++ /* Probably should assert j==0 here */
++ break;
+ default:
+ return zt_chanandpseudo_ioctl(inode, file, cmd, data, unit);
+ }
+@@ -5371,6 +5409,15 @@
+ if (!(ms->flags & ZT_FLAG_PSEUDO)) {
+ memcpy(ms->putlin, putlin, ZT_CHUNKSIZE * sizeof(short));
+ memcpy(ms->putraw, rxb, ZT_CHUNKSIZE);
++ }
++
++ /* Store in the history buffer */
++ if(ms->history)
++ {
++ memcpy(ms->history+ms->historypos,rxb,ZT_CHUNKSIZE);
++ ms->historypos+=ZT_CHUNKSIZE;
++ if(ms->historypos >= ZT_HISTORY_BUF_LEN)
++ ms->historypos=0;
+ }
+
+ /* Take the rxc, twiddle it for conferencing if appropriate and put it
+Index: zaptel.h
+===================================================================
+RCS file: /usr/cvsroot/zaptel/zaptel.h,v
+retrieving revision 1.38
+diff -u -r1.38 zaptel.h
+--- zaptel.h 27 Sep 2004 19:50:03 -0000 1.38
++++ zaptel.h 2 Nov 2004 10:59:17 -0000
+@@ -137,6 +137,8 @@
+ #define ZT_MAX_NUM_BUFS 32
+ #define ZT_MAX_BUF_SPACE 32768
+
++#define ZT_HISTORY_BUF_LEN 16384 /* Count of ulaw samples */
++
+ #define ZT_DEFAULT_BLOCKSIZE 1024
+ #define ZT_DEFAULT_MTR_MRU 2048
+
+@@ -277,6 +279,11 @@
+ int reserved[4]; /* Reserved for future expansion -- always set to 0 */
+ } ZT_DIAL_PARAMS;
+
++typedef struct zt_history
++{
++ unsigned char *buf; /* Sample buffer */
++ int len; /* Length of buffer, in bytes */
++} ZT_HISTORY;
+
+ typedef struct zt_dynamic_span {
+ char driver[20]; /* Which low-level driver to use */
+@@ -584,6 +591,11 @@
+ #define ZT_TIMERPONG _IOW (ZT_CODE, 53, int)
+
+ /*
++ * Return history buffer
++ */
++#define ZT_GET_HISTORY _IOR(ZT_CODE, 54, struct zt_history)
++
++/*
+ * Set/get signalling freeze
+ */
+ #define ZT_SIGFREEZE _IOW (ZT_CODE, 54, int)
+@@ -989,6 +1001,10 @@
+ wait_queue_head_t writebufq; /* write wait queue */
+
+ int blocksize; /* Block size */
++
++
++ u_char *history; /* History buffer, for pre-ring caller ID (ZT_HISTORY_BUF_LEN) */
++ u_short historypos; /* Current position within buffer */
+
+ int eventinidx; /* out index in event buf (circular) */
+ int eventoutidx; /* in index in event buf (circular) */