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/infra/session_manager/session_transition.h

42 lines
769 B
C
Raw Normal View History

#pragma once
2024-04-21 11:30:41 +08:00
#ifdef __cplusplus
extern "C"
{
#endif
#include "stellar/session.h"
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,
2024-03-15 15:36:26 +08:00
// port reuse evict
PORT_REUSE_EVICT = 1 << 8,
2024-03-15 15:36:26 +08:00
// user close
USER_CLOSE = 1 << 9,
};
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);
2024-04-21 11:30:41 +08:00
#ifdef __cplusplus
}
#endif