0

Now, I am working with some open-source software in C language: Suricata, Open5g. I know these software are used for different purposes, but I realized that they have same architecture: features are written as modules, then modules are registered with the software. Example, in Suricata, when I want to implement a new protocol, I will need to write some function to parse the packet, then register that function with the main program. Then, when Suricata wants to use this function, there will be a function that manages the spawning of previously registered modules (like this document). Everything is similar with Open5gs or some other C open-source software. It's like a design pattern in C.

I want to learn about this architecture to better understand how it works in open-source C language but don't know its exact name to start with

My question: Is there a term for that software architecture (or implementation)?

dbc
  • 104,963
  • 20
  • 228
  • 340
Hai Pham
  • 11
  • 1
  • 2
  • Maybe the term you're looking for is the "[plug-in](https://en.wikipedia.org/wiki/Plug-in_(computing)) (or plugin) pattern"? – dbc May 29 '23 at 15:35
  • See e.g. [The plugin design pattern explained (as described by Martin Fowler)](https://stackoverflow.com/q/51217271), [Plug-in Architecture](https://medium.com/omarelgabrys-blog/plug-in-architecture-dec207291800), [Good patterns for a C/C++ plugin-based system?](https://stackoverflow.com/q/785480), [Creating a module system (dynamic loading) in C](https://stackoverflow.com/q/384121), [Simple Plug-in Architecture in Plain C](https://www.codeproject.com/Articles/389667/Simple-Plug-in-Architecture-in-Plain-C). – dbc May 29 '23 at 15:38
  • @dbc Thank you, I think that is right thing I need. – Hai Pham May 29 '23 at 17:31

0 Answers0