isdn-44
This commit is contained in:
parent
2127e8657c
commit
75b6ca7f79
16
Make.config
16
Make.config
|
@ -4,14 +4,14 @@
|
|||
SHELL = /bin/sh
|
||||
|
||||
## =()<CARDS = @<CARDS>@>()=
|
||||
CARDS = teles
|
||||
CARDS = teles bintec
|
||||
## =()<PROTOCOLS = @<PROTOCOLS>@>()=
|
||||
PROTOCOLS = phone tei
|
||||
PROTOCOLS = phone tei capi fixed
|
||||
## =()<SUBPROTOCOLS = @<SUBPROTOCOLS>@>()=
|
||||
SUBPROTOCOLS = euro
|
||||
SUBPROTOCOLS = euro german
|
||||
|
||||
## =()<KERNELSRC := @<KERNELSRC>@>()=
|
||||
KERNELSRC := /usr/src/kernel/linux-work
|
||||
KERNELSRC := /usr/src/kernel/linux-pci
|
||||
|
||||
ifeq ($(wildcard $(KERNELSRC)/.config),$(KERNELSRC)/.config)
|
||||
include $(KERNELSRC)/.config
|
||||
|
@ -21,21 +21,21 @@ ifdef KERNEL
|
|||
## =()<CC = @<CC>@>()=
|
||||
CC = gcc
|
||||
## =()<CFLAGS = @<CFLAGS>@ >()=
|
||||
CFLAGS = -g -O -Wall -DKERNEL -D__KERNEL__ -DMODULE
|
||||
CFLAGS = -g -O2 -fomit-frame-pointer -Wall -DKERNEL -D__KERNEL__ -DMODULE
|
||||
|
||||
else
|
||||
|
||||
## =()<CC = @<HOSTCC>@>()=
|
||||
CC = gcc
|
||||
## =()<CFLAGS = @<HOSTCFLAGS>@ >()=
|
||||
CFLAGS = -g -Wall
|
||||
CFLAGS = -g -O2 -Wall
|
||||
## =()<LIBS = @<LIBS>@>()=
|
||||
LIBS = -lbsd
|
||||
LIBS = -lbsd-compat
|
||||
endif
|
||||
|
||||
|
||||
## =()<DESTDIR = @<DESTDIR>@>()=
|
||||
DESTDIR = /usr/local/isdn
|
||||
DESTDIR = /usr/lib/isdn
|
||||
## =()<LD = @<LD>@>()=
|
||||
LD = ld
|
||||
## =()<LDFLAGS = @<LDFLAGS>@>()=
|
||||
|
|
|
@ -229,10 +229,6 @@ endif
|
|||
depend::
|
||||
rm -f .depend
|
||||
|
||||
ifneq ($(strip $(PSOURCES)),)
|
||||
depend:: Makefile $(PSOURCES) $(HEADERS)
|
||||
$(CC) -M $(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS) $(PSOURCES) >> .depend
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(SOURCES)),)
|
||||
ifneq ($(strip $(REALSOURCE)),)
|
||||
|
@ -253,3 +249,7 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(PSOURCES)),)
|
||||
depend:: Makefile $(PSOURCES) $(HEADERS)
|
||||
$(CC) -M $(CFLAGS) $(INCLUDES) $(EXTRA_CFLAGS) $(PSOURCES) >> .depend
|
||||
endif
|
||||
|
|
|
@ -9,16 +9,12 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
/* #include <sys/user.h> */
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "alaw.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "buffer.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -9,21 +9,18 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
/* #ifdef DONT_ADDERROR */
|
||||
#include "f_user.h"
|
||||
/* #endif */
|
||||
#include <sys/errno.h>
|
||||
#include <sys/file.h>
|
||||
#include <fcntl.h>
|
||||
#include <stddef.h>
|
||||
#include "streamlib.h"
|
||||
#include <sys/termios.h>
|
||||
#include <linux/termios.h>
|
||||
#include "loader.h"
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
|
|
@ -28,11 +28,9 @@
|
|||
#include "isdn_limits.h"
|
||||
#include "stream.h"
|
||||
#include "streamlib.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <stddef.h>
|
||||
#include "loader.h"
|
||||
#include "kernel.h"
|
||||
#include "loader.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef linux
|
||||
#include <asm/byteorder.h> /* htons and friends */
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
#include "isdn_proto.h"
|
||||
#include "stream.h"
|
||||
#include "streamlib.h"
|
||||
#include <sys/errno.h>
|
||||
#include "kernel.h"
|
||||
#ifdef SCO
|
||||
#include <sys/immu.h>
|
||||
#endif
|
||||
#include <sys/sysmacros.h>
|
||||
#include <stddef.h>
|
||||
#include "loader.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _LINUX_SYSCOMPAT_H_
|
||||
|
||||
#include "config.h"
|
||||
#include <linux/types.h>
|
||||
#include "kernel.h"
|
||||
|
||||
#ifdef DO_DEBUGGING
|
||||
#define CONFIG_DEBUG_STREAMS
|
||||
|
|
|
@ -42,8 +42,7 @@ config.data: subst config.dist
|
|||
cp config.dist config.new
|
||||
./subst $(SED) -f subst.tmp config.new
|
||||
-@rm -f subst.tmp
|
||||
@echo "Check config.new, then rename it to config.data, and re-make!"
|
||||
@false
|
||||
mv config.new config.data
|
||||
|
||||
subst: subst.c subst.sh
|
||||
-make c || make sh || rm -f subst
|
||||
|
|
|
@ -4,4 +4,6 @@
|
|||
../include/f_strings.h
|
||||
../include/f_termio.h
|
||||
../include/msgtype.h
|
||||
../tools/rc.isdn
|
||||
../tools/rc.isdnmon
|
||||
../Make.config
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This is from INN. */
|
||||
|
||||
/* $Revision: 1.10 $
|
||||
/* $Revision: 1.1.1.1 $
|
||||
**
|
||||
** A C version of Henry Spencer's "subst" script.
|
||||
*/
|
||||
|
@ -51,8 +51,6 @@ extern char *strcpy();
|
|||
static char *
|
||||
xstrerror()
|
||||
{
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
extern int errno;
|
||||
static char buff[30];
|
||||
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "fakecept.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -6,19 +6,15 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include "f_ip.h"
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "fakeh.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ $(KERNELSRC)/include/linux/autoconf.h $(KERNELSRC)/include/linux/version.h:
|
|||
@exit 1
|
||||
|
||||
install::
|
||||
-mkdir -p /lib/modules/$(shell ../tools/getversion)/isdn
|
||||
-mkdir -p $${MODDIR:-/lib/modules}/$(shell ../tools/getversion)/isdn
|
||||
-mkdir -p $(DESTDIR)/bin-$(shell ../tools/getversion)
|
||||
cp /dev/null /lib/modules/modules.isdn.all
|
||||
|
||||
|
|
|
@ -82,9 +82,9 @@ extern int writev(int fd, struct iovec *vp, int vpcount);
|
|||
#define ROUTE_PATH "/sbin/route"
|
||||
|
||||
/* =()<#define LOCKNAME "@<LOCKNAME>@">()= */
|
||||
#define LOCKNAME "/var/lock/uucp/LCK..%s"
|
||||
#define LOCKNAME "/var/lock/LCK..%s"
|
||||
|
||||
/* =()<#define ROOTUSER "@<ROOT>@">()= */
|
||||
#define ROOTUSER "isdnmaster"
|
||||
#define ROOTUSER "smurf"
|
||||
|
||||
#endif /* _CONFIG_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DUMP_H_
|
||||
#define _DUMP_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
#include "isdn_23.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#ifndef _ISDN_12
|
||||
#define _ISDN_12
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "streams.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
#define _ISDN_2
|
||||
|
||||
#include "config.h"
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <linux/param.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include "x75lib.h"
|
||||
#include "smallq.h"
|
||||
#include "isdn_limits.h"
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#ifndef _ISDN_23
|
||||
#define _ISDN_23
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#ifndef _ISDN_3
|
||||
#define _ISDN_3
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <linux/param.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include "streams.h"
|
||||
#include "isdn_limits.h"
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#ifndef _ISDN_34
|
||||
#define _ISDN_34
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
extern int log_34;
|
||||
|
|
|
@ -7,7 +7,13 @@
|
|||
#ifndef KERNEL
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
extern int spl6 (void);
|
||||
extern int spl1 (void);
|
||||
|
@ -45,6 +51,12 @@ extern void panic(const char *x, ...);
|
|||
#endif
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/uio.h>
|
||||
|
||||
char *loghdr(char level);
|
||||
#undef KERN_EMERG
|
||||
#undef KERN_ALERT
|
||||
|
@ -64,4 +76,9 @@ char *loghdr(char level);
|
|||
#define KERN_DEBUG loghdr(7)
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef minor
|
||||
#define minor(a) ((a)&0xFF)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef _PORT_M
|
||||
#define _PORT_M
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "isdn_limits.h"
|
||||
#include "smallq.h"
|
||||
#include "msgtype.h"
|
||||
|
|
|
@ -7,8 +7,13 @@
|
|||
#include "kernel.h"
|
||||
|
||||
#include "msgtype.h"
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <linux/param.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef linux
|
||||
#include <linux/major.h>
|
||||
#ifdef KERNEL
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef _Q_DATA
|
||||
#define _Q_DATA
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
|
||||
/**
|
||||
** This module handles the data structure of additional information elements,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __SMALLQ__
|
||||
#define __SMALLQ__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
#include "streams.h"
|
||||
#include "config.h"
|
||||
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
* key-parameter-argument list for a nested command.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "stropts.h"
|
||||
|
||||
#include "streams.h"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef __STREAMS_H
|
||||
#define __STREAMS_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include "kernel.h"
|
||||
|
||||
#if !(defined(__sys_stream_h) || defined(_SYS_STREAM_H) || defined(_LINUX_STREAM_H))
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#if !defined(__sys_callout_h)
|
||||
#define __sys_callout_h
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
struct callout {
|
||||
int c_time; /* incremental time */
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#ifndef __TIMEOUT
|
||||
#define __TIMEOUT
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/callout.h>
|
||||
#include "kernel.h"
|
||||
|
||||
extern struct timeval callout_time;
|
||||
|
||||
|
|
|
@ -6,18 +6,14 @@
|
|||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include "f_ip.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "ip_mon.h"
|
||||
#include "streamlib.h"
|
||||
#include "isdn_proto.h"
|
||||
|
@ -244,10 +240,14 @@ ip_mon_timer (struct _ip_mon *ipmon)
|
|||
{
|
||||
long s;
|
||||
|
||||
if (ipmon->timer == 0)
|
||||
if (!ipmon->hastimer)
|
||||
return;
|
||||
if (ip_mon.qptr == NULL) {
|
||||
ipmon->timer = 0;
|
||||
ipmon->hastimer = 0;
|
||||
return;
|
||||
}
|
||||
if (!ipmon->timer) {
|
||||
ipmon->hastimer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,6 @@ ip_mon_open (queue_t * q, dev_t dev, int flag, int sflag ERR_DECL)
|
|||
{
|
||||
struct _ip_mon *ipmon;
|
||||
static int nr = 1;
|
||||
int do_timeout = 1;
|
||||
|
||||
dev = minor (dev);
|
||||
if (sflag == MODOPEN) {
|
||||
|
@ -283,7 +282,6 @@ ip_mon_open (queue_t * q, dev_t dev, int flag, int sflag ERR_DECL)
|
|||
ERR_RETURN(-ENXIO);
|
||||
} else {
|
||||
ipmon = &ip_mon;
|
||||
do_timeout = (ip_mon.qptr == NULL);
|
||||
}
|
||||
memset(ipmon,0,sizeof (*ipmon));
|
||||
if (ipmon != &ip_mon)
|
||||
|
@ -292,9 +290,9 @@ ip_mon_open (queue_t * q, dev_t dev, int flag, int sflag ERR_DECL)
|
|||
q->q_ptr = (char *) ipmon;
|
||||
ipmon->qptr = q;
|
||||
|
||||
ipmon->timer = 10;
|
||||
ipmon->timer = dev ? 10 : 0;
|
||||
ipmon->each = 1;
|
||||
if(do_timeout) {
|
||||
if(ipmon->timer) {
|
||||
ipmon->hastimer = 1;
|
||||
#ifdef NEW_TIMEOUT
|
||||
ipmon->timeout =
|
||||
|
@ -485,6 +483,7 @@ ip_mon_close (queue_t * q, int dummy)
|
|||
flushq (WR (q), FLUSHALL);
|
||||
printf ("IP_MON driver %d closed.\n", ipmon->nr);
|
||||
if (ipmon->hastimer) {
|
||||
ipmon->hastimer = 0;
|
||||
#ifdef NEW_TIMEOUT
|
||||
untimeout (ipmon->timeout);
|
||||
#else
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
#include <errno.h>
|
||||
#include "f_strings.h"
|
||||
#include <syslog.h>
|
||||
#if __GNU_LIBRARY__ - 0 < 6
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -17,23 +17,22 @@
|
|||
#include "kernel.h"
|
||||
#include "primitives.h"
|
||||
#include "isdn_2.h"
|
||||
#include <sys/time.h>
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
/* #ifdef DONT_ADDERROR */
|
||||
#include "f_user.h"
|
||||
/* #endif */
|
||||
#include <sys/errno.h>
|
||||
#ifndef __linux__
|
||||
#include <sys/reg.h>
|
||||
#include <sys/var.h>
|
||||
#endif
|
||||
#include <sys/file.h>
|
||||
#if 0
|
||||
#include <sys/termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
#include "streamlib.h"
|
||||
#include "isdn_23.h"
|
||||
#include "isdn_12.h"
|
||||
|
@ -43,7 +42,6 @@
|
|||
#include "sapi.h"
|
||||
#include "isdn_limits.h"
|
||||
#include "isdn_proto.h"
|
||||
#include <sys/termios.h>
|
||||
|
||||
ushort_t hdrseq = 1;
|
||||
|
||||
|
@ -1425,7 +1423,8 @@ do_chprot (isdn2_card ctl, short channel, mblk_t * proto, int flags)
|
|||
int err = 0;
|
||||
|
||||
if (isdn2_debug & 0x4)
|
||||
printf ("%sdo_chprot %d %d 0%o\n",KERN_DEBUG, ctl ? ctl->nr : -1, channel, flags);
|
||||
printf ("%sdo_chprot %d %d 0%o: %p %d %p\n",KERN_DEBUG, ctl ? ctl->nr : -1, channel, flags,
|
||||
ctl, channel, isdn_chan.qptr);
|
||||
if (ctl == NULL || (channel == 0 && isdn_chan.qptr == NULL))
|
||||
return -ENXIO;
|
||||
if(flags & CHP_TOCARD) {
|
||||
|
@ -1479,8 +1478,12 @@ do_chprot (isdn2_card ctl, short channel, mblk_t * proto, int flags)
|
|||
if(canput(isdn_chan.qptr->q_next)) {
|
||||
putnext (isdn_chan.qptr, mb);
|
||||
err = 0;
|
||||
} else
|
||||
} else {
|
||||
if(isdn2_debug & 0x4)
|
||||
printf("%sdo_chprot: MasterUpqueue full\n",KERN_DEBUG);
|
||||
freeb(mb);
|
||||
err = -ENXIO;
|
||||
}
|
||||
} else
|
||||
err = -EAGAIN;
|
||||
return err;
|
||||
|
@ -2603,6 +2606,8 @@ isdn2_wsrv (queue_t *q)
|
|||
ismodlist = (id == PROTO_MODLIST);
|
||||
minor = hdr.hdr_protocmd.minor;
|
||||
|
||||
if (isdn2_debug & 0x10)
|
||||
printk("%sMinorSet %d -> %d %d\n",KERN_DEBUG,minor,(isdnchan[minor]&&isdnchan[minor]->card)?isdnchan[minor]->card->nr:-1,isdnchan[minor]?isdnchan[minor]->channel:-1);
|
||||
if ((minor != 0) && (isdnchan[minor] != NULL) && (isdnchan[minor]->card != NULL)) {
|
||||
/* This is a temporary kludge */
|
||||
hdr.hdr_protocmd.card = isdnchan[minor]->card->nr;
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include "q_data.h"
|
||||
#include "isdn_23.h"
|
||||
#include "isdn3_phone.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "prot_1TR6_0.h"
|
||||
#include "prot_1TR6_1.h"
|
||||
#include "prot_ETS.h"
|
||||
|
@ -19,7 +18,9 @@
|
|||
#include "isdn_12.h"
|
||||
#include "asm/byteorder.h"
|
||||
#include "sapi.h"
|
||||
#ifndef __KERNEL__
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#define PPP_IP_VANJ CHAR2('i','v')
|
||||
#define PPP_IP CHAR2('i','n')
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include "isdn_proto.h"
|
||||
#include "lap.h"
|
||||
#include "dump.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "sapi.h"
|
||||
|
||||
#define ST_up 01
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
**/
|
||||
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "kernel.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "isdn_23.h"
|
||||
#include "isdn_3.h"
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include "q_data.h"
|
||||
#include "isdn_23.h"
|
||||
#include "isdn3_phone.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "prot_1TR6_0.h"
|
||||
#include "prot_1TR6_1.h"
|
||||
#include "prot_ETS.h"
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
#include "q_data.h"
|
||||
#include "isdn_23.h"
|
||||
#include "isdn3_phone.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "prot_1TR6_0.h"
|
||||
#include "prot_1TR6_common.h"
|
||||
#include "sapi.h"
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
#include "isdn_23.h"
|
||||
#include "isdn3_phone.h"
|
||||
#include "isdn_34.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "prot_1TR6_1.h"
|
||||
#include "prot_1TR6_common.h"
|
||||
#include "sapi.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _1TR6_COMMON
|
||||
#define _1TR6_COMMON
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
#include "streams.h"
|
||||
#include "phone_1TR6.h"
|
||||
#include "q_data.h"
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include "isdn_23.h"
|
||||
#include "isdn3_phone.h"
|
||||
#include "isdn_34.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
#include "q_data.h"
|
||||
#include "phone_ETSI.h"
|
||||
#include "sapi.h"
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
#include "isdn_34.h"
|
||||
#include "lap.h"
|
||||
#include "dump.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include <sys/utsname.h>
|
||||
#include "sapi.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PROGRAM = master
|
||||
EXTRA_LIBS=../isdn_3.a ../support.a
|
||||
EXTRA_CFLAGS=$(addsuffix _,$(addprefix -D_,$(PROTOCOLS) $(SUBPROTOCOLS)))
|
||||
EXTRA_LDFLAGS=-static
|
||||
#EXTRA_LDFLAGS=-static
|
||||
|
||||
TOPDIR=..
|
||||
include $(TOPDIR)/Make.rules
|
||||
|
|
|
@ -140,6 +140,8 @@ read_file (FILE * ffile, char *errf)
|
|||
char *li = (char *) (c + 1);
|
||||
|
||||
switch (CHAR2 (li[0], li[1])) {
|
||||
case CHAR2 ('M', 'O'):
|
||||
continue;
|
||||
case CHAR2 ('P', ' '):
|
||||
case CHAR2 ('P', '_'):
|
||||
case CHAR2 ('P', '\t'):
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
|
||||
#define MASTER_MAIN
|
||||
#include "master.h"
|
||||
#include <sys/mman.h>
|
||||
|
||||
#if __GNU_LIBRARY__ - 0 == 6 /* NOCH notwendig, fehlt in glibc */
|
||||
#include <syscall.h>
|
||||
_syscall1(int,mlockall,int,what);
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@ -19,11 +25,9 @@ main (int argc, char *argv[])
|
|||
int pushlog = 0;
|
||||
int debug = 0;
|
||||
int x;
|
||||
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
|
||||
#ifdef linux
|
||||
reboot(0xfee1dead,0x17392634,1); /* Magic to make me nonswappable */
|
||||
/* TODO: 1.3.xx kernel / libc: use appropriate system call */
|
||||
#endif
|
||||
#ifdef DO_DEBUG_MALLOC
|
||||
mcheck(NULL);
|
||||
mmtrace();
|
||||
|
@ -233,6 +237,8 @@ main (int argc, char *argv[])
|
|||
xquit ("Open Dev", devnam);
|
||||
if (ioctl (fd_mon, I_SRDOPT, RMSGN) < 0) /* Message mode */
|
||||
xquit ("SetStrOpt", "");
|
||||
if (ioctl (fd_mon, I_PUSH, "buffer") < 0)
|
||||
syslog(LOG_WARNING,"Buffer module not found -- unreliable");
|
||||
|
||||
if (pushlog & 2)
|
||||
if (ioctl (fd_mon, I_PUSH, "strlog") < 0)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include "isdn_proto.h"
|
||||
#include "wildmat.h"
|
||||
#include "vectcmp.h"
|
||||
#ifdef linux
|
||||
#if 0 /* def linux */
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
#if LEVEL < 4
|
||||
|
|
|
@ -3,16 +3,13 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streams.h"
|
||||
#include "streamlib.h"
|
||||
|
||||
|
|
|
@ -3,22 +3,19 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/sysmacros.h>
|
||||
#include "stropts.h"
|
||||
#ifdef DO_ADDUSER
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streams.h"
|
||||
#include "streamlib.h"
|
||||
|
||||
#ifdef AUX
|
||||
#include <sys/protosw.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#ifndef linux
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
|
@ -26,8 +23,10 @@
|
|||
#include <linux/sched.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __KERNEL__
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include "kernel.h"
|
||||
#endif
|
||||
|
||||
#define MAXB 100
|
||||
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/time.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#include "streamlib.h"
|
||||
|
|
|
@ -3,15 +3,11 @@
|
|||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "stropts.h"
|
||||
#include "f_user.h"
|
||||
#include <sys/errno.h>
|
||||
#include <f_termio.h>
|
||||
#include "f_termio.h"
|
||||
#ifndef linux
|
||||
#include <sys/tty.h>
|
||||
#endif
|
||||
|
|
|
@ -3,19 +3,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#include "f_user.h"
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "isdn_proto.h"
|
||||
#ifndef KERNEL
|
||||
#include "kernel.h"
|
||||
#endif
|
||||
|
||||
#define MAXB 10
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/errno.h>
|
||||
#include "smallq.h"
|
||||
#include "streams.h"
|
||||
#include "streamlib.h"
|
||||
#ifndef KERNEL
|
||||
#include "kernel.h"
|
||||
#endif
|
||||
|
||||
/**** extremely simple queue handling ****/
|
||||
#define LI 0
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
#include "primitives.h"
|
||||
#include "kernel.h"
|
||||
#include "streamlib.h"
|
||||
#include <sys/errno.h>
|
||||
#ifndef __KERNEL__
|
||||
#include <ctype.h>
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include "isdn_proto.h"
|
||||
#include "isdn_limits.h"
|
||||
#include "msgtype.h"
|
||||
|
@ -155,13 +155,10 @@ dsize (mblk_t * mp)
|
|||
|
||||
|
||||
/**
|
||||
* pullupmsg
|
||||
* pullupm
|
||||
*
|
||||
* Concatenate the first n bytes of a message.
|
||||
*
|
||||
* Note that the caller is responsible for checking that a long-enough
|
||||
* message is returned.
|
||||
*
|
||||
* This code returns NULL if the length is zero and the message is empty.
|
||||
*/
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
|
@ -171,6 +168,7 @@ mblk_t *pullupm(mblk_t *p_msg, short length)
|
|||
#endif
|
||||
{
|
||||
mblk_t *p_newmsg;
|
||||
short offset = 0;
|
||||
|
||||
if(p_msg == NULL)
|
||||
return NULL;
|
||||
|
@ -188,22 +186,26 @@ mblk_t *pullupm(mblk_t *p_msg, short length)
|
|||
return NULL;
|
||||
#endif
|
||||
}
|
||||
if(length == 0 && p_msg->b_cont == NULL && p_msg->b_rptr >= p_msg->b_wptr) {
|
||||
freeb(p_msg);
|
||||
return NULL;
|
||||
}
|
||||
if (length == 0 || p_msg->b_cont == NULL)
|
||||
if((length == 0) && (p_msg->b_cont == NULL)) {
|
||||
if (p_msg->b_rptr >= p_msg->b_wptr) {
|
||||
freeb(p_msg);
|
||||
return NULL;
|
||||
}
|
||||
return p_msg;
|
||||
if(length < 0)
|
||||
}
|
||||
if(length < 0) {
|
||||
offset = -length;
|
||||
length = msgsize(p_msg);
|
||||
if (p_msg->b_wptr - p_msg->b_rptr >= length)
|
||||
}
|
||||
if ((p_msg->b_wptr - p_msg->b_rptr >= length) && (DATA_START(p_msg)+offset <= p_msg->b_rptr))
|
||||
return p_msg;
|
||||
|
||||
if ((p_newmsg = allocb(length, BPRI_MED)) == NULL) {
|
||||
return p_msg;
|
||||
}
|
||||
if ((p_newmsg = allocb(offset+length, BPRI_MED)) == NULL)
|
||||
return NULL;
|
||||
|
||||
DATA_TYPE(p_newmsg) = DATA_TYPE(p_msg);
|
||||
p_newmsg->b_rptr += offset;
|
||||
p_newmsg->b_wptr = p_newmsg->b_rptr;
|
||||
|
||||
/*
|
||||
* Copy the data.
|
||||
|
@ -241,6 +243,76 @@ mblk_t *pullupm(mblk_t *p_msg, short length)
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* embedm
|
||||
*
|
||||
* Concatenate the first n bytes of a message.
|
||||
*
|
||||
* This code returns NULL if the length is zero and the message is empty.
|
||||
*/
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
mblk_t *deb_embedm(const char *deb_file, unsigned int deb_line, mblk_t *p_msg, short offstart, short offend)
|
||||
#else
|
||||
mblk_t *embedm(mblk_t *p_msg, short offstart, short offend)
|
||||
#endif
|
||||
{
|
||||
mblk_t *p_newmsg;
|
||||
int length;
|
||||
|
||||
if(p_msg == NULL)
|
||||
return NULL;
|
||||
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
if(deb_msgdsize(deb_file,deb_line,p_msg) < 0)
|
||||
return NULL;
|
||||
#endif
|
||||
while(p_msg != NULL && p_msg->b_rptr >= p_msg->b_wptr && p_msg->b_cont != NULL) {
|
||||
mblk_t *p_temp = p_msg->b_cont;
|
||||
freeb(p_msg);
|
||||
p_msg = p_temp;
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
if(msgdsize(p_msg) < 0)
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
length = msgsize(p_msg);
|
||||
|
||||
if ((p_newmsg = allocb(offstart+length+offend, BPRI_MED)) == NULL)
|
||||
return NULL;
|
||||
|
||||
DATA_TYPE(p_newmsg) = DATA_TYPE(p_msg);
|
||||
p_newmsg->b_rptr += offstart;
|
||||
p_newmsg->b_wptr = p_newmsg->b_rptr;
|
||||
|
||||
/*
|
||||
* Copy the data.
|
||||
*/
|
||||
while (length > 0 && p_msg != NULL) {
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
if(msgdsize(p_msg) < 0)
|
||||
return NULL;
|
||||
#endif
|
||||
if(p_msg->b_wptr > p_msg->b_rptr) {
|
||||
short n = min(p_msg->b_wptr - p_msg->b_rptr, length);
|
||||
memcpy(p_newmsg->b_wptr, p_msg->b_rptr, n);
|
||||
p_newmsg->b_wptr += n;
|
||||
p_msg->b_rptr += n;
|
||||
length -= n;
|
||||
if (p_msg->b_rptr != p_msg->b_wptr)
|
||||
break;
|
||||
}
|
||||
{ mblk_t *p_cont;
|
||||
p_cont = p_msg->b_cont;
|
||||
freeb(p_msg);
|
||||
p_msg = p_cont;
|
||||
}
|
||||
}
|
||||
freeb(p_msg);
|
||||
return p_newmsg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_DEBUG_STREAMS
|
||||
void
|
||||
deb_putbqff(const char *deb_file,unsigned int deb_line, queue_t * q, mblk_t * mp)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include "streams.h"
|
||||
#include <sys/errno.h>
|
||||
#include "kernel.h"
|
||||
#ifndef linux
|
||||
#include <sys/var.h>
|
||||
#endif
|
||||
|
|
|
@ -3,15 +3,11 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "kernel.h"
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#include "f_user.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "isdn_proto.h"
|
||||
#include "msgtype.h"
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "rate.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "reconnect.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef _STR_IF_H
|
||||
#define _STR_IF_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "kernel.h"
|
||||
#include "primitives.h"
|
||||
|
||||
#ifndef SIOCGETU
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define DOT ->
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
|
||||
#define NSTR 8
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
|||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
|
@ -45,10 +44,8 @@
|
|||
#endif
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/errno.h>
|
||||
#include "f_ioctl.h"
|
||||
#include <sys/file.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "str_if.h"
|
||||
#include "streamlib.h"
|
||||
|
|
|
@ -15,33 +15,28 @@
|
|||
|
||||
#include "f_module.h"
|
||||
|
||||
#define UNREGISTER /* does seem to work */
|
||||
#undef UNREGISTER /* not! */
|
||||
|
||||
#include "primitives.h"
|
||||
#include "f_ip.h"
|
||||
#include "f_malloc.h"
|
||||
#include "ppp.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "kernel.h"
|
||||
|
||||
#define NSTR 8
|
||||
|
||||
#include "primitives.h"
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#include <sys/socket.h>
|
||||
#include <linux/socket.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/if_arp.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/errno.h>
|
||||
#include "f_ioctl.h"
|
||||
#include <sys/file.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "str_if.h"
|
||||
#include "streamlib.h"
|
||||
|
|
|
@ -159,8 +159,8 @@ enable (void)
|
|||
|
||||
#ifdef ROUTE_IF
|
||||
if(!dontroutemyhost)
|
||||
sprintf(makeroute+strlen(makeroute), "%s add -host %s metric 2 dev lo; ", ROUTE_PATH,ichaddr);
|
||||
sprintf(makeroute+strlen(makeroute), "%s add -host %s metric 2 gw %s dev %s; ", ROUTE_PATH,duaddr,ichaddr,ifname);
|
||||
sprintf(makeroute+strlen(makeroute), "%s add -host %s metric 2 dev %s; ", ROUTE_PATH,ichaddr,ifname);
|
||||
sprintf(makeroute+strlen(makeroute), "%s add -host %s metric 2 " /* "gw %s" */ " dev %s; ", ROUTE_PATH,duaddr, /* ichaddr, */ ifname);
|
||||
if(arpaddr != NULL)
|
||||
sprintf(makeroute+strlen(makeroute), "%s -s %s %s pub; ", ARP_PATH,duaddr,arpaddr);
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#if !defined(_LINUX_STREAMS_H)
|
||||
#define _LINUX_STREAMS_H
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/types.h>
|
||||
#include "kernel.h"
|
||||
#include "compat.h"
|
||||
#include "stropts.h"
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
@ -3,16 +3,12 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
/* #include <sys/user.h> */
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "alaw.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
BIN
support/malloc.o
BIN
support/malloc.o
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
#include "primitives.h"
|
||||
#include "f_ioctl.h"
|
||||
#include "stropts.h"
|
||||
#include <sys/errno.h>
|
||||
#include "kernel.h"
|
||||
#ifdef linux
|
||||
#include <linux/ioctl.h>
|
||||
#endif
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
#include "primitives.h"
|
||||
#include "kernel.h"
|
||||
#include <sys/file.h>
|
||||
#include <sys/errno.h>
|
||||
#include "f_signal.h"
|
||||
#include "stropts.h"
|
||||
#include "f_termio.h"
|
||||
#include "f_user.h"
|
||||
#include <sys/uio.h>
|
||||
#include <malloc.h>
|
||||
#include "streams.h"
|
||||
#include "streamlib.h"
|
||||
#include "string.h"
|
||||
#define NDEBUG
|
||||
#include <malloc.h>
|
||||
#include <assert.h>
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(x) assert(x)
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "t70.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "timer.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -6,20 +6,26 @@ NOCLEAN = catfone
|
|||
all::
|
||||
|
||||
install::
|
||||
@if test ! -f /etc/isdn.conf; then \
|
||||
echo install isdn.conf /etc ; \
|
||||
install isdn.conf /etc ; \
|
||||
@if test ! -f /etc/isdn.conf; then \
|
||||
echo install isdn.conf /etc ; \
|
||||
install isdn.conf /etc ; \
|
||||
fi
|
||||
@if test -d /etc/rc.d ; then \
|
||||
if test ! -f /etc/rc.d/rc.isdn ; then \
|
||||
echo install rc.isdn /etc/rc.d ; \
|
||||
install rc.isdn /etc/rc.d; \
|
||||
fi; \
|
||||
else \
|
||||
if test ! -f /etc/rc.isdn ; then \
|
||||
echo install rc.isdn /etc ; \
|
||||
install rc.isdn /etc; \
|
||||
fi; \
|
||||
@if test -d /sbin/init.d/scripts ; then \
|
||||
echo "*** /sbin/init.d/scripts/uisdn ***"; \
|
||||
install rc.isdn /sbin/init.d/scripts/uisdn ; \
|
||||
install rc.isdnmon /sbin/init.d/scripts/uisdnmon ; \
|
||||
elif test -d /sbin/init.d; then \
|
||||
echo "*** /sbin/init.d/isdn ***"; \
|
||||
install rc.isdn /sbin/init.d/isdn ; \
|
||||
install rc.isdnmon /sbin/init.d/isdnmon ; \
|
||||
elif test -d /etc/rc.d ; then \
|
||||
echo "*** /etc/rc.d/rc.isdn ***"; \
|
||||
install rc.isdn /etc/rc.d; \
|
||||
install rc.isdnmon /etc/rc.d; \
|
||||
else \
|
||||
echo "*** /etc/rc.isdn ***"; \
|
||||
install rc.isdn /etc; \
|
||||
install rc.isdnmon /etc; \
|
||||
fi
|
||||
|
||||
include $(TOPDIR)/Make.rules
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
FILE=$1
|
||||
|
||||
VERSION=${VERSION:-$(${TOPDIR}/tools/getversion)}
|
||||
dir=/lib/modules/$VERSION
|
||||
MODDIR=${MODDIR:-/lib/modules}
|
||||
dir=${MODDIR}/$VERSION
|
||||
echo isdn/d_$FILE >>$dir/../modules.isdn.all
|
||||
rm -f $dir/isdn/d_$FILE
|
||||
(
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
FILE=$1
|
||||
|
||||
VERSION=${VERSION:-$(${TOPDIR}/tools/getversion)}
|
||||
dir=/lib/modules/$VERSION
|
||||
MODDIR=${MODDIR:-/lib/modules}
|
||||
dir=${MODDIR}/$VERSION
|
||||
echo isdn/$FILE >>$dir/../modules.isdn.all
|
||||
rm -f $dir/isdn/$FILE
|
||||
(
|
||||
|
|
|
@ -127,16 +127,6 @@ LF Bin? 4000 3 /etc/isdn/bri.68k
|
|||
#DL * Tel0 - :pr 64
|
||||
|
||||
|
||||
## The following is a complete example on how to do a leased line.
|
||||
#
|
||||
#P tcp foo * Tel0 RXf :dI :bc 1 :Ft
|
||||
#ML tcp foo * Tel0 -,3 frame xstrlog fakeh reconn str_if
|
||||
#MP tcp foo * Tel0 - proto :sg 1 :ca 1 :bk 0 :on
|
||||
#R tcp foo * Tel0 root RUBf slipto -d 10.1.1.1 10.1.1.2
|
||||
#D * foo * Tel0 f -
|
||||
#DL * Tel0 - :pr 64
|
||||
|
||||
|
||||
### Tarifzonen sind was Doofes...
|
||||
# Um diese Daten zu nutzen, muss in der betreffenden P-Zeile
|
||||
# als Key mindestens ein A bis J stehen (Entfernung des Rechners)
|
||||
|
|
|
@ -1,22 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
PATH=/usr/local/isdn/bin-$(uname -r):/usr/local/isdn/bin:/usr/sbin:/sbin:/usr/lcoal/bin:/usr/bin:/bin
|
||||
## =()<DESTDIR=@<DESTDIR>@>()=
|
||||
DESTDIR=/usr/lib/isdn
|
||||
## =()<LOCKNAME=@<LOCKNAME>@>()=
|
||||
LOCKNAME=/var/lock
|
||||
|
||||
if [ "$1" = "off" ] ; then
|
||||
set -e
|
||||
|
||||
. /etc/rc.config
|
||||
|
||||
if [ "$1" = "config" ] ; then # smurfsche Spezialitäten
|
||||
cat <<'END' >/tmp/cf.$$
|
||||
#
|
||||
## welcher ISDN-Treiber? uisdn, i4l, off
|
||||
#
|
||||
ISDN=uisdn
|
||||
END
|
||||
fillup /etc/rc.config /tmp/cf.$$
|
||||
rm /tmp/cf.$$
|
||||
cd /sbin/init.d/rc2.d
|
||||
ln -sf ../scripts/uisdn S18uisdn
|
||||
ln -sf ../scripts/uisdn K18uisdn
|
||||
cd /sbin/init.d/rc3.d
|
||||
ln -sf ../scripts/uisdn S18uisdn
|
||||
ln -sf ../scripts/uisdn K18uisdn
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$ISDN" != "uisdn" ] ; then exit 0; fi
|
||||
|
||||
PATH=${DESTDIR}/bin-$(uname -r):${DESTDIR}/bin:$PATH
|
||||
|
||||
if [ "$1" = "off" -o "$1" = "stop" ] ; then
|
||||
trap '' 1 2 15
|
||||
killall rc.isdn || true
|
||||
echo -n "Killing the ISDN server ... "
|
||||
if killall master ; then
|
||||
sleep 10
|
||||
killall -9 master || true
|
||||
if test -f /var/run/isdn.pid ; then
|
||||
read pid < /var/run/isdn.pid
|
||||
rm /var/run/isdn.pid
|
||||
fi
|
||||
pf=$(echo $LOCKNAME | sed -e 's/%s/isdn0/')
|
||||
if test -f $pf ; then
|
||||
read pid <$pf
|
||||
if kill $pid ; then
|
||||
sleep 10
|
||||
kill -9 $pid || true
|
||||
fi
|
||||
rm -f $pf
|
||||
fi
|
||||
|
||||
echo -n "find modules ..."
|
||||
while read a b c d ; do
|
||||
case "$a" in
|
||||
\#*) ;;
|
||||
*)
|
||||
while read x a b c d ; do
|
||||
case "$x" in
|
||||
MO*)
|
||||
if [ "x$a" = "x-o" ] ; then
|
||||
mod=$b
|
||||
elif [ "x$b" = "x-o" ] ; then
|
||||
|
@ -27,40 +62,40 @@ if [ "$1" = "off" ] ; then
|
|||
mods="$mod $mods"
|
||||
;;
|
||||
esac
|
||||
done < /lib/modules/modules.isdn
|
||||
done < /etc/isdn.conf
|
||||
echo ""
|
||||
echo rmmod $mods
|
||||
exec rmmod $mods
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -d /lib/gnu; then
|
||||
export LD_LIBRARY_PATH=/lib/gnu
|
||||
fi
|
||||
|
||||
echo $$ > /var/run/isdn.pid
|
||||
if lsmod | grep isdn_2 >/dev/null 2>&1 ; then : ; else
|
||||
cd /lib/modules/$(uname -r)
|
||||
if test -f symbols.isdn ; then mv symbols.isdn symbols.isdn.old ; fi
|
||||
while read a ; do
|
||||
case "$a" in
|
||||
\#*) ;;
|
||||
*)
|
||||
if test -f /tmp/symbols.isdn ; then mv /tmp/symbols.isdn /tmp/symbols.isdn.old ; fi
|
||||
while read x a ; do
|
||||
case "$x" in
|
||||
MO*)
|
||||
/bin/echo -n "\rISDN Modules: " >&2
|
||||
/bin/echo -n "\rISDN Modules: $a: " >&2
|
||||
eval "insmod -m $a" ## wegen name=$(cardname Foo0) in $a
|
||||
;;
|
||||
esac
|
||||
done < ../modules.isdn > symbols.isdn
|
||||
done < /etc/isdn.conf > /tmp/symbols.isdn
|
||||
/bin/echo "\rISDN Modules...done. "
|
||||
fi
|
||||
|
||||
cd /var/tmp
|
||||
## /usr might be write protected and the debugging person
|
||||
# might want to have coredumps. So I provide them.
|
||||
cd /var/tmp # for coredumps...
|
||||
|
||||
ulimit -c 40000
|
||||
# ulimit -d 20000
|
||||
|
||||
# monitor -b >>/var/log/acct/ip &
|
||||
|
||||
set +e
|
||||
while : ; do
|
||||
while test -f /var/run/isdn.pid ; do
|
||||
master -wd /etc/isdn.conf 2>>/tmp/isdn.log >>/var/log/isdn
|
||||
sleep 5
|
||||
done &
|
||||
|
|
|
@ -8,18 +8,14 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "streamlib.h"
|
||||
#include "v110.h"
|
||||
#include "isdn_proto.h"
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
#ifndef _COMPRESS
|
||||
#define _COMPRESS
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include "kernel.h"
|
||||
#include "streams.h"
|
||||
#include "f_ip.h"
|
||||
#include "vanj.h"
|
||||
|
@ -13,7 +12,7 @@
|
|||
/*
|
||||
* Definitions for tcp compression routines.
|
||||
*
|
||||
* $Header: slcompress.h,v 1.10 89/12/31 08:53:02 van Exp $
|
||||
* $Header: /usr/src/cvs/kernel/isdn/van_j/compress.h,v 1.1.1.1 1996/07/29 07:09:09 smurf Exp $
|
||||
*
|
||||
* Copyright (c) 1989 Regents of the University of California. All rights
|
||||
* reserved.
|
||||
|
|
|
@ -5,17 +5,13 @@
|
|||
#include "f_ip.h"
|
||||
#include "f_malloc.h"
|
||||
#include "ppp.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include "stropts.h"
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
#include <sys/errno.h>
|
||||
#include "vanj.h"
|
||||
#include "van_j.h"
|
||||
#include "compress.h"
|
||||
|
|
|
@ -10,14 +10,10 @@
|
|||
|
||||
#include "f_module.h"
|
||||
#include "primitives.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include "kernel.h"
|
||||
#include "f_signal.h"
|
||||
#include "f_malloc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include "streams.h"
|
||||
#include <sys/errno.h>
|
||||
#ifdef DONT_ADDERROR
|
||||
#include "f_user.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue