Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.
/ ChapNat Public archive

Distributed platform for behind NAT message passing

License

Notifications You must be signed in to change notification settings

Panamo/ChapNat

Repository files navigation

ChapNat

Chapal behind NAT Message Passing System

Panamo Organization

Introduction

This project written completely by pure C and BSD sockets under Ubuntu and GCC (please note that we use some other library). In this project we use kernel-coding style from Linus Torvalds and using some script from kernel to validate our code against that. This project also worked on Darwin 14.1.0.

For more information of implementation see doc/protocol files.

Chapat
  |
  |
  |-> connection : create and store TCP communication links
  |
  |
  |-> db : control users and group authentication
  |
  |
  |-> resolver : find best route between chapat servers

KamyLib

This is simple library for event dispatching using Gnome C OO design. We use this library in chapat db and connection. you can use it for other projects. This library named after our friend Seyed Kamyar Seyed Ghasemi Pour. Library source code available at /common.

How KamyLib works

First we make chevents for our events with chevent_new() then add some unique data to them with chevent_register_data() after that add all our events into chsession. After all we can call chsession_dispatch() for event dispatching with following syntax:

  • session : chsession
  • data : void * -> used for event distinguishing.
  • message : chmessage
  • user data : void * -> this data pass into event handler.

Future of KamyLib

In the future following features will be added into KamyLib

  • Multi threading support.
  • Asynchronous event dispatching with thread safe queue named chqueue.

Resolver

For resolving userID of a person and find server that containing his socket we use chptr protocol. we design this protocol in transport layer on top of IP ! :-). We do this just for having fun ! this protocol basically is a DHT and we use controlled flooding with sequence number for implementing it.

Contribution

If you have bug or idea about this project send me an email
Our coding style based on kernel standard.

Dependencies

  1. GLib 2.42.1
  2. LibPQ 1.9.4

Installation

mkdir build; cd build
cmake ..
make

About

Distributed platform for behind NAT message passing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •