Let's study programs useful to implement / simulate Computer Network related functionalities.
- Bit Stuffing Simulation
- UDP Header Simulation
- Program to display IP Address
- Simulation of Framing Concepts
- Program to print Process ID
- ARP Simulation
- Echo Client Server Socket
- Chat Client Server Socket
- Count Client Server Socket
- AES Encryption Decryption
- Use of XOR operations on two numbers
- Simple Hash function implementation on 8 bits using XOR operation
- FTP Server Client Simulation (File download program)
- Sample Networking Protocol Header
- Finding Program Execution Time
- Program to download a web page
* * * * *
Following assumptions are taken while implementing this program.
- Assume MTU size is 5 characters.
- Assuming Source IP=192.168.1.1 and Destination IP=10.1.1.1
- All fragments will be displayed on screen.
- For sample input content: "Hello Student. How are you?" Output generated will be as under:
1,192.168.1.1, 10.1.1.1, stud
2,192.168.1.1, 10.1.1.1,ent.
3,192.168.1.1, 10.1.1.1,How a
4,192.168.1.1, 10.1.1.1,re yo
5,192.168.1.1, 10.1.1.1,u?
Total fragments created=6
UDP Header implementation
This C program generates UDP Header with following assumptions:
1. Sample data in input.txt file: ABC
2. Source Port=1100, Destination Port=1101
3. Total length=50
4. You may use your logic for Checksum calculation.
1. Sample data in input.txt file: ABC
2. Source Port=1100, Destination Port=1101
3. Total length=50
4. You may use your logic for Checksum calculation.
5. Output of the program is stored in UDP Header.txt file.
For the given input "ABC", output in the UDPHeader file is as under:
1100,1101,50,198
* * * * *
Simulation of Framing Concept using C language.
Assumptions:
1. Header contains following parameters:
FrameNumber, SourceIP, DestinationIP,FiveCharacters of Data
2. SourceIP=192.168.1.1
3. DestinationIP=192.168.1.2
4. Input data is taken from input.txt file.
5. Generated Frames will be stored in output.txt file.
Demo C program - Simulation of Framing concept
Assumptions:
1. Header contains following parameters:
FrameNumber, SourceIP, DestinationIP,FiveCharacters of Data
2. SourceIP=192.168.1.1
3. DestinationIP=192.168.1.2
4. Input data is taken from input.txt file.
5. Generated Frames will be stored in output.txt file.
Demo C program - Simulation of Framing concept
Good Stuff
ReplyDelete