ISO OSI Model (C Programming)

Problem Definition: Write a program in C to display the ISO OSI model in Computer Networking.

#include<stdio.h>

void main()
{
//clrscr();
printf(“\n \t\t ISO-OSI Model”);
printf(“\n LAYERS Sender Side”);

printf(“\n APPLICATION lAYER !! AH !!DATA!!”);
sleep(1);
printf(“\n PRESENTATION lAYER !! PH !!AH!!DATA!!”);
sleep(1);
printf(“\n SESSION LAYER !! SH !!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n TRANSPORT LAYER !! TH !!SH!!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n NETWORK LAYER !! NH !!TH!!SH!!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n DATALINK LAYER !! DH !!NH!!TH!!SH!!PH!!AH!!DATA!! CRC !!”);
sleep(1);
printf(“\n PHYSICAL LAYER 100100101010101110001010010 \n”);
sleep(1);
printf(“\n LAYERS Recevier Side”);
printf(“\n PHYSICAL LAYER 100100101010101110001010010 “);
sleep(1);
printf(“\n DATALINK LAYER !! DH !!NH!!TH!!SH!!PH!!AH!!DATA!! CRC !!”);
sleep(1);
printf(“\n NETWORK LAYER !! NH !!TH!!SH!!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n TRANSPORT LAYER !! TH !!SH!!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n SESSION LAYER !! SH !!PH!!AH!!DATA!!”);
sleep(1);
printf(“\n PRESENTATION lAYER !! PH !!AH!!DATA!!”);
sleep(1);
printf(“\n APPLICATION lAYER !! AH !!DATA!!”);
sleep(1);
//getch();
}
/*output

ISO-OSI Model
LAYERS Sender Side
APPLICATION lAYER !! AH !!DATA!!
PRESENTATION lAYER !! PH !!AH!!DATA!!
SESSION LAYER !! SH !!PH!!AH!!DATA!!
TRANSPORT LAYER !! TH !!SH!!PH!!AH!!DATA!!
NETWORK LAYER !! NH !!TH!!SH!!PH!!AH!!DATA!!
DATALINK LAYER !! DH !!NH!!TH!!SH!!PH!!AH!!DATA!! CRC !!
PHYSICAL LAYER 100100101010101110001010010

LAYERS Recevier Side
PHYSICAL LAYER 100100101010101110001010010
DATALINK LAYER !! DH !!NH!!TH!!SH!!PH!!AH!!DATA!! CRC !!
NETWORK LAYER !! NH !!TH!!SH!!PH!!AH!!DATA!!
TRANSPORT LAYER !! TH !!SH!!PH!!AH!!DATA!!
SESSION LAYER !! SH !!PH!!AH!!DATA!!
PRESENTATION lAYER !! PH !!AH!!DATA!!
APPLICATION lAYER !! AH !!DATA!!
*/

Advertisements

4 thoughts on “ISO OSI Model (C Programming)

  1. Greate article. Keep posting such kind of info on your blog.
    Im really impresseed by it.
    Hey there, You’ve performed an excellent job. I will definiteely digg it and in my opinion suggest to my friends.

    I’m confident they’ll be benefited from this site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s