Coder Social home page Coder Social logo

Comments (11)

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024 2

@utoni, @0xA50C1A1

In think that we have a few options:

1. change nothing and keep doing as before

2. keep creating a new dissector for each protocol but use a generic helper `is_cotp()` to avoid code duplication

3. create a new cotp dissector, and add all the sub-classification logic there

4. sub-protocols logic (not sure if it works, since the sub-protocols callbacks are called only once, i.e. only for one packet)

I don't have strong opinions and I am fine with all these options. If I did the work, I would probably do 3) and switch to 4) in the future if necessary, but, as I said, I am fine in any case

Hmm, option 2 seems the most optimal to me.

from ndpi.

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024 1

One question: Do we want to keep the subprotocol feature as it is or remove it?

Yeah, that's definitely worth keeping. There are many protocols working on top of HTTP (IPP for example), so I think the subprotocols feature is great for such cases.

from ndpi.

IvanNardi avatar IvanNardi commented on August 23, 2024 1

One question: Do we want to keep the subprotocol feature as it is or remove it?

Yeah, that's definitely worth keeping. There are many protocols working on top of HTTP (IPP for example), so I think the subprotocols feature is great for such cases.

+1

from ndpi.

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024

@IvanNardi @utoni What do you think about it?

from ndpi.

utoni avatar utoni commented on August 23, 2024

If I understood that correctly, you want to call a certain dissector after another protocol dissector at a lower layer successfully classified the flow, right?

That was the initial idea of the "subprotocol" thingy, that I've added a few months (or years? O.o) ago.

from ndpi.

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024

If I understood that correctly, you want to call a certain dissector after another protocol dissector at a lower layer successfully classified the flow, right?

Yea.

from ndpi.

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024

I dunno if it would be correct to call encapsulated stuff a sub-protocols (for me it's kind of like HTTP Live Streaming) in that case, since COTP is a transport protocol, even though in today's world it runs on top of the another transport protocol - TCP. 😄

from ndpi.

IvanNardi avatar IvanNardi commented on August 23, 2024

Just to understand the scope of this issue...
If I checked the code correctly, right now we have COTP stuff only for 3 protocols in 2 different dissectors:

  • COTP/S7COMM
  • COTP/S7COMM_PLUS
  • COTP/RDP

In all these cases the identification of the COTP "sub-protocol" is very trivial, basically checking only a few bytes

How many others cases do you think we will have?

from ndpi.

0xA50C1A1 avatar 0xA50C1A1 commented on August 23, 2024

How many others cases do you think we will have?

Atm I'm working on IEC 61850 MMS protocol dissector, which like some other ICS protocols runs on top of the ISO stack. There's also an IEC 60870-6 TASE.2, but this is more of a special case of MMS.

Well, I'm sure there'll be something else.

from ndpi.

IvanNardi avatar IvanNardi commented on August 23, 2024

@utoni, @0xA50C1A1

In think that we have a few options:

  1. change nothing and keep doing as before
  2. keep creating a new dissector for each protocol but use a generic helper is_cotp() to avoid code duplication
  3. create a new cotp dissector, and add all the sub-classification logic there
  4. sub-protocols logic (not sure if it works, since the sub-protocols callbacks are called only once, i.e. only for one packet)

I don't have strong opinions and I am fine with all these options.
If I did the work, I would probably do 3) and switch to 4) in the future if necessary, but, as I said, I am fine in any case

from ndpi.

utoni avatar utoni commented on August 23, 2024

I am also fine with option 2.
One question: Do we want to keep the subprotocol feature as it is or remove it?

from ndpi.

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.