uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fsm.h File Reference

Go to the source code of this file.

Classes

struct  fsm
 
struct  fsm_callbacks
 

Macros

#define HEADERLEN   (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
 
#define CONFREQ   1 /* Configuration Request */
 
#define CONFACK   2 /* Configuration Ack */
 
#define CONFNAK   3 /* Configuration Nak */
 
#define CONFREJ   4 /* Configuration Reject */
 
#define TERMREQ   5 /* Termination Request */
 
#define TERMACK   6 /* Termination Ack */
 
#define CODEREJ   7 /* Code Reject */
 
#define LS_INITIAL   0 /* Down, hasn't been opened */
 
#define LS_STARTING   1 /* Down, been opened */
 
#define LS_CLOSED   2 /* Up, hasn't been opened */
 
#define LS_STOPPED   3 /* Open, waiting for down event */
 
#define LS_CLOSING   4 /* Terminating the connection, not open */
 
#define LS_STOPPING   5 /* Terminating, but open */
 
#define LS_REQSENT   6 /* We've sent a Config Request */
 
#define LS_ACKRCVD   7 /* We've received a Config Ack */
 
#define LS_ACKSENT   8 /* We've sent a Config Ack */
 
#define LS_OPENED   9 /* Connection available */
 
#define OPT_PASSIVE   1 /* Don't die if we don't get a response */
 
#define OPT_RESTART   2 /* Treat 2nd OPEN as DOWN, UP */
 
#define OPT_SILENT   4 /* Wait for peer to speak first */
 

Typedefs

typedef struct fsm fsm
 
typedef struct fsm_callbacks fsm_callbacks
 

Functions

void fsm_init (fsm *)
 
void fsm_lowerup (fsm *)
 
void fsm_lowerdown (fsm *)
 
void fsm_open (fsm *)
 
void fsm_close (fsm *, char *)
 
void fsm_input (fsm *, u_char *, int)
 
void fsm_protreject (fsm *)
 
void fsm_sdata (fsm *, u_char, u_char, u_char *, int)
 

Variables

int peer_mru []
 

Macro Definition Documentation

#define CODEREJ   7 /* Code Reject */

Definition at line 72 of file fsm.h.

#define CONFACK   2 /* Configuration Ack */

Definition at line 67 of file fsm.h.

#define CONFNAK   3 /* Configuration Nak */

Definition at line 68 of file fsm.h.

#define CONFREJ   4 /* Configuration Reject */

Definition at line 69 of file fsm.h.

#define CONFREQ   1 /* Configuration Request */

Definition at line 66 of file fsm.h.

#define HEADERLEN   (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))

Definition at line 60 of file fsm.h.

#define LS_ACKRCVD   7 /* We've received a Config Ack */

Definition at line 127 of file fsm.h.

#define LS_ACKSENT   8 /* We've sent a Config Ack */

Definition at line 128 of file fsm.h.

#define LS_CLOSED   2 /* Up, hasn't been opened */

Definition at line 122 of file fsm.h.

#define LS_CLOSING   4 /* Terminating the connection, not open */

Definition at line 124 of file fsm.h.

#define LS_INITIAL   0 /* Down, hasn't been opened */

Definition at line 120 of file fsm.h.

#define LS_OPENED   9 /* Connection available */

Definition at line 129 of file fsm.h.

#define LS_REQSENT   6 /* We've sent a Config Request */

Definition at line 126 of file fsm.h.

#define LS_STARTING   1 /* Down, been opened */

Definition at line 121 of file fsm.h.

#define LS_STOPPED   3 /* Open, waiting for down event */

Definition at line 123 of file fsm.h.

#define LS_STOPPING   5 /* Terminating, but open */

Definition at line 125 of file fsm.h.

#define OPT_PASSIVE   1 /* Don't die if we don't get a response */

Definition at line 134 of file fsm.h.

#define OPT_RESTART   2 /* Treat 2nd OPEN as DOWN, UP */

Definition at line 135 of file fsm.h.

#define OPT_SILENT   4 /* Wait for peer to speak first */

Definition at line 136 of file fsm.h.

#define TERMACK   6 /* Termination Ack */

Definition at line 71 of file fsm.h.

#define TERMREQ   5 /* Termination Request */

Definition at line 70 of file fsm.h.

Typedef Documentation

typedef struct fsm fsm
typedef struct fsm_callbacks fsm_callbacks

Function Documentation

void fsm_close ( fsm ,
char *   
)
void fsm_init ( fsm )
void fsm_input ( fsm ,
u_char *  ,
int   
)
void fsm_lowerdown ( fsm )
void fsm_lowerup ( fsm )
void fsm_open ( fsm )
void fsm_protreject ( fsm )
void fsm_sdata ( fsm ,
u_char  ,
u_char  ,
u_char *  ,
int   
)

Variable Documentation

int peer_mru[]