112 lines
3.5 KiB
C
112 lines
3.5 KiB
C
/*
|
|
******************************************************************************
|
|
* INTERPEAK API HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ip8021x_state_machine.h,v $ $Revision: 1.3 $
|
|
* $Source: /home/interpeak/CVSRoot/ip8021x/src/ip8021x_state_machine.h,v $
|
|
* $Author: myakan $ $Date: 2008-03-03 23:06:16 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Roger Boden <roger@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IP8021X_STATE_MACHINE_H
|
|
#define IP8021X_STATE_MACHINE_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ip8021x_config.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <ipcom_type.h>
|
|
#include <ipcom_cstyle.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/* Forward declarations */
|
|
struct Ip8021x_ctx_st;
|
|
|
|
struct Ip8021x_state_machine_st
|
|
{
|
|
int state; /* Supplicant state */
|
|
|
|
/* Timers */
|
|
int auth_while;
|
|
int held_while;
|
|
int start_while;
|
|
|
|
/* Initial values of timers */
|
|
int auth_period;
|
|
int held_period;
|
|
int start_period;
|
|
|
|
int max_start;
|
|
int start_count;
|
|
|
|
Ip_bool user_logoff;
|
|
Ip_bool logoff_sent;
|
|
};
|
|
typedef struct Ip8021x_state_machine_st Ip8021x_state_machine;
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
IP_GLOBAL void ip8021x_state_enter_logoff(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_disconnected(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_acquired(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_authenticating(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_held(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_connecting(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL void ip8021x_state_enter_authenticated(struct Ip8021x_ctx_st* ctx);
|
|
IP_GLOBAL int ip8021x_state_machine_tick(struct Ip8021x_ctx_st* ctx, int seconds);
|
|
IP_GLOBAL Ip_s32 ip8021x_tmo_cb(struct Ipcom_tmo_struct *tmo, void *cookie);
|
|
IP_GLOBAL const char* ip8021x_sm_state_str(int state);
|
|
IP_GLOBAL const char* ip8021x_port_status_str(int port_status);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|