TheGreenHacker / IPC

12 stars 34 forks source link

IPC

The purpose of this project is to explore the application of various IPC techniques in C to implementing Linux system applications. The server process maintains and updates two network data structures: a L3 IPv4 Routing Table and L2 MAC list. Changes to the routing table and MAC List are synchronized to the client via UNIX domain sockets. The clients then use the MAC addresses as keys to look up the corresponding IP address stored in a shared memory region created by the server. Note that while the client, for demonstration purposes simply only prints the data, the concept of data synchronization using IPC mechanisms can easily be extended to real-life network administration tasks as the Routing Table and ARP Table (MAC list + shared memory IP) contains necessary info for other application functionality, such as firewalls and best-path routing algorithm computations.

Routing Entry Fields

An entry in the routing table contains:

MAC Entry Fields

An entry in the MAC list contains:

Routing Table Operations

Mac List Operations

Synchronization Protocol

Resources

Other Notes

When client shuts down on Mac OS or Windows, server SEG FAULTS. So please, only run on Linux systems. Also, -lrt is not recognized by clang.