Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 999 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 999 Bytes

Routing_demo_in_C

This repository is having one main.c code which basically giving the demo of static routing using C language.

Assumptions:
1.Here we are assuming that network is having 4 router connected with each other in ring topology.
2.the network is fixed.
3.once the ip of nodes which connected to router than it will not change in future

abstract about code:

1.Functions:
1.1 concat:To concatinate two string in C
1.2 validate_number:To validate number for ip address
1.3 validate_ip: To validate structure of ip address

2.stuctures:
2.1 a:1D array of structure node which is having 2D array of character to store ip addresses for each router.
2.2 n:2D array of size 16 and type int is used to save structure of network
2.3 num:1D array of size 4 and type int is used to save how many nodes is connected to one router
2.4 sc:pointer of type char to store ip addresses for calculations.
2.5 sd:To store data of inter mediate step.