Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

state.c File Reference

#include "common.h"
#include <string.h>
#include <netinet/in.h>
#include <openssl/rand.h>
#include "state.h"
#include "message.h"
#include "session.h"
#include "payload.h"
#include "dh.h"
#include "prf.h"
#include "encr.h"
#include "integ.h"
#include "auth.h"
#include "enums.h"

Defines

#define SEND_SA_INIT   0
#define WAIT_SA_INIT_RESP   101
#define SEND_AUTH_REQ   103
#define WAIT_AUTH_RESP   104
#define SEND_CLIENT_AUTH_FAIL   106
#define WAIT_SEND_CLIENT_AUTH_FAIL_RES   107
#define GOT_INVALID_KE   108
#define GOT_FAILED   109
#define SEND_ERROR_NOTIFY   110
#define SEND_CHILDSA_INIT   111
#define WAIT_CHILDSA_INIT_RESP   112
#define WAIT_CHILDSA_INIT   113
#define SEND_CHILDSA_INIT_RESP   114
#define GOT_INVALID_REKEYING_KE   115
#define WAIT_SA_INIT   0
#define SEND_INVALID_KE   203
#define SEND_SA_INIT_RESP   200
#define WAIT_AUTH   204
#define SEND_AUTH   205
#define PRINT_STATE(STATENAME)
#define IKE_RES_CHOSEN_DH_GROUP   res->ChosenDHGroup
#define IKE_RES_CHOSEN_REKEYING_DH_GROUP   res->ChosenDHGroup

Functions

void print_I_state (int state)
 Print descripitve name of current initiator state.
void print_R_state (int state)
 Print descripitve name of current responder state.
void DoRState (const struct ikev2_ctx *i2, uint8_t *in, uint8_t **out, uint32_t *olen, struct IKEv2Session *s)
 The responder state machine.
void DoIState (const struct ikev2_ctx *i2, uint8_t *in, uint8_t **out, uint32_t *olen, struct IKEv2Session *s)
 The initiator state machine.

Define Documentation

#define GOT_FAILED   109
 

#define GOT_INVALID_KE   108
 

#define GOT_INVALID_REKEYING_KE   115
 

#define IKE_RES_CHOSEN_DH_GROUP   res->ChosenDHGroup
 

#define IKE_RES_CHOSEN_REKEYING_DH_GROUP   res->ChosenDHGroup
 

#define PRINT_STATE STATENAME   ) 
 

Value:

case STATENAME:  \
    xlogf(I2L_DBG, "EAP-IKEv2: ----------- %s state: %s\n",role,#STATENAME); \
    break;

#define SEND_AUTH   205
 

#define SEND_AUTH_REQ   103
 

#define SEND_CHILDSA_INIT   111
 

#define SEND_CHILDSA_INIT_RESP   114
 

#define SEND_CLIENT_AUTH_FAIL   106
 

#define SEND_ERROR_NOTIFY   110
 

#define SEND_INVALID_KE   203
 

#define SEND_SA_INIT   0
 

#define SEND_SA_INIT_RESP   200
 

#define WAIT_AUTH   204
 

#define WAIT_AUTH_RESP   104
 

#define WAIT_CHILDSA_INIT   113
 

#define WAIT_CHILDSA_INIT_RESP   112
 

#define WAIT_SA_INIT   0
 

#define WAIT_SA_INIT_RESP   101
 

#define WAIT_SEND_CLIENT_AUTH_FAIL_RES   107
 


Function Documentation

void DoIState const struct ikev2_ctx i2,
uint8_t *  in,
uint8_t **  out,
uint32_t *  olen,
struct IKEv2Session s
 

The initiator state machine.

Parameters:
*i2 IKEv2 context data
*in received packet
**out generated packet to send
*olen out length
*s current IKEv2 session

void DoRState const struct ikev2_ctx i2,
uint8_t *  in,
uint8_t **  out,
uint32_t *  olen,
struct IKEv2Session s
 

The responder state machine.

Parameters:
*i2 IKEv2 context data
*in received packet
**out generated packet to send
*olen out length
*s current IKEv2 session

void print_I_state int  state  ) 
 

Print descripitve name of current initiator state.

Parameters:
state current state

void print_R_state int  state  ) 
 

Print descripitve name of current responder state.

Parameters:
state current state


Project hosted by: SourceForge.net Logo