Giter VIP home page Giter VIP logo

Comments (1)

NicoMaio avatar NicoMaio commented on June 16, 2024

Proposal:
Create an enum in the Flow class like the following:
Enum ConnectionState { NO_STATE, S0, S1, … }

In the Flow::updateTcpFlags method, a method named 'select_connection_state' will be called with parameters for the variables (src2dst_tcp_flags, dst2src_tcp_flags). The 'select_connection_state' method will select one of the states mentioned before by checking the current TCP flags in the src2dst_tcp_flags and dst2src_tcp_flags with the following logic:

S0: Only SYN in src2dst_tcp_flags; no flags in dst2src_tcp_flags
S1: 3whs ok and no FIN in src2dst_tcp_flags and no RST src2dst_tcp_flags
SF: 3whs and FIN src2dst_tcp_flags and FIN src2dst_tcp_flags
REJ: SYN in src2dst_tcp_flags and RST in dst2src_tcp_flags
S2: Was S1 and FIN in src2dst_tcp_flags and no FIN in dst2src_tcp_flags
S3: Was S1 and FIN in dst2src_tcp_flags and no FIN in src2dst_tcp_flags
RSTO: Was S1 and RST in src2dst_tcp_flags
RTSR: RST in dst2src_tcp_flags
RSTOS0: SYN and RST in src2dst_tcp_flags; no SYN+ACK in dst2src_tcp_flags
RSTRH: SYN+ACK and RST in dst2src_tcp_flags; no SYN in src2dst_tcp_flags
SH: SYN and FIN in src2dst_tcp_flags; no SYN+ACK in dst2src_tcp_flags
SHR: SYN+ACK and FIN in dst2src_tcp_flags; no SYN in src2dst_tcp_flags
OTH: NO SYN in src2dst_tcp_flags and NO SYN in dst2src_tcp_flags

After the selection of the connection state, the 'select_connection_state' method will update the new variable of the Flow class ConnectionState currentConnectionState.

from ntopng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.