This project is an attempt to simulate the dnp3 protocol often used for communication in SCADA systems. This project is still in its early stages, only part of the spec is implemented.
There are no plans to impelemtent the entire spec however, as this protol is far to large. Only specifc, commonly used parts will be implemented, such that a common packet can be parsed succesfuly.
- Pure Swing UI implementiation of;
- Packet Parser
- Master Client
- Child Client
- Fast, Memory Efficient Proccesing
- Most of spec (much will have to be skipped however)
dnp3/
│
├──── .vscode/ // settings and configurations for vscode
│
├───┬ backend/ // all parser logic (C)
│ │
│ ├──── build/ // build files, binaries, etc.
│ │
│ ├──── inc/ // header files
│ │
│ └───┬ src/ // source files
│ │
│ ├──── dnp3/ // struct implementations
│ │
│ ├──── helper/ // helper functions
│ │
│ └──── main.c // backend start
│
├───┬ frontend/ // all ui (Java Swing)
│ │
│ ├──── build/
│ │
│ └───┐ src/
│ │
│ ├──── ui/ // window create
│ │
│ ├──── helper/ // helper functions
│ │
│ └──── Main.java // frontend start
│
└──── log/ // logs from backend
- Parser UI (not hooked up to backend)
- Parsing of dnp3:
- Header
- DLC
- Transport Header
- Application Header
- First Object Header
The easiest method to run either the frontend or backend is to open the repo in VsCode and use the built in tasks. Manual Methods are also avalible.
Currently, backend and frontend are not linked. Plans are to use Network Sockets to avoid using JNI or JNA
- Clone the repository
- Install both a C compiler, JDK, and CMake
- I used Clang and Java 25
Contains Parser Logic.
- Hit
Ctrl + Shift + Pand typeTasks: Run Task - Select
CMake BuildorCMake Run Binary, depending on your goal - Select
Clean BackendorClean Allto remove build dir
Backend is compiled with CMake to make your life a little easier
- Compile:
cmake -S backend -B backend/build cmake --build backend/build --config Debug
- Run the built binary:
./backend/build/bin/dnp3
Contains UI with Some simulated Data (for now...)
- Hit
Ctrl + Shift + Pand typeTasks: Run Task - Select
Java CompileorRun Java Frontend, depending on your goal - Select
Clean FrontendorClean Allto remove build dir
Frontend Compiled with javac
- Compile:
javac -d bin frontend/src/**/*.java
- Run the bult binary:
java -cp frontend/bin Main