Skip to content

A C-based protocol for efficient array serialization and deserialization, featuring custom packet structures, integrity checks, and robust error handling. Developed comprehensive unit and integration tests using GoogleTest, and implemented memory safety checks with Valgrind πŸ‘Ύ

Notifications You must be signed in to change notification settings

hasanpeal/The-ArrayNet-Protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The ArrayNet Protocol

A C implementation of a custom packet protocol for array serialization, deserialization, and integrity checking. This project demonstrates low-level data manipulation, bitwise operations, and robust testing practices.

Features

  • Packet Serialization: Convert integer arrays into network packets with custom headers and payloads.
  • Packet Deserialization: Reconstruct arrays from received packets, handling fragmentation and corruption.
  • Checksum Calculation: Ensure data integrity with a custom checksum algorithm.
  • Packet Inspection: Print detailed packet contents for debugging and analysis.

Project Structure

.
β”œβ”€β”€ include/           # Public header(s)
β”‚   └── hw1.h
β”œβ”€β”€ src/               # Core implementation
β”‚   β”œβ”€β”€ hw1.c
β”‚   └── hw1_main.c
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ include/       # Test argument headers
β”‚   β”œβ”€β”€ src/           # Test drivers and GoogleTest suites
β”‚   └── expected_outputs/ # Reference outputs for validation
β”œβ”€β”€ CMakeLists.txt     # Build configuration

Building

This project uses CMake:

cmake -S . -B build
cmake --build build
  • The main executable: hw1_main
  • All tests: run_all_tests
  • Standalone Valgrind test drivers for memory checking

Testing

Unit and integration tests are written using GoogleTest. Run all tests with:

./build/run_all_tests

Valgrind test drivers are also available for memory analysis.

Example Usage

The main program (hw1_main.c) demonstrates how to print a packet’s contents.

About

A C-based protocol for efficient array serialization and deserialization, featuring custom packet structures, integrity checks, and robust error handling. Developed comprehensive unit and integration tests using GoogleTest, and implemented memory safety checks with Valgrind πŸ‘Ύ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published