From 04128951db339ddfd7905adf92990f00a3a01447 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 23 May 2008 15:16:24 +0000 Subject: yay, all the tools compile now git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4339 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- hdlctest.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'hdlctest.c') diff --git a/hdlctest.c b/hdlctest.c index 4cd4d91..680b33a 100644 --- a/hdlctest.c +++ b/hdlctest.c @@ -2,13 +2,13 @@ #include #include #include -#include "kernel/zaptel.h" #include #include #include #include #include #include +#include #include "bittest.h" #define FAST_HDLC_NEED_TABLES #include "kernel/fasthdlc.h" @@ -131,8 +131,8 @@ int main(int argc, char *argv[]) { int fd; int res, x; - ZT_PARAMS tp; - ZT_BUFFERINFO bi; + DAHDI_PARAMS tp; + DAHDI_BUFFERINFO bi; int bs = BLOCK_SIZE; int pos = 0; unsigned char inbuf[BLOCK_SIZE]; @@ -156,30 +156,30 @@ int main(int argc, char *argv[]) fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno)); exit(1); } - if (ioctl(fd, ZT_SET_BLOCKSIZE, &bs)) { + if (ioctl(fd, DAHDI_SET_BLOCKSIZE, &bs)) { fprintf(stderr, "Unable to set block size to %d: %s\n", bs, strerror(errno)); exit(1); } - if (ioctl(fd, ZT_GET_PARAMS, &tp)) { + if (ioctl(fd, DAHDI_GET_PARAMS, &tp)) { fprintf(stderr, "Unable to get channel parameters\n"); exit(1); } - if ((tp.sigtype & ZT_SIG_HDLCRAW) == ZT_SIG_HDLCRAW) { + if ((tp.sigtype & DAHDI_SIG_HDLCRAW) == DAHDI_SIG_HDLCRAW) { printf("In HDLC mode\n"); hdlcmode = 1; - } else if ((tp.sigtype & ZT_SIG_CLEAR) == ZT_SIG_CLEAR) { + } else if ((tp.sigtype & DAHDI_SIG_CLEAR) == DAHDI_SIG_CLEAR) { printf("In CLEAR mode\n"); hdlcmode = 0; } else { fprintf(stderr, "Not in a reasonable mode\n"); exit(1); } - res = ioctl(fd, ZT_GET_BUFINFO, &bi); + res = ioctl(fd, DAHDI_GET_BUFINFO, &bi); if (!res) { - bi.txbufpolicy = ZT_POLICY_IMMEDIATE; - bi.rxbufpolicy = ZT_POLICY_IMMEDIATE; + bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE; + bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE; bi.numbufs = 4; - res = ioctl(fd, ZT_SET_BUFINFO, &bi); + res = ioctl(fd, DAHDI_SET_BUFINFO, &bi); if (res < 0) { fprintf(stderr, "Unable to set buf info: %s\n", strerror(errno)); exit(1); @@ -188,7 +188,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Unable to get buf info: %s\n", strerror(errno)); exit(1); } - ioctl(fd, ZT_GETEVENT); + ioctl(fd, DAHDI_GETEVENT); fasthdlc_precalc(); fasthdlc_init(&fs); for(;;) { @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) if (hdlcmode) { if (res < 0) { if (errno == ELAST) { - if (ioctl(fd, ZT_GETEVENT, &x) < 0) { + if (ioctl(fd, DAHDI_GETEVENT, &x) < 0) { fprintf(stderr, "Unaable to get event: %s\n", strerror(errno)); exit(1); } -- cgit v1.2.3