Added support for building logically-bind-group's per interface.

usefull for outgoing call's with more then one isdn-card.

Switchable support to dont reset the hangup-timeout for
receive frames. Most part's of the timru-rules for receiving frames
are now obsolete. If the input- or forwarding-firewall deny
the frame, the line will be not hold open.
This commit is contained in:
Detlef Wengorz 1999-10-27 21:21:18 +00:00
parent 4bc202414f
commit e431b62d15
6 changed files with 429 additions and 87 deletions

View File

@ -87,6 +87,8 @@ if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
bool 'Enable LCR-Support (need isdnlog)' CONFIG_ISDN_WITH_ABC_LCR_SUPPORT
bool 'TCP keepalive detect and response (ip4 only)' CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE
bool 'Drop frames s_addr != iface_addr (ip4 only)' CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
bool 'RX dont reset hanguptimeout' CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
bool 'Support (device-channel)<->(bind-groups)' CONFIG_ISDN_WITH_ABC_ICALL_BIND
bool 'Enable UDP-Info-Support' CONFIG_ISDN_WITH_ABC_UDP_CHECK

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.89 1999/10/16 14:46:47 keil
* replace kmalloc with vmalloc for the big dev struct
*
* Revision 1.88 1999/10/02 00:39:26 he
* Fixed a 2.3.x wait queue initialization (was causing panics)
*
@ -2101,7 +2104,11 @@ isdn_get_free_channel(int usage, int l2_proto, int l3_proto, int pre_dev
restore_flags(flags);
return i;
} else {
#ifdef CONFIG_ISDN_WITH_ABC
if ((pre_dev == d) && ((pre_chan == dev->chanmap[i]) || pre_chan > 1000)) {
#else
if ((pre_dev == d) && (pre_chan == dev->chanmap[i])) {
#endif
dev->usage[i] &= ISDN_USAGE_EXCLUSIVE;
dev->usage[i] |= usage;
isdn_info_update();

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.16 1999/07/01 08:29:54 keil
* compatibility to 2.3 kernel
*
* Revision 1.15 1999/04/18 14:06:50 fritz
* Removed TIMRU stuff.
*
@ -103,6 +106,9 @@
#undef ISDN_DEBUG_NET_DIAL
#undef ISDN_DEBUG_NET_ICALL
#ifdef CONFIG_ISDN_WITH_ABC
int isdn_net_force_dial_lp(isdn_net_local *);
#endif
/* Prototypes */
extern void isdn_MOD_INC_USE_COUNT(void);
extern void isdn_MOD_DEC_USE_COUNT(void);

View File

@ -20,6 +20,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.3 1999/09/23 22:22:41 detabc
* added tcp-keepalive-detect with local response (ipv4 only)
* added host-only-interface support
* (source ipaddr == interface ipaddr) (ipv4 only)
* ok with kernel 2.3.18 and 2.2.12
*
* Revision 1.2 1999/09/14 22:53:53 detabc
*
* Test LCR ioctl call/ change a wrong pointer++/
@ -46,6 +52,7 @@ static char *dwabcrevison = "$Revision$";
#include <asm/semaphore.h>
#include <linux/isdn.h>
#include "isdn_common.h"
#ifdef CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE
#include <linux/skbuff.h>
@ -418,8 +425,9 @@ int dw_abc_udp_test(struct sk_buff *skb,struct net_device *ndev)
if( iph->tot_len == NBYTEORDER_30BYTES && iph->protocol == IPPROTO_UDP) {
struct udphdr *udp = (struct udphdr *)(skb->data + (iph->ihl << 2));
ushort usrc = ntohs(udp->source);
if(udp->dest == htons(25001) && udp->source >= htons(20000) && udp->source < htons(25000)) {
if(udp->dest == htons(25001) && usrc >= 20000 && usrc < 25000) {
char *p = (char *)(udp + 1);
@ -428,6 +436,21 @@ int dw_abc_udp_test(struct sk_buff *skb,struct net_device *ndev)
char mc = 0;
switch(*p) {
case 0x32:
case 0x30:
mc = *p;
if((lp->flags & ISDN_NET_CONNECTED) && (!lp->dialstate)) {
mc++;
break;
}
if(*p != 0x32) break;
if(!isdn_net_force_dial_lp(lp)) mc++;
break;
case 0x11:
mc = *p + 1;
/**********
@ -1102,11 +1125,7 @@ int isdn_dw_abc_ip4_keepalive_test(struct net_device *ndev,struct sk_buff *skb)
#endif
if(ip->saddr ^ ipaddr) {
printk(KERN_DEBUG
"isdn_dynaddr drop frame %s->%s\n",
ipnr2buf(ip->saddr),
ipnr2buf(ip->daddr));
isdn_net_log_skb_dwabc(skb,lp,"isdn_dynaddr drop");
return(1);
}
}
@ -1232,6 +1251,9 @@ void isdn_dw_abc_init_func(void)
#ifdef CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
"CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR\n"
#endif
#endif
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
"CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER\n"
#endif
"loaded\n",
dwabcrevison);
@ -1270,7 +1292,7 @@ void isdn_dwabc_test_phone(isdn_net_local *lp)
*lp->dw_out_msn = 0;
#endif
for(;h != NULL && secure < 100;secure++,h = h->next) {
for(;h != NULL && secure < 1000;secure++,h = h->next) {
char *p = h->num;
char *ep = p + ISDN_MSNLEN;
@ -1283,13 +1305,15 @@ void isdn_dwabc_test_phone(isdn_net_local *lp)
#ifdef CONFIG_ISDN_WITH_ABC_OUTGOING_EAZ
if(*p == '>') {
char *d = lp->dw_out_msn;
if(++p < ep && *p != '<' && *p != '>') {
for(ep--,p++;*p && (p < ep);)
*(d++) = *(p++);
char *d = lp->dw_out_msn;
*d = 0;
continue;
for(;*p && (p < ep) && (*p == ' ' || *p == '\t');p++);
for(ep--;*p && (p < ep);) *(d++) = *(p++);
*d = 0;
continue;
}
}
#endif
@ -1302,6 +1326,7 @@ void isdn_dwabc_test_phone(isdn_net_local *lp)
case 'u': lp->dw_abc_flags |= ISDN_DW_ABC_FLAG_NO_UDP_CHECK; break;
case 'h': lp->dw_abc_flags |= ISDN_DW_ABC_FLAG_NO_UDP_HANGUP; break;
case 'd': lp->dw_abc_flags |= ISDN_DW_ABC_FLAG_NO_UDP_DIAL; break;
case 'X': lp->dw_abc_flags |= ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER; break;
case 'D': lp->dw_abc_flags |= ISDN_DW_ABC_FLAG_DYNADDR; break;
@ -1322,4 +1347,198 @@ void isdn_dwabc_test_phone(isdn_net_local *lp)
}
}
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
static int get_driverid(isdn_net_local *lp,char *name,char *ename,ulong *bits)
{
int retw = -1;
if(name != NULL && lp != NULL) {
int i = 0;
char *p;
for(;name < ename && *name && *name <= ' ' ; name++);
for(p = name;p < ename && *p && *p != ',';p++);
for (i = 0; i < ISDN_MAX_DRIVERS; i++) {
char *s = name;
char *d = dev->drvid[i];
for(;s < p && *s == *d && *s;s++,d++);
if(!*d && s >= p)
break;
}
if(i >= ISDN_MAX_DRIVERS) {
printk(KERN_DEBUG "isdn_dwabc_bind %s interface %s not found\n",
lp->name,name);
} else {
retw = i;
if(bits != NULL) {
char buf[16];
char *d = buf;
char *ed = buf + sizeof(buf) - 1;
*bits = ~0L;
for(;p < ename && *p == ',';p++);
while(p < ename && *p && d < ed)
*(d++) = *(p++);
*d = 0;
if(*buf)
*bits = (ulong)simple_strtoul(buf,&d,0);
}
}
}
return(retw);
}
int isdn_dwabc_check_icall_bind(isdn_net_local *lp,int di,int ch)
{
int ret = 0;
if(lp != NULL && lp->pre_device < 0 && lp->pre_channel < 0 && di >= 0 && di < 30) {
isdn_net_phone *h = lp->phone[0];
int secure = 0;
for(;h != NULL && secure < 1000;secure++,h = h->next) {
char *p = h->num;
char *ep = p + ISDN_MSNLEN;
ulong bits = 0;
for(;p < ep && *p && (*p <= ' ' || *p == '"' || *p == '\'');p++);
if(p >= (ep-1) || *p != '>')
continue;
if(*(++p) != '<')
continue;
ret = -1;
p++;
if(p < ep && (*p == '<' || *p == '>'))
p++;
if(get_driverid(lp,p,ep,&bits) == di) {
if((bits & (1L << ch))) {
ret = 0;
break;
}
}
}
if(ret) {
printk(KERN_DEBUG "isdn_dwabc_ibind: %s IN-CALL driver %d ch %d %s\n",
lp->name,
di,
ch,
"not allowed for this interface and channel");
}
}
return(ret);
}
int dwabc_isdn_get_net_free_channel(isdn_net_local *lp)
{
int retw = -1;
int isconf = 0;
if(lp != NULL && lp->pre_device < 0 && lp->pre_channel < 0) {
isdn_net_phone *h = lp->phone[0];
int secure = 0;
for(;retw < 0 && h != NULL && secure < 1000;secure++,h = h->next) {
char *p = h->num;
char *ep = p + ISDN_MSNLEN;
int di = 0;
int shl = 0;
ulong bits = 0;
short down = 0;
for(;p < ep && *p && (*p <= ' ' || *p == '"' || *p == '\'');p++);
if(p >= (ep-1) || *p != '>') continue;
if(*(++p) != '>') continue;
isconf = 1;
p++;
if(p < ep && (*p == '<' || *p == '>')) {
down = *p == '<';
p++;
}
if((di = get_driverid(lp,p,ep,&bits)) < 0)
continue;
if(down) for(shl = 31; shl >= 0 && retw < 0; shl--) {
if(bits & (1L << shl)) {
if(isdn_dc2minor(di,shl) < 0)
continue;
retw = isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
di,
shl);
}
} else for(shl = 0; shl < 32 && retw < 0; shl++) {
if(bits & (1L << shl)) {
if(isdn_dc2minor(di,shl) < 0)
break;
retw = isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
di,
shl);
}
}
}
}
if(!isconf) {
retw = isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel);
}
return(retw);
}
#endif
#endif

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.94 1999/10/02 11:07:02 he
* Changed tbusy logic in indn_net.c
*
* Revision 1.93 1999/09/23 22:22:41 detabc
* added tcp-keepalive-detect with local response (ipv4 only)
* added host-only-interface support
@ -382,6 +385,7 @@
#ifdef CONFIG_ISDN_WITH_ABC
#include <linux/isdn_dwabc.h>
#define isdn_net_log_skb(skb,lp) isdn_net_log_skb_dwabc(skb,lp,NULL)
#endif
#ifndef ISDN_NEW_TBUSY
@ -430,7 +434,9 @@ static void __inline__ isdn_net_dev_xoff(struct net_device * dev)
/* Prototypes */
#ifndef CONFIG_ISDN_WITH_ABC
int isdn_net_force_dial_lp(isdn_net_local *);
#endif
static int isdn_net_start_xmit(struct sk_buff *, struct net_device *);
static int isdn_net_xmit(struct net_device *, isdn_net_local *, struct sk_buff *);
@ -1267,8 +1273,13 @@ typedef struct {
unsigned short dest;
} ip_ports;
#ifdef CONFIG_ISDN_WITH_ABC
void
isdn_net_log_skb_dwabc(struct sk_buff * skb, isdn_net_local * lp,char *reason)
#else
static void
isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp)
#endif
{
u_char *p = skb->nh.raw; /* hopefully, this was set correctly */
unsigned short proto = ntohs(skb->protocol);
@ -1339,13 +1350,26 @@ isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp)
strcpy(addinfo, " IDP");
break;
}
#ifdef CONFIG_ISDN_WITH_ABC
printk(KERN_INFO "%s %s: %d.%d.%d.%d -> %d.%d.%d.%d%s\n",
(reason == NULL) ? "OPEN" : reason,
(lp != NULL) ? lp->name : "",
#else
printk(KERN_INFO "OPEN: %d.%d.%d.%d -> %d.%d.%d.%d%s\n",
#endif
p[12], p[13], p[14], p[15],
p[16], p[17], p[18], p[19],
addinfo);
break;
case ETH_P_ARP:
#ifdef CONFIG_ISDN_WITH_ABC
printk(KERN_INFO "%s %s: ARP %d.%d.%d.%d -> *.*.*.* ?%d.%d.%d.%d\n",
(reason == NULL) ? "OPEN" : reason,
(lp != NULL) ? lp->name : "",
#else
printk(KERN_INFO "OPEN: ARP %d.%d.%d.%d -> *.*.*.* ?%d.%d.%d.%d\n",
#endif
p[14], p[15], p[16], p[17],
p[24], p[25], p[26], p[27]);
break;
@ -1584,17 +1608,29 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
/* Grab a free ISDN-Channel */
if (((chi =
isdn_get_free_channel(ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel)) < 0) &&
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
dwabc_isdn_get_net_free_channel(lp)
#else
isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel)
#endif
) < 0) &&
((chi =
isdn_get_free_channel(ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel^1)) < 0)) {
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
dwabc_isdn_get_net_free_channel(lp)
#else
isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel^1)
#endif
) < 0)) {
restore_flags(flags);
isdn_net_unreachable(ndev, skb,
"No channel");
@ -1914,20 +1950,38 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
switch (lp->p_encap) {
case ISDN_NET_ENCAP_ETHER:
/* Ethernet over ISDN */
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
if(!(olp->dw_abc_flags & ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER)) {
#endif
olp->huptimer = 0;
lp->huptimer = 0;
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
}
#endif
skb->protocol = isdn_net_type_trans(skb, ndev);
break;
case ISDN_NET_ENCAP_UIHDLC:
/* HDLC with UI-frame (for ispa with -h1 option) */
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
if(!(olp->dw_abc_flags & ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER)) {
#endif
olp->huptimer = 0;
lp->huptimer = 0;
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
}
#endif
skb_pull(skb, 2);
/* Fall through */
case ISDN_NET_ENCAP_RAWIP:
/* RAW-IP without MAC-Header */
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
if(!(olp->dw_abc_flags & ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER)) {
#endif
olp->huptimer = 0;
lp->huptimer = 0;
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
}
#endif
skb->protocol = htons(ETH_P_IP);
break;
case ISDN_NET_ENCAP_CISCOHDLCK:
@ -1967,8 +2021,14 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
/* Fall through */
case ISDN_NET_ENCAP_IPTYP:
/* IP with type field */
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
if(!(olp->dw_abc_flags & ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER)) {
#endif
olp->huptimer = 0;
lp->huptimer = 0;
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
}
#endif
skb->protocol = *(unsigned short *) &(skb->data[0]);
skb_pull(skb, 2);
if (*(unsigned short *) skb->data == 0xFFFF)
@ -1981,8 +2041,14 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
* huptimer on LCP packets.
*/
if (proto != PPP_LCP) {
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
if(!(olp->dw_abc_flags & ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER)) {
#endif
olp->huptimer = 0;
lp->huptimer = 0;
#ifdef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
}
#endif
}
isdn_ppp_receive(lp->netdev, olp, skb);
return;
@ -2293,7 +2359,10 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm setup)
isdn_net_phone *n;
ulong flags;
char nr[32];
#ifdef CONFIG_ISDN_WITH_ABC
if(dev->net_verbose > 2)
printk(KERN_DEBUG "n_fi: di=%d ch=%d idx=%d usg=0x%04X\n", di, ch, idx,dev->usage[idx]);
#endif
/* Search name in netdev-chain */
save_flags(flags);
cli();
@ -2377,91 +2446,100 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm setup)
printk(KERN_DEBUG "n_fi: match1, pdev=%d pch=%d\n",
lp->pre_device, lp->pre_channel);
#endif
#ifdef CONFIG_ISDN_WITH_ABC
#ifdef CONFIG_ISDN_WITH_ABC_CALLB
{
int use_this_call = 0;
int use_this_call = 0;
if(!(lp->flags & ISDN_NET_CBOUT) && ((lp->dialstate == 4) || (lp->dialstate == 12))) {
if(!(lp->flags & ISDN_NET_CBOUT) && ((lp->dialstate == 4) || (lp->dialstate == 12))) {
/*
** searching for a diff. in the calling-number and the EAZ
** the remote will make the same
*/
/*
** searching for a diff. in the calling-number and the EAZ
** the remote will make the same
*/
char *pnr = nr;
char *pea = eaz;
char *pnr = nr;
char *pea = eaz;
for(;*pnr;pnr++);
for(;*pea;pea++);
for(pnr--,pea--;pnr >= nr && pea >= eaz && *pea != *pnr;pnr--,pea--);
for(;*pnr;pnr++);
for(;*pea;pea++);
for(pnr--,pea--;pnr >= nr && pea >= eaz && *pea != *pnr;pnr--,pea--);
if(pnr < nr || pea < eaz || *pea > *pnr) {
if(pnr < nr || pea < eaz || *pea > *pnr) {
p = (isdn_net_dev *) p->next;
continue;
p = (isdn_net_dev *) p->next;
continue;
}
use_this_call = 1;
}
if( use_this_call ||
((lp->flags & ISDN_NET_CBOUT) && (lp->flags & ISDN_NET_CONNECTED))) {
use_this_call = 1;
}
if( use_this_call ||
((lp->flags & ISDN_NET_CBOUT) && (lp->flags & ISDN_NET_CONNECTED))) {
/*
** the incoming call was to quick.
** the callback-delay-time ist not reached.
** in that case we can stop the call
*/
/*
** the incoming call was to quick.
** the callback-delay-time ist not reached.
** in that case we can stop the call
*/
if(lp->isdn_device > -1 && lp->isdn_channel > -1) {
if(lp->isdn_device > -1 && lp->isdn_channel > -1) {
int minor = isdn_dc2minor(lp->isdn_device,lp->isdn_channel);
int minor = isdn_dc2minor(lp->isdn_device,lp->isdn_channel);
if(lp->isdn_device != di || lp->isdn_channel != ch) {
if(lp->isdn_device != di || lp->isdn_channel != ch) {
isdn_ctrl cmd;
isdn_ctrl cmd;
memset((void *)&cmd,0,sizeof(cmd));
cmd.driver = lp->isdn_device;
cmd.command = ISDN_CMD_HANGUP;
cmd.arg = lp->isdn_channel;
(void) dev->drv[cmd.driver]->interface->command(&cmd);
isdn_all_eaz(lp->isdn_device, lp->isdn_channel);
memset((void *)&cmd,0,sizeof(cmd));
cmd.driver = lp->isdn_device;
cmd.command = ISDN_CMD_HANGUP;
cmd.arg = lp->isdn_channel;
(void) dev->drv[cmd.driver]->interface->command(&cmd);
isdn_all_eaz(lp->isdn_device, lp->isdn_channel);
if(dev->net_verbose > 1) {
if(dev->net_verbose > 1) {
printk(KERN_INFO
"%s: found outgoing call hangup old call on di %d ch %d\n",
lp->name,lp->isdn_device,lp->isdn_channel);
}
printk(KERN_INFO
"%s: found outgoing call hangup old call on di %d ch %d\n",
} else if (dev->net_verbose > 1) {
printk(KERN_INFO "%s: found outgoing call on same di %d ch %d\n",
lp->name,lp->isdn_device,lp->isdn_channel);
}
if(minor >= 0) {
dev->rx_netdev[minor] = NULL;
dev->st_netdev[minor] = NULL;
}
isdn_free_channel(lp->isdn_device,
lp->isdn_channel, ISDN_USAGE_NET);
} else if (dev->net_verbose > 1) {
printk(KERN_INFO "%s: found outgoing call on same di %d ch %d\n",
lp->name,lp->isdn_device,lp->isdn_channel);
printk(KERN_INFO "%s: found outgoing call reset callstate \n",lp->name);
}
if(minor >= 0) {
dev->rx_netdev[minor] = NULL;
dev->st_netdev[minor] = NULL;
}
isdn_free_channel(lp->isdn_device,
lp->isdn_channel, ISDN_USAGE_NET);
} else if (dev->net_verbose > 1) {
printk(KERN_INFO "%s: found outgoing call reset callstate \n",lp->name);
lp->flags &= ~ISDN_NET_CONNECTED;
lp->isdn_device = -1;
lp->isdn_channel = -1;
lp->dtimer = 0;
lp->dialstate = 0;
}
}
#endif
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
if(isdn_dwabc_check_icall_bind(lp,di,ch)) {
lp->flags &= ~ISDN_NET_CONNECTED;
lp->isdn_device = -1;
lp->isdn_channel = -1;
lp->dtimer = 0;
lp->dialstate = 0;
}
p = (isdn_net_dev *) p->next;
continue;
}
#endif
#endif
if (dev->usage[idx] & ISDN_USAGE_EXCLUSIVE) {
if ((lp->pre_channel != ch) ||
@ -2608,10 +2686,19 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm setup)
lp->name, nr, eaz);
if (lp->phone[1]) {
/* Grab a free ISDN-Channel */
if ((chi = isdn_get_free_channel(ISDN_USAGE_NET, lp->l2_proto,
if ((chi =
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
dwabc_isdn_get_net_free_channel(lp)
#else
isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel)) < 0) {
lp->pre_device,
lp->pre_channel)
#endif
) < 0) {
printk(KERN_WARNING "isdn_net_find_icall: No channel for %s\n", lp->name);
restore_flags(flags);
return 0;
@ -2759,10 +2846,18 @@ isdn_net_force_dial_lp(isdn_net_local * lp)
cli();
/* Grab a free ISDN-Channel */
if ((chi = isdn_get_free_channel(ISDN_USAGE_NET, lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel)) < 0) {
if ((chi =
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
dwabc_isdn_get_net_free_channel(lp)
#else
isdn_get_free_channel(
ISDN_USAGE_NET,
lp->l2_proto,
lp->l3_proto,
lp->pre_device,
lp->pre_channel)
#endif
) < 0) {
printk(KERN_WARNING "isdn_net_force_dial: No channel for %s\n", lp->name);
restore_flags(flags);
return -EAGAIN;

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.80 1999/10/26 21:09:29 armin
* New bufferlen for phonenumber only with kernel 2.3.x
*
* Revision 1.79 1999/10/16 17:52:38 keil
* Changing the MSN length need new data versions
*
@ -321,16 +324,21 @@
#undef CONFIG_ISDN_WITH_ABC_LCR_SUPPORT
#undef CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE
#undef CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
#undef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
#undef CONFIG_ISDN_WITH_ABC_ICALL_BIND
#else
#include <linux/isdn_dwabc.h>
#define ISDN_DW_ABC_FLAG_NO_TCP_KEEPALIVE 0x00000001L
#define ISDN_DW_ABC_FLAG_NO_UDP_CHECK 0x00000002L
#define ISDN_DW_ABC_FLAG_NO_UDP_HANGUP 0x00000004L
#define ISDN_DW_ABC_FLAG_NO_UDP_DIAL 0x00000008L
#define ISDN_DW_ABC_FLAG_DYNADDR 0x00000010L
#define ISDN_DW_ABC_FLAG_RCV_NO_HUPTIMER 0x00000020L
extern void isdn_dw_abc_init_func(void);
extern void isdn_dw_abc_release_func(void);
#endif
@ -971,6 +979,7 @@ extern isdn_dev *dev;
#ifdef CONFIG_ISDN_WITH_ABC
extern void isdn_net_unreachable(struct net_device *,struct sk_buff *,char *);
extern void isdn_net_log_skb_dwabc(struct sk_buff *,isdn_net_local *,char *);
extern void isdn_net_hangup(struct net_device *d);
extern void isdn_dw_clear_if(ulong pm,isdn_net_local *);
extern void isdn_dwabc_test_phone(isdn_net_local *);
@ -990,6 +999,10 @@ extern int dw_abc_udp_test(struct sk_buff *skb,struct net_device *ndev);
#if CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE || CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
int isdn_dw_abc_ip4_keepalive_test(struct net_device *ndev,struct sk_buff *skb);
#endif
#ifdef CONFIG_ISDN_WITH_ABC_ICALL_BIND
extern int isdn_dwabc_check_icall_bind(isdn_net_local *,int,int);
extern int dwabc_isdn_get_net_free_channel(isdn_net_local *);
#endif
#endif