diff options
-rw-r--r-- | bittest.h | 4 | ||||
-rw-r--r-- | dahdi_cfg.c | 4 | ||||
-rw-r--r-- | dahdi_tool.c | 6 | ||||
-rw-r--r-- | hdlcgen.c | 5 | ||||
-rw-r--r-- | hdlcstress.c | 11 | ||||
-rw-r--r-- | hdlctest.c | 10 | ||||
-rw-r--r-- | hdlcverify.c | 5 | ||||
-rw-r--r-- | patgen.c | 4 | ||||
-rw-r--r-- | patlooptest.c | 2 | ||||
-rw-r--r-- | pattest.c | 4 |
10 files changed, 33 insertions, 22 deletions
diff --git a/bittest.h b/bittest.h new file mode 100644 index 0000000..ade8b1e --- /dev/null +++ b/bittest.h @@ -0,0 +1,4 @@ +static int bit_next(int prev) +{ + return (prev + 1) % 256; +} diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 0b79194..7b1697e 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -170,12 +170,12 @@ static const char *sigtype_to_str(const int sig) int ind_ioctl(int channo, int fd, int op, void *data) { -DAHDI_INDIRECT_DATA ind; + struct dahdi_indirect_data ind; ind.chan = channo; ind.op = op; ind.data = data; - return ioctl(fd,DAHDI_INDIRECT,&ind); + return ioctl(fd, DAHDI_INDIRECT, &ind); } static void clear_fields() diff --git a/dahdi_tool.c b/dahdi_tool.c index b819899..fb23a0c 100644 --- a/dahdi_tool.c +++ b/dahdi_tool.c @@ -49,7 +49,7 @@ static int ctl = -1; static int span_max_chan_pos; -static DAHDI_SPANINFO s[DAHDI_MAX_SPANS]; +static struct dahdi_spaninfo s[DAHDI_MAX_SPANS]; static char *dahdi_txlevelnames[] = { "0 db (CSU)/0-133 feet (DSX-1)", @@ -176,7 +176,7 @@ static void sel_callback(newtComponent c, void *cbdata) static void show_bits(int span, newtComponent bitbox, newtComponent inuse, newtComponent levels, newtComponent bpvcount, newtComponent alarms, newtComponent syncsrc, newtComponent irqmisses) { - DAHDI_PARAMS zp; + struct dahdi_params zp; int x; int res; char c; @@ -367,7 +367,7 @@ static void show_span(int span) span_max_chan_pos = s[span].totalchans; for (x=0;x<DAHDI_MAX_CHANNELS;x++) { - DAHDI_PARAMS zp; + struct dahdi_params zp; int res; memset(&zp, 0, sizeof(zp)); zp.channo = x; @@ -1,5 +1,3 @@ -#define FAST_HDLC_NEED_TABLES -#include "kernel/fasthdlc.h" #include <stdio.h> #include <fcntl.h> #include <string.h> @@ -7,6 +5,9 @@ #include <unistd.h> #include <stdlib.h> +#define FAST_HDLC_NEED_TABLES +#include <dahdi/fasthdlc.h> + #include "version.h" #define RANDOM "/dev/urandom" /* Not genuinely random */ diff --git a/hdlcstress.c b/hdlcstress.c index d32dc90..9008b48 100644 --- a/hdlcstress.c +++ b/hdlcstress.c @@ -9,9 +9,12 @@ #include <unistd.h> #include <stdlib.h> #include <dahdi/user.h> -#include "bittest.h" + #define FAST_HDLC_NEED_TABLES -#include "kernel/fasthdlc.h" +#include <dahdi/fasthdlc.h> + +#include "bittest.h" + #include "version.h" @@ -115,8 +118,8 @@ void send_packet(unsigned char *buf, int len) int main(int argc, char *argv[]) { int res, x; - DAHDI_PARAMS tp; - DAHDI_BUFFERINFO bi; + struct dahdi_params tp; + struct dahdi_bufferinfo bi; int bs = BLOCK_SIZE; unsigned char c=0; unsigned char outbuf[BLOCK_SIZE]; @@ -9,9 +9,11 @@ #include <unistd.h> #include <stdlib.h> #include <dahdi/user.h> -#include "bittest.h" + #define FAST_HDLC_NEED_TABLES -#include "kernel/fasthdlc.h" +#include <dahdi/fasthdlc.h> + +#include "bittest.h" #include "version.h" @@ -133,8 +135,8 @@ int main(int argc, char *argv[]) { int fd; int res, x; - DAHDI_PARAMS tp; - DAHDI_BUFFERINFO bi; + struct dahdi_params tp; + struct dahdi_bufferinfo bi; int bs = BLOCK_SIZE; int pos = 0; unsigned char inbuf[BLOCK_SIZE]; diff --git a/hdlcverify.c b/hdlcverify.c index eeffadb..27a821c 100644 --- a/hdlcverify.c +++ b/hdlcverify.c @@ -1,5 +1,3 @@ -#define FAST_HDLC_NEED_TABLES -#include "kernel/fasthdlc.h" #include <stdio.h> #include <fcntl.h> #include <string.h> @@ -7,6 +5,9 @@ #include <unistd.h> #include <stdlib.h> +#define FAST_HDLC_NEED_TABLES +#include <dahdi/fasthdlc.h> + #include "version.h" int myread(int fd, char *buf, int len) @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) { int fd; int res, res1, x; - DAHDI_PARAMS tp; + struct dahdi_params tp; int bs = BLOCK_SIZE; unsigned char c=0; unsigned char outbuf[BLOCK_SIZE]; @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) res1 = write(fd, outbuf, res); if (res1 < res) { int e; - DAHDI_SPANINFO zi; + struct dahdi_spaninfo zi; res = ioctl(fd,DAHDI_GETEVENT,&e); if (res == -1) { diff --git a/patlooptest.c b/patlooptest.c index 66b4936..3b198fb 100644 --- a/patlooptest.c +++ b/patlooptest.c @@ -27,7 +27,7 @@ int main(int argc, char *argv[]) int fd; int res, x; int i; - DAHDI_PARAMS tp; + struct dahdi_params tp; int bs = BLOCK_SIZE; int skipcount = 10; unsigned char c=0,c1=0; @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { int fd; int res, x; - DAHDI_PARAMS tp; + struct dahdi_params tp; int bs = BLOCK_SIZE; unsigned char c=0; unsigned char outbuf[BLOCK_SIZE]; @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) res = read(fd, outbuf, res); if (res < bs) { int e; - DAHDI_SPANINFO zi; + struct dahdi_spaninfo zi; res = ioctl(fd,DAHDI_GETEVENT,&e); if (res == -1) { |