Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 1998 10:20:36 +0200
From:      Gary Jennejohn <garyj@peedub.muc.de>
To:        balu@dva.in-berlin.de (Boris Staeblow)
Cc:        garyj@muc.de, freebsd-isdn@FreeBSD.ORG
Subject:   Re: ifconfig iprX down -> disconnect? 
Message-ID:  <199806190820.KAA04767@peedub.muc.de>
In-Reply-To: Your message of "Fri, 19 Jun 1998 00:32:05 %2B0200." <m0ymnDx-000q4XC@dva.in-berlin.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
Boris Staeblow writes:
>Gary Jennejohn writes:
>> Boris Staeblow writes:
>> >
>> >is it planned to implement the function in i4b to disconnect a line
>> >using ifconfig iprX down (like bisdn has done) ?
>> >
>> 
>> it already works that way.
>
>???
>
>I've 0.62, FreeBSD-current, Teles S0/16 and it doesn't work.
>When I type ifconfig ipr0 down the line stay online (-> nothing happens)
>until I kill it via the isdnd-menu or the timeout occur.
>
>Do I need special settings in the isdnd.rc?
>

this has nothing to do with isdnd.rc, it's handled in the kernel.

Sorry, I didn't test it with 0.62. I thought it used to work with older
versions, but now that I look at the code I don't see how it ever could
have. I must have confused ipr with isppp. I _know_ that isppp works.

Try this (untested except for compiling) patch and report back to the list.
This is basically the same code used by isppp.

*** i4b_ipr.c.orig	Fri Jun 19 10:01:42 1998
--- i4b_ipr.c	Fri Jun 19 10:05:31 1998
***************
*** 464,469 ****
--- 464,470 ----
  	struct ifaddr *ifa = (struct ifaddr *)data;
  	int s;
  	int error = 0;
+ 	call_desc_t *cd = sc->sc_cdp;
  
  	s = SPLI4B();
  	
***************
*** 484,490 ****
  				(sc->sc_if.if_flags & IFF_RUNNING))
  			{
  				/* DISCONNECT */
! 				/* sc->sc_if.if_flags &= ~IFF_RUNNING; */
  			}
  			microtime(&sc->sc_if.if_lastchange);
  			break;
--- 485,495 ----
  				(sc->sc_if.if_flags & IFF_RUNNING))
  			{
  				/* DISCONNECT */
! 				/* this is the way Helle does it in the timeout routine */
! 				(*ctrl_desc[cd->controller].N_DISCONNECT_REQUEST)(cd->cdid, CAUSE_NORMAL);
! 				/* should be generalized, not just disconn due to timeouts */
! 				i4b_l4_idle_timeout_ind(cd);
! 				sc->sc_if.if_flags &= ~IFF_RUNNING;
  			}
  			microtime(&sc->sc_if.if_lastchange);
  			break;


---
Gary Jennejohn
Home - garyj@muc.de
Work - garyj@fkr.dec.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806190820.KAA04767>