/* $Id: mcl_fsm.h,v 1.1.1.1 2003/09/03 12:45:43 chneuman Exp $ */ /* * Copyright (c) 1999-2003 INRIA - Universite Paris 6 - All rights reserved * (main author: Vincent Roca - vincent.roca@inrialpes.fr) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef MCL_FSM_H /* { */ #define MCL_FSM_H /* * SENDER's FSM (Finite State Machine) */ typedef enum { TSTATE_NIL = 0, TSTATE_READY, TSTATE_IN_TX, TSTATE_FINISH_TX, TSTATE_END, TSTATE_CLOSED, TSTATE_INVALID } tx_states_t; typedef enum { TEVENT_NIL = 0, TEVENT_OPEN_CALLED, /* application has called mcl_open */ TEVENT_NEW_ADU, /* tx: mcl_send called, rx: NEW ADU received */ TEVENT_ALL_DU_SENT, /* all the DUs have been sent */ TEVENT_CLOSE_CALLED, /* application has called mcl_close */ TEVENT_CLOSE_SENT, /* CLOSE sent to peer */ TEVENT_CLOSE_RETURN, /* mcl_close just returned */ TEVENT_ABORT, /* mcl_abort called */ TEVENT_RESET /* mcl_abort called */ } tx_events_t; /* * RECEIVER's FSM (Finite State Machine) */ typedef enum { RSTATE_NIL = 0, RSTATE_READY, RSTATE_IN_RX, RSTATE_FINISH_RX, RSTATE_END, RSTATE_CLOSE_RX, /* CLOSE has been received */ RSTATE_CLOSED, RSTATE_INVALID } rx_states_t; typedef enum { REVENT_NIL = 0, REVENT_OPEN_CALLED, /* application has called mcl_open */ REVENT_NEW_ADU, /* NEW_ADU received */ REVENT_NO_NEW_ADU, /* NO_NEW_ADU received */ REVENT_DU_RECV, /* DU received */ REVENT_ALL_DU_RECV, /* all the DUs have been received */ REVENT_CLOSE_CALLED, /* application has called mcl_close */ REVENT_CLOSE_RECV, /* CLOSE sent to peer */ REVENT_CLOSE_RETURN /* mcl_close just returned */ } rx_events_t; #endif /* } MCL_FSM_H */