move hisaxctrl stuff into hisax subdir
This commit is contained in:
parent
696ea59ab5
commit
3ba2f0ad77
10
Makefile
10
Makefile
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.44 2000/06/08 10:06:01 keil Exp $
|
||||
# $Id: Makefile,v 1.45 2000/06/20 10:16:16 keil Exp $
|
||||
#
|
||||
# Toplevel Makefile for isdn4k-utils
|
||||
#
|
||||
|
@ -49,12 +49,8 @@ endif
|
|||
ifeq ($(CONFIG_PCBITCTL),y)
|
||||
SUBDIRS := $(SUBDIRS) pcbit
|
||||
endif
|
||||
ifeq ($(CONFIG_TELESCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) teles
|
||||
else
|
||||
ifeq ($(CONFIG_HISAXCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) teles
|
||||
endif
|
||||
ifeq ($(CONFIG_HISAXCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) hisax
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RCAPID),y)
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,70 @@
|
|||
# $Id: Makefile.in,v 1.1 2000/06/20 10:16:16 keil Exp $
|
||||
#
|
||||
# Makefile for hisaxctrl adapted from telesctrl
|
||||
# (C) 1997 Fritz Elfert
|
||||
# (C) 2000 Karsten Keil
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2 -I. -I@CONFIG_KERNELDIR@/include
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAMS =
|
||||
MODULES = hisaxctrl.o
|
||||
MANPAGES =
|
||||
INSTALL = @INSTALL@
|
||||
SBINDIR = @CONFIG_SBINDIR@
|
||||
DATADIR = @CONFIG_DATADIR@
|
||||
MANDIR = @CONFIG_MANDIR@
|
||||
MAN8DIR = $(MANDIR)/man8
|
||||
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
|
||||
INSTALL_DATA = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
ifeq ("@CONFIG_HISAXCTRL@","y")
|
||||
PROGRAMS += hisaxctrl
|
||||
MANPAGES += hisaxctrl.8
|
||||
endif
|
||||
CC = @CC@
|
||||
|
||||
#.SUFFIXES:
|
||||
#.SUFFIXES: .c .o
|
||||
|
||||
%.8: %.man
|
||||
cp $< $@
|
||||
|
||||
all: $(PROGRAMS) $(MANPAGES)
|
||||
|
||||
config:
|
||||
@./configure
|
||||
|
||||
hisaxctrl: $(MODULES)
|
||||
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
|
||||
|
||||
install: $(PROGRAMS) $(MANPAGES)
|
||||
mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(SBINDIR)
|
||||
mkdir -p $(DESTDIR)$(DATADIR)
|
||||
$(INSTALL_DATA) ISAR.BIN $(DESTDIR)$(DATADIR)/ISAR.BIN
|
||||
mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
|
||||
|
||||
install-strip: $(PROGRAMS) $(MANPAGES)
|
||||
mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL_PROGRAM) -s $(PROGRAMS) $(DESTDIR)$(SBINDIR)
|
||||
mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
|
||||
|
||||
uninstall:
|
||||
@for i in `echo $(PROGRAMS)` ; do \
|
||||
rm -f $(DESTDIR)$(SBINDIR)/$$i ; \
|
||||
done
|
||||
@for i in `echo $(MANPAGES)` ; do \
|
||||
rm -f $(DESTDIR)$(MAN8DIR)/$$i ; \
|
||||
done
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ $(PROGRAMS) *.8 *.man
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.cache config.log Makefile
|
|
@ -0,0 +1 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,67 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(hisaxctrl.c)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_SBINDIR=${CONFIG_SBINDIR:-"/sbin"}
|
||||
CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn"}
|
||||
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
CONFIG_TELESCTRL=${CONFIG_TELESCTRL:-"n"}
|
||||
CONFIG_HISAXCTRL=${CONFIG_HISAXCTRL:-"n"}
|
||||
MANDATE=`grep CHECKIN hisaxctrl.man.in | awk '{print $4}'`
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
|
||||
dnl Find current kernel source
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_FILE($CONFIG_KERNELDIR/include/linux/isdn.h,,
|
||||
AC_MSG_ERROR("$CONFIG_KERNELDIR/include/linux/isdn.h missing. Kernel installed?")
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_CHECK_FUNCS(strtol)
|
||||
|
||||
dnl Optional sbin directory
|
||||
AC_ARG_WITH(sbin,
|
||||
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
|
||||
CONFIG_SBINDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional man directory
|
||||
AC_ARG_WITH(man,
|
||||
[ --with-man=DIR Set manpage dir. [/usr/man]],
|
||||
CONFIG_MANDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Build hisaxctrl
|
||||
AC_ARG_WITH(hisax,
|
||||
[ --with-hisax=y Build hisaxctrl. [no]],
|
||||
CONFIG_HISAXCTRL="${withval}"
|
||||
AC_DEFINE(CONFIG_HISAXCTRL,"${withval}"),
|
||||
)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(I4LCONFDIR)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_DATADIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
AC_SUBST(CONFIG_HISAXCTRL)
|
||||
AC_OUTPUT(Makefile hisaxctrl.man)
|
|
@ -0,0 +1,106 @@
|
|||
/* $Id: hisaxctrl.c,v 1.1 2000/06/20 10:16:16 keil Exp $
|
||||
*
|
||||
* Configuration tool for HiSax ISDN cards
|
||||
*
|
||||
* Copyright 2000 by Karsten Keil (keil@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <linux/isdn.h>
|
||||
|
||||
char *progname;
|
||||
unsigned char *buffer = NULL;
|
||||
#define MAX_SIZE 0x10000
|
||||
|
||||
unsigned char *
|
||||
read_firmware(unsigned char *fname)
|
||||
{
|
||||
FILE *infile;
|
||||
int *p, cnt;
|
||||
|
||||
if (!(infile = fopen(fname, "rb"))) {
|
||||
fprintf(stderr, "cannot open file %s\n", fname);
|
||||
exit(-1);
|
||||
}
|
||||
p = (int *) buffer = (unsigned char *) malloc(MAX_SIZE+4);
|
||||
if (!buffer) {
|
||||
fprintf(stderr, "cannot get %d byte memory\n", MAX_SIZE+4);
|
||||
exit(-1);
|
||||
}
|
||||
cnt = fread(buffer + 4, 1, MAX_SIZE, infile);
|
||||
fclose(infile);
|
||||
if (cnt==MAX_SIZE) {
|
||||
fprintf(stderr, "wrong filesize\n");
|
||||
exit(-1);
|
||||
}
|
||||
*p = cnt;
|
||||
return(buffer);
|
||||
}
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "usage: %s <DriverId> <IoctlCmd> <IoctlArg>\n", progname);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
int cmd;
|
||||
isdn_ioctl_struct ioctl_s;
|
||||
|
||||
if ((progname = strrchr(argv[0], '/')))
|
||||
progname++;
|
||||
else
|
||||
progname = argv[0];
|
||||
|
||||
if (strcmp(progname, "report")) {
|
||||
if (argc != 4)
|
||||
usage();
|
||||
strcpy(ioctl_s.drvid, argv[1]);
|
||||
cmd = strtol(argv[2], NULL, 0);
|
||||
if (cmd == 9) {
|
||||
ioctl_s.arg = (ulong) read_firmware(argv[3]);
|
||||
} else {
|
||||
ioctl_s.arg = strtol(argv[3], NULL, 0);
|
||||
}
|
||||
} else {
|
||||
ioctl_s.drvid[0] = '\0';
|
||||
ioctl_s.arg = 0;
|
||||
cmd = 0;
|
||||
}
|
||||
fd = open("/dev/isdnctrl", O_RDWR);
|
||||
if (fd < 0) {
|
||||
perror("/dev/isdnctrl");
|
||||
exit(-1);
|
||||
}
|
||||
if (ioctl(fd, IIOCDRVCTL + cmd, &ioctl_s) < 0)
|
||||
perror(argv[1]);
|
||||
close(fd);
|
||||
if (buffer)
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
.\" $Id: hisaxctrl.man.in,v 1.1 2000/06/20 10:16:16 keil Exp $
|
||||
.\"
|
||||
.\" CHECKIN $Date: 2000/06/20 10:16:16 $
|
||||
.\"
|
||||
.\" Process this file with
|
||||
.\" groff -man -Tascii hisaxctrl.1 for ASCII output, or
|
||||
.\" groff -man -Tps hisaxctrl.1 for PostScript output
|
||||
.\"
|
||||
.TH HISAXCTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
||||
.SH NAME
|
||||
hisaxctrl \- configure HiSax-Module
|
||||
.SH SYNOPSIS
|
||||
.B hisaxctrl
|
||||
.I DriverId command parameters
|
||||
.SH DESCRIPTION
|
||||
.B hisaxctrl
|
||||
is used to setup the HiSax-ISDN device driver.
|
||||
All logging-output is sent to the device /dev/isdnctrl. So you can show it
|
||||
by executing
|
||||
.BR "cat /dev/isdnctrl" .
|
||||
.LP
|
||||
The use of
|
||||
.I hisaxctrl
|
||||
makes sense, if you are using the HiSax driver only.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I DriverId
|
||||
is used to identify the card when using more than one passive card. While
|
||||
loading the hisax module with
|
||||
.IR insmod ", or " modprobe
|
||||
the DriverId is set by appending
|
||||
.BI id= idstring1 % idstring2 %...
|
||||
to the commandline.
|
||||
.LP
|
||||
.TP
|
||||
.I command
|
||||
is an integer selecting the setup category. The following values are
|
||||
defined for setting the logging-level of the HiSax-ISDN device driver:
|
||||
.LP
|
||||
.RS
|
||||
.BR " 0" " reports card status infos."
|
||||
.br
|
||||
.BR " 1" " selects generic debugging."
|
||||
.br
|
||||
.BR 11 " selects layer 1 developement debugging."
|
||||
.br
|
||||
.BR 13 " selects layer 3 developement debugging."
|
||||
.br
|
||||
.RE
|
||||
.LP
|
||||
the following commands are used to enable special features during runtime
|
||||
of the HiSax-ISDN device driver.
|
||||
.LP
|
||||
.RS
|
||||
.BR " 2" " set B-channel ON delay to parameter (in ms)"
|
||||
.br
|
||||
.BR " 5" " set B-channel in leased mode"
|
||||
.br
|
||||
.BR " 6" " set B-channel in TESTLOOP mode"
|
||||
.br
|
||||
.BR " 7" " set/reset card in Point To Point mode"
|
||||
.br
|
||||
.BR " 8" " set card in FIXED TEI mode "
|
||||
.br
|
||||
.BR " 9" " load firmware for DSP cards"
|
||||
.br
|
||||
.BR "10" " set B-channel usage limit to 1 or 2 channels"
|
||||
.br
|
||||
.BR "12" " set echo logging mode (only for some cards)"
|
||||
.br
|
||||
.BR " " " B-channel usage limit needs to be 1 if enabled"
|
||||
.br
|
||||
.RE
|
||||
.TP
|
||||
.I parameter
|
||||
For debug settings this is an integer representing a bitmask. Every bit in
|
||||
this mask switches a debug facility on or off. Depending on the selected
|
||||
category, the following values are defined:
|
||||
.LP
|
||||
.RS
|
||||
.RB With " generic debugging " selected:
|
||||
.LP
|
||||
.BR 0x001 " Link-level <--> hardware-level communication"
|
||||
.br
|
||||
.BR 0x002 " Top state machine"
|
||||
.br
|
||||
.BR 0x004 " D-Channel Q.931 (call control messages)"
|
||||
.br
|
||||
.BR 0x008 " D-Channel Q.921"
|
||||
.br
|
||||
.BR 0x010 " B-Channel X.75"
|
||||
.br
|
||||
.BR 0x020 " D-Channel l2"
|
||||
.br
|
||||
.BR 0x040 " B-Channel l2"
|
||||
.br
|
||||
.BR 0x080 " D-Channel link state debugging"
|
||||
.br
|
||||
.BR 0x100 " B-Channel link state debugging"
|
||||
.br
|
||||
.BR 0x200 " TEI debug"
|
||||
.br
|
||||
.BR 0x400 " LOCK debug in callc.c"
|
||||
.br
|
||||
.BR 0x800 " More debug in callc.c (not for normal use)"
|
||||
.br
|
||||
.LP
|
||||
.RB With " layer 1 developement debugging " selected:
|
||||
.LP
|
||||
.BR 0x001 " Warnings (default: on)"
|
||||
.br
|
||||
.BR 0x002 " IRQ status"
|
||||
.br
|
||||
.BR 0x004 " ISAC"
|
||||
.br
|
||||
.BR 0x008 " ISAC FIFO"
|
||||
.br
|
||||
.BR 0x010 " HSCX"
|
||||
.br
|
||||
.BR 0x020 " HSCX FIFO (attention: full B-Channel output!)"
|
||||
.br
|
||||
.BR 0x040 " D-Channel LAPD frame types"
|
||||
.br
|
||||
.LP
|
||||
.RB With " layer 3 developement debugging " selected:
|
||||
.LP
|
||||
.BR 0x001 " Warnings (default: on)"
|
||||
.br
|
||||
.BR 0x002 " l3 protocol discriptor errors"
|
||||
.br
|
||||
.BR 0x004 " l3 state machine"
|
||||
.br
|
||||
.BR 0x008 " charge info debugging (1TR6)"
|
||||
.br
|
||||
.RE
|
||||
.LP
|
||||
.SH EXAMPLE
|
||||
.TP
|
||||
.BI hisaxctrl " HiSax 1 0x3ff"
|
||||
enables full generic debugging.
|
||||
.SH AUTHOR
|
||||
\(co 2000 by Karsten Keil <kkeil@suse.de>
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.BR isdnctrl "(8), " isdn_cause "(7), " isdninfo (4).
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# $Id: config.in,v 1.35 2000/05/18 15:22:09 calle Exp $
|
||||
# $Id: config.in,v 1.36 2000/06/20 10:16:16 keil Exp $
|
||||
#
|
||||
# The whole configuration stuff is borrowed from the kernel
|
||||
# configuration.
|
||||
|
@ -63,7 +63,6 @@ bool 'divertctrl' CONFIG_DIVERTCTRL
|
|||
endmenu
|
||||
mainmenu_option nextcomment
|
||||
comment 'Card configuration tools'
|
||||
bool 'telesctrl' CONFIG_TELESCTRL
|
||||
bool 'hisaxctrl' CONFIG_HISAXCTRL
|
||||
bool 'icnctrl' CONFIG_ICNCTRL
|
||||
if [ "$CONFIG_ICNCTRL" = "y" ]; then
|
||||
|
|
|
@ -41,7 +41,6 @@ CONFIG_IPROFD=y
|
|||
#
|
||||
# Card configuration tools
|
||||
#
|
||||
# CONFIG_TELESCTRL is not set
|
||||
CONFIG_HISAXCTRL=y
|
||||
CONFIG_ICNCTRL=y
|
||||
# CONFIG_ICNCTRL_DEBUG is not set
|
||||
|
|
Loading…
Reference in New Issue