summaryrefslogtreecommitdiffstats
path: root/sys/net/if_slvar.h
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-03-30 20:43:32 +0000
committerache <ache@FreeBSD.org>1995-03-30 20:43:32 +0000
commit7948beb4ea63bd1694e90447a7c0e40e93d6ce28 (patch)
tree8b7a337e4edd9c47e801b5ac7b5c6068917bd218 /sys/net/if_slvar.h
parent183b7355f6228af73ec9662cf32f4d12c7693793 (diff)
downloadFreeBSD-src-7948beb4ea63bd1694e90447a7c0e40e93d6ce28.zip
FreeBSD-src-7948beb4ea63bd1694e90447a7c0e40e93d6ce28.tar.gz
This sl enhancement helps to keep serial line (modem) connection alive.
It is common case when modem hangs with carier on but don't receive anything from another side. This thing commonly healed with hangup and redialing. Enhancements below allows to determine when such action is needed and inform attach program with SIGURG signal. There two ioctls set: outfill and keepalive, used from both sides of connection. Outfill repeatedly sends FRAME_END with specified timeout (i.e. 40 seconds). It is needed to get input on other side even if no user activity on slip line currently. Keepalive checks FRAME_ENDs from other side, and if no one got in specified timeout (i.e. 60 seconds, max modem retrain time), send SIGURG to attach program. I plan to add code to slattach to handle this thing too. Reviewed by: wollman
Diffstat (limited to 'sys/net/if_slvar.h')
-rw-r--r--sys/net/if_slvar.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_slvar.h b/sys/net/if_slvar.h
index f94ec40..2fb3f9f 100644
--- a/sys/net/if_slvar.h
+++ b/sys/net/if_slvar.h
@@ -32,7 +32,7 @@
*
* @(#)if_slvar.h 8.3 (Berkeley) 2/1/94
*
- * $Id: if_slvar.h,v 1.3 1994/08/21 05:11:43 paul Exp $
+ * $Id: if_slvar.h,v 1.4 1994/10/08 01:40:23 phk Exp $
*/
#ifndef _NET_IF_SLVAR_H_
@@ -56,6 +56,8 @@ struct sl_softc {
long sc_lasttime; /* last time a char arrived */
long sc_abortcount; /* number of abort esacpe chars */
long sc_starttime; /* time of first abort in window */
+ u_int sc_keepalive; /* time to decide link hang */
+ u_int sc_outfill; /* time to send FRAME_END when output idle */
#ifdef INET /* XXX */
struct slcompress sc_comp; /* tcp compression data */
#endif
@@ -64,6 +66,8 @@ struct sl_softc {
/* internal flags */
#define SC_ERROR 0x0001 /* had an input error */
+#define SC_OUTWAIT 0x0002 /* waiting for output fill */
+#define SC_KEEPALIVE 0x0004 /* input keepalive */
/* visible flags */
#define SC_COMPRESS IFF_LINK0 /* compress TCP traffic */
OpenPOWER on IntegriCloud