samedi 9 juillet 2022

Designing a C application

The problem that I am facing now is how to design & structure my project. Here is brief explanation of the roles of my application.

  • It executes a child process and controls them using ptrace. Thus I would be doing things like peeking, poking of the child process's address space.
  • I would also be sharing the information of the child over to other process through socket communication.
  • Moreover, if you are aware of uffd (userspace page fault handling), I would also be handling page faults from the child process.
  • Along with that, I shall also be maintaining buffers which I would be filling from child or be receiving from the remote side

No matter, how hard I think, I could not come up with a clean structured way. Hence any help on how to layout things in a modular or structured way will seriously help as I am pretty sure, the code size will eventually get bigger and messier.

Should I have a global data structure in every file controlling each of its functionality or should I wrap all of them into one global data structure.

Aucun commentaire:

Enregistrer un commentaire