Deleted Added
full compact
fsm.h (28679) fsm.h (30715)
1/*
2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3 *
4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5 *
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan. The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
1/*
2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3 *
4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5 *
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan. The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * $Id: fsm.h,v 1.9 1997/08/20 23:47:43 brian Exp $
18 * $Id: fsm.h,v 1.10 1997/08/25 00:29:12 brian Exp $
19 *
20 * TODO:
21 */
22
19 *
20 * TODO:
21 */
22
23#ifndef _FSM_H_
24#define _FSM_H_
25
26#include "defs.h"
27#include <netinet/in.h>
28#include "timeout.h"
29
30/*
31 * State of machine
32 */
33#define ST_INITIAL 0
34#define ST_STARTING 1
35#define ST_CLOSED 2
36#define ST_STOPPED 3
37#define ST_CLOSING 4

--- 77 unchanged lines hidden (view full) ---

115 char *name;
116};
117
118struct fsmconfig {
119 u_char type;
120 u_char length;
121};
122
23/*
24 * State of machine
25 */
26#define ST_INITIAL 0
27#define ST_STARTING 1
28#define ST_CLOSED 2
29#define ST_STOPPED 3
30#define ST_CLOSING 4

--- 77 unchanged lines hidden (view full) ---

108 char *name;
109};
110
111struct fsmconfig {
112 u_char type;
113 u_char length;
114};
115
123u_char AckBuff[200];
124u_char NakBuff[200];
125u_char RejBuff[100];
126u_char ReqBuff[200];
116extern u_char AckBuff[200];
117extern u_char NakBuff[200];
118extern u_char RejBuff[100];
119extern u_char ReqBuff[200];
120extern u_char *ackp;
121extern u_char *nakp;
122extern u_char *rejp;
127
123
128u_char *ackp, *nakp, *rejp;
129
130extern char const *StateNames[];
124extern char const *StateNames[];
125
131extern void FsmInit(struct fsm *);
126extern void FsmInit(struct fsm *);
132extern void NewState(struct fsm *, int);
133extern void FsmOutput(struct fsm *, u_int, u_int, u_char *, int);
134extern void FsmOpen(struct fsm *);
135extern void FsmUp(struct fsm *);
136extern void FsmDown(struct fsm *);
137extern void FsmInput(struct fsm *, struct mbuf *);
127extern void FsmOutput(struct fsm *, u_int, u_int, u_char *, int);
128extern void FsmOpen(struct fsm *);
129extern void FsmUp(struct fsm *);
130extern void FsmDown(struct fsm *);
131extern void FsmInput(struct fsm *, struct mbuf *);
138
139extern void FsmRecvConfigReq(struct fsm *, struct fsmheader *, struct mbuf *);
140extern void FsmRecvConfigAck(struct fsm *, struct fsmheader *, struct mbuf *);
141extern void FsmRecvConfigNak(struct fsm *, struct fsmheader *, struct mbuf *);
142extern void FsmRecvTermReq(struct fsm *, struct fsmheader *, struct mbuf *);
143extern void FsmRecvTermAck(struct fsm *, struct fsmheader *, struct mbuf *);
144extern void FsmClose(struct fsm * fp);
145
146extern struct fsm LcpFsm, IpcpFsm, CcpFsm;
147
148#endif /* _FSM_H_ */
132extern void FsmClose(struct fsm *);