This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/src/session/session_transition.h

42 lines
841 B
C
Raw Normal View History

#ifndef _SESSION_TRANSITION_H
#define _SESSION_TRANSITION_H
#ifdef __cpluscplus
extern "C"
{
#endif
#include "log.h"
#include "session.h"
#define SESSION_TRANSITION_LOG_DEBUG(format, ...) LOG_DEBUG("session transition", format, ##__VA_ARGS__)
enum session_inputs
{
NONE = 0,
// packet
TCP_SYN = 1 << 0,
TCP_SYN_ACK = 1 << 1,
TCP_FIN = 1 << 2, // Only Fist FIN
TCP_RST = 1 << 3,
TCP_DATA = 1 << 4,
UDP_DATA = 1 << 5,
// session timeout
TIMEOUT = 1 << 6,
// session table full evict
LRU_EVICT = 1 << 7,
};
void session_transition_init();
enum session_state session_transition_run(enum session_state curr_state, int inputs);
void session_transition_log(struct session *sess, enum session_state curr_state, enum session_state next_state, int inputs);
#ifdef __cpluscplus
}
#endif
#endif