summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/fsm.h
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-02-27 01:22:39 +0000
committerBrian Somers <brian@FreeBSD.org>1998-02-27 01:22:39 +0000
commit6d6667755ecffdeb3518255e2b482ebe03333c35 (patch)
treeb02f94839215262e8e4c7171a2b2e2570b722da9 /usr.sbin/ppp/fsm.h
parent486f40c95cc4846754e9ee2c0af465729eeb95fb (diff)
downloadsrc-test2-6d6667755ecffdeb3518255e2b482ebe03333c35.tar.gz
src-test2-6d6667755ecffdeb3518255e2b482ebe03333c35.zip
Create struct fsm_parent. FSMs are created with one of these,
and the FSM passes subsequent events to them. The datalink now hides its CCP from the bundle layer.
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=33858
Diffstat (limited to 'usr.sbin/ppp/fsm.h')
-rw-r--r--usr.sbin/ppp/fsm.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/usr.sbin/ppp/fsm.h b/usr.sbin/ppp/fsm.h
index ab27d474239b..2526c994935a 100644
--- a/usr.sbin/ppp/fsm.h
+++ b/usr.sbin/ppp/fsm.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: fsm.h,v 1.16.2.7 1998/02/21 01:45:08 brian Exp $
+ * $Id: fsm.h,v 1.16.2.8 1998/02/24 03:36:47 brian Exp $
*
* TODO:
*/
@@ -47,15 +47,11 @@
struct fsm;
-struct fsm_events {
+struct fsm_callbacks {
void (*LayerUp) (struct fsm *); /* Layer is now up (tlu) */
void (*LayerDown) (struct fsm *); /* About to come down (tld) */
void (*LayerStart) (struct fsm *); /* Layer about to start up (tls) */
void (*LayerFinish) (struct fsm *); /* Layer now down (tlf) */
-};
-
-struct fsm_callbacks {
- struct fsm_events notify;
void (*InitRestartCounter) (struct fsm *); /* Set fsm timer load */
void (*SendConfigReq) (struct fsm *); /* Send REQ please */
void (*SendTerminateReq) (struct fsm *); /* Term REQ just sent */
@@ -66,6 +62,14 @@ struct fsm_callbacks {
void (*RecvResetAck) (struct fsm *fp, u_char); /* Reset input */
};
+struct fsm_parent {
+ void (*LayerStart) (void *, struct fsm *); /* tls */
+ void (*LayerUp) (void *, struct fsm *); /* tlu */
+ void (*LayerDown) (void *, struct fsm *); /* tld */
+ void (*LayerFinish) (void *, struct fsm *); /* tlf */
+ void *object;
+};
+
struct fsm {
const char *name; /* Name of protocol */
u_short proto; /* Protocol number */
@@ -97,6 +101,7 @@ struct fsm {
/* Our high-level link */
struct bundle *bundle;
+ const struct fsm_parent *parent;
const struct fsm_callbacks *fn;
};
@@ -139,7 +144,8 @@ extern u_char *rejp;
extern char const *StateNames[];
extern void fsm_Init(struct fsm *, const char *, u_short, int, int, int,
- struct bundle *, struct link *, struct fsm_callbacks *);
+ struct bundle *, struct link *, const struct fsm_parent *,
+ struct fsm_callbacks *);
extern void FsmOutput(struct fsm *, u_int, u_int, u_char *, int);
extern void FsmOpen(struct fsm *);
extern void FsmUp(struct fsm *);