diff options
author | brian <brian@FreeBSD.org> | 1999-08-06 20:04:08 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-08-06 20:04:08 +0000 |
commit | 8229df47c3e2374322058e43333045e6fe030427 (patch) | |
tree | 0dcd97a0d9e4b6f52cd1f2aa158c28fca4e9e808 /usr.sbin/ppp/physical.h | |
parent | 82b15b21003b7e5df8e9a7bae9330508378a0ee8 (diff) | |
download | FreeBSD-src-8229df47c3e2374322058e43333045e6fe030427.zip FreeBSD-src-8229df47c3e2374322058e43333045e6fe030427.tar.gz |
Add ISDN support via isdnd & i4b. This requires version
0.81.1 of the i4b code - namely support of the I4B_VR_REQ
ioctl via the i4brbchX device.
Ppp controls the phone number, but idle timers and
SYNC/RAW decisions are still made by isdnd (in isdnd.rc).
This involves a new datalink state machine phase. The
``wait for carrier'' phase happens after dialing but
before logging in. The whole dial state should really
be abstracted so that each device type can deal with it
in its own way (thinking about PPPoE) - but that'll have
to wait.
The ``set cd'' symantics remain the same for tty devices,
but we now delay until we either get CD or timeout waiting
(at which time we drop the link if we require CD).
For i4b devices we always insist on carrier.
Thanks to hm@ for his help, and especially for pointing out
that I *don't* need to re-implement isdnd (that was a huge
waste of time !) :-]
Diffstat (limited to 'usr.sbin/ppp/physical.h')
-rw-r--r-- | usr.sbin/ppp/physical.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h index 18212b3..6f4bbe6 100644 --- a/usr.sbin/ppp/physical.h +++ b/usr.sbin/ppp/physical.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.h,v 1.12 1999/06/01 19:08:59 brian Exp $ + * $Id: physical.h,v 1.13 1999/06/05 21:35:52 brian Exp $ * */ @@ -28,15 +28,23 @@ struct bundle; struct ccp; struct cmdargs; -#define TTY_DEVICE 1 -#define TCP_DEVICE 2 -#define UDP_DEVICE 3 -#define EXEC_DEVICE 4 +/* Device types */ +#define I4B_DEVICE 1 +#define TTY_DEVICE 2 +#define TCP_DEVICE 3 +#define UDP_DEVICE 4 +#define EXEC_DEVICE 5 + +/* Returns from awaitcarrier() */ +#define CARRIER_PENDING 1 +#define CARRIER_OK 2 +#define CARRIER_LOST 3 struct device { int type; const char *name; + int (*awaitcarrier)(struct physical *); int (*raw)(struct physical *); void (*offline)(struct physical *); void (*cooked)(struct physical *); @@ -137,3 +145,4 @@ extern void physical_DeleteQueue(struct physical *); extern void physical_SetupStack(struct physical *, const char *, int); extern void physical_StopDeviceTimer(struct physical *); extern int physical_MaxDeviceSize(void); +extern int physical_AwaitCarrier(struct physical *); |