diff options
author | peter <peter@FreeBSD.org> | 1997-08-19 17:52:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-08-19 17:52:48 +0000 |
commit | 070f42a366d1f592be37f248439635c1d36eaaa3 (patch) | |
tree | 485faad86f4448a6b6ceaf08b9bca8d9250596b3 /usr.sbin/pppd/fsm.h | |
parent | f52b01f46739c1ff6b61ccfe02a7fbd874f14bed (diff) | |
download | FreeBSD-src-070f42a366d1f592be37f248439635c1d36eaaa3.zip FreeBSD-src-070f42a366d1f592be37f248439635c1d36eaaa3.tar.gz |
*gulp* First pass at merging in ppp-2.3.0's pppd. (this has
dial-on-demand, packet filtering, idle timeouts, etc). The IPX support
is pretty much there but more work needs to be done in sys-bsd.c for
the interface ioctls (Linux has a very different way of configuring IPX
interfaces).
Along the way some things have temporarily been lost due to very messy
conflicts. I will recover them shortly when I can think clearer.
The main one is the local:remote address override in pap-secrets and
chap-secrets. Some other home-grown features (dns1,dns2) have been
implemented differently. Microsoft's chap client auth hacks have been
implemented. There are bound to be more rough edges... The changes for
connect-max-retries doesn't fit well with the dial-on-demand code.
Diffstat (limited to 'usr.sbin/pppd/fsm.h')
-rw-r--r-- | usr.sbin/pppd/fsm.h | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/usr.sbin/pppd/fsm.h b/usr.sbin/pppd/fsm.h index dc6be6d..f289429 100644 --- a/usr.sbin/pppd/fsm.h +++ b/usr.sbin/pppd/fsm.h @@ -38,27 +38,8 @@ /* - * Each FSM is described by a fsm_callbacks and a fsm structure. + * Each FSM is described by an fsm structure and fsm callbacks. */ -typedef struct fsm_callbacks { - void (*resetci)(); /* Reset our Configuration Information */ - int (*cilen)(); /* Length of our Configuration Information */ - void (*addci)(); /* Add our Configuration Information */ - int (*ackci)(); /* ACK our Configuration Information */ - int (*nakci)(); /* NAK our Configuration Information */ - int (*rejci)(); /* Reject our Configuration Information */ - int (*reqci)(); /* Request peer's Configuration Information */ - void (*up)(); /* Called when fsm reaches OPENED state */ - void (*down)(); /* Called when fsm leaves OPENED state */ - void (*starting)(); /* Called when we want the lower layer */ - void (*finished)(); /* Called when we don't want the lower layer */ - void (*protreject)(); /* Called when Protocol-Reject received */ - void (*retransmit)(); /* Retransmission is necessary */ - int (*extcode)(); /* Called when unknown code received */ - char *proto_name; /* String name for protocol (for messages) */ -} fsm_callbacks; - - typedef struct fsm { int unit; /* Interface unit number */ int protocol; /* Data Link Layer Protocol field value */ @@ -73,10 +54,45 @@ typedef struct fsm { int maxtermtransmits; /* Maximum Terminate-Request transmissions */ int nakloops; /* Number of nak loops since last ack */ int maxnakloops; /* Maximum number of nak loops tolerated */ - fsm_callbacks *callbacks; /* Callback routines */ + struct fsm_callbacks *callbacks; /* Callback routines */ + char *term_reason; /* Reason for closing protocol */ + int term_reason_len; /* Length of term_reason */ } fsm; +typedef struct fsm_callbacks { + void (*resetci) /* Reset our Configuration Information */ + __P((fsm *)); + int (*cilen) /* Length of our Configuration Information */ + __P((fsm *)); + void (*addci) /* Add our Configuration Information */ + __P((fsm *, u_char *, int *)); + int (*ackci) /* ACK our Configuration Information */ + __P((fsm *, u_char *, int)); + int (*nakci) /* NAK our Configuration Information */ + __P((fsm *, u_char *, int)); + int (*rejci) /* Reject our Configuration Information */ + __P((fsm *, u_char *, int)); + int (*reqci) /* Request peer's Configuration Information */ + __P((fsm *, u_char *, int *, int)); + void (*up) /* Called when fsm reaches OPENED state */ + __P((fsm *)); + void (*down) /* Called when fsm leaves OPENED state */ + __P((fsm *)); + void (*starting) /* Called when we want the lower layer */ + __P((fsm *)); + void (*finished) /* Called when we don't want the lower layer */ + __P((fsm *)); + void (*protreject) /* Called when Protocol-Reject received */ + __P((int)); + void (*retransmit) /* Retransmission is necessary */ + __P((fsm *)); + int (*extcode) /* Called when unknown code received */ + __P((fsm *, int, int, u_char *, int)); + char *proto_name; /* String name for protocol (for messages) */ +} fsm_callbacks; + + /* * Link states. */ @@ -116,7 +132,7 @@ void fsm_init __P((fsm *)); void fsm_lowerup __P((fsm *)); void fsm_lowerdown __P((fsm *)); void fsm_open __P((fsm *)); -void fsm_close __P((fsm *)); +void fsm_close __P((fsm *, char *)); void fsm_input __P((fsm *, u_char *, int)); void fsm_protreject __P((fsm *)); void fsm_sdata __P((fsm *, int, int, u_char *, int)); |