Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Socket programming assignment 2: udp

22/12/2020 Client: saad24vbs Deadline: 14 Days

1


CSCE 5580: Computer Networks Programming Assignment 1


Due: 11:59 PM on Monday, February 17, 2020 PROGRAM DESCRIPTION: In this assignment, you will write two complete C programs to support a client/server model using Linux sockets for a UDP “ping” utility, similar to the ping utility already available on our CSE machines.


• Server o The server program will be called with one command-line argument, the port


number being used, such as ./pingsvr 8001. If the user calls the server program with too few or too many arguments, you will print out a usage statement and terminate the program.


o The server will set up a UDP socket on the Internet (i.e., INET) domain and then wait in an infinite loop listening for incoming UDP packets, specifically PING messages from a client. Your server should be able to support multiple clients at the same time (though no extra work is expected to support this requirement).


o Packet Loss UDP provides applications with an unreliable transport service. Messages may get lost in the network due to a variety of reasons. Since packet loss is rare or even non-existent in typical campus networks, including UNT’s, the server in this project will inject artificial loss to simulate the effects of network packet loss. The server will simulate 30% packet loss through generation of a seeded, randomized integer that will determine whether a particular incoming PING message is lost or not.


o When a PING message comes in from a client and if the packet is not lost, the server will print the client message to the terminal and then send a PONG message back to the client. If the packet is determined to be lost, the server will print an appropriate message to the terminal and simply “eat” the message by not responding to the client.


o The server will remain “always on” until a user enters Ctrl-C (^C) to send an interrupt signal to the program to terminate.


• Client o The client program will be called with two command-line arguments, the


hostname of the server and the port number being used, such as ./pingcli cse06 8001. If the user calls the client program with too few or too many arguments, you will print out a usage statement and terminate the program.


2


o The client will send 10 automated PING messages to the server using a UDP socket, where automated means the message is built in the code, not entered from the keyboard. Because UDP is an unreliable protocol, a packet sent from the client to the server may be lost in the network, or vice versa. For this reason, the client cannot wait indefinitely for a reply to a PING message. You should get the client to wait up to one second for a reply – if no reply is received within one second, your client program should assume that the packet was lost during transmission across the network.


o Specifically, for each of the 10 PING messages, your client program should:


§ send the PING message using the UDP socket and print a status message;


§ if the response message is received from the server, calculate and print the round trip time (RTT) in milliseconds for each message; otherwise, print a status message that it timed out.


o After all of the PING messages have been sent (and responses received or timed out), the client program should report the following and then terminate:


§ the number of messages sent, the number of messages received, and the message loss rate (as a percentage);


§ the minimum, maximum, and average RTTs for all of the PING messages in milliseconds.


Your program should run on the INET domain using SOCK_DGRAM (i.e., UDP) sockets so that the server and the client execute on a different CSE machine. Given the randomness of what messages get dropped, it could be that less than or greater than 30% of the messages are dropped. Notice, however, in the SAMPLE OUTPUT that the server did indeed receive 10 PING messages, but “dropped” a few of the messages through our Packet Loss simulation. You will also need to make sure you are able to handle any error cases.


SAMPLE OUTPUT (user input shown in bold):


==> SERVER on cse06 $ ./pingsvr usage: ./pingsvr <port> $ ./pingsvr 8001 [server]: ready to accept data... [client]: PING [server]: dropped packet [client]: PING [client]: PING [server]: dropped packet [client]: PING [client]: PING [client]: PING


3


[client]: PING [server]: dropped packet [client]: PING [client]: PING [server]: dropped packet [client]: PING ^C ==> CLIENT on cse05 $ ./pingcli usage : ./pingcli <hostname> <port> $ ./pingcli cse06 usage : ./pingcli <hostname> <port> $ ./pingcli cse06 8001 1: Sent... Timed Out 2: Sent... RTT=0.650000 ms 3: Sent... Timed Out 4: Sent... RTT=0.359000 ms 5: Sent... RTT=0.213000 ms 6: Sent... RTT=0.191000 ms 7: Sent... Timed Out 8: Sent... RTT=0.346000 ms 9: Sent... Timed Out 10: Sent... RTT=0.368000 ms 10 pkts xmited, 6 pkts rcvd, 40% pkt loss min: 0.191000 ms, max: 0.650000 ms, avg: 0.246167 ms


REQUIREMENTS: • Your code should be well documented in terms of comments. For example, good


comments in general consist of a header (with your name, course section, date, and brief description), comments for each variable, and commented blocks of code.


• Your programs should be named “project1svr.c” and “project1cli.c”, without the quotes, for the server and client code, respectively.


• Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, …, cse06), so you should make sure that your program compiles and runs on a CSE machine.


• Please pay attention to the SAMPLE OUTPUT for how this program is expected to work. If you have any questions about this, please contact your instructor or TAs, assigned to this course to ensure you understand these directions.


• This is an individual programming assignment that must be the sole work of the individual student. Any instance of academic dishonesty will result in a grade of “F” for the course, along with a report filed into the Academic Integrity Database.


4


SUBMISSION: • You will electronically submit your two C source code files, project1svr.c and


project1cli.c, to the Project 1 dropbox in Canvas by the due date.


Applied Sciences

Architecture and Design

Biology

Business & Finance

Chemistry

Computer Science

Geography

Geology

Education

Engineering

English

Environmental science

Spanish

Government

History

Human Resource Management

Information Systems

Law

Literature

Mathematics

Nursing

Physics

Political Science

Psychology

Reading

Science

Social Science

Home

Blog

Archive

Contact

google+twitterfacebook

Copyright © 2019 HomeworkMarket.com

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Essay Tutor
Helping Hand
University Coursework Help
Writer Writer Name Offer Chat
Top Essay Tutor

ONLINE

Top Essay Tutor

I have more than 12 years of experience in managing online classes, exams, and quizzes on different websites like; Connect, McGraw-Hill, and Blackboard. I always provide a guarantee to my clients for their grades.

$65 Chat With Writer
Helping Hand

ONLINE

Helping Hand

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$60 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$62 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

DISCUSSION - Ionisation energy period 3 - Case study in medical surgical nursing - Which component controls the timing of all computer operations - What is the tensile strength of low carbon steel - Secl annual report 2019-20 - The prince by niccolo machiavelli answers - Discussion board ( please respond to student post) - Nsw service installation rules - Genesis 15 1 6 niv - Figtree drive vaccination centre - Estee lauder presidential management associate salary - Moodoo rabbit proof fence - Allison has 5 times as many baseball cards - WOMEN’S CLINIC +27717852514 ABORTION PILLS FOR SALE IN PRETORIA, MAMELODI, BENONI, WITBANK, MPUMLANGA, NORTH WEST, LYDENBURG, - Tesco case study questions and answers - Conflicts in romeo and juliet - Questions about public speaking class - Target customer of milk tea - Masterpiece cakeshop v colorado civil rights commission oyez - Assessment 3: Digital Forensic Report This document supplies detailed information on assessment tasks for this unit. - Bluetooth can be used to create a _____, to communicate among computerized devices. - Global treps project - Business Plan : Financial Analysis & Budget - 5 effective use of family resources - The payoff of doing a thorough swot analysis is - Personality test drawing a cat - What can you do to encourage collaboration and demonstrate stewardship - Macnaughton & williams 2009 - National parks victoria map - 300 words - Autoclave vent filter sterilization - Video-of-the-Week - H nmr frequency table - Jace is writing a paper for his criminal justice course - Nsw bar association v hamman - Tata steel richards bay contact details - Use it or lose it budgeting problem - Monica diaz and michael naranjo - Project management simulation scope resources and schedule scenario a - Why did andersen consulting change to accenture - Annotated Bibliography - Ella enchanted the musical - Hay group reference level guide - Planning for Innovation - Pancho / ser el estudiante / malo / la clase - Discussion: Developing a Graphic Model - Compare and contrast essay - Road traffic injuries and disease - Intergrain enviropro endure 2 pack matt - Communicating and Sustaining Change PowerPoint - Employee wifi access policy - Four atoms are arbitrarily labeled - Fremont high school norton reader - Wells fargo eliminates sales goals - Acme toy company prints baseball cards - Characteristics of moses in animal farm - Electrical safety case study 1 answers - Most significant change questions - What is representative fraction - Blackwell publishing inspection copies - Miss hagen of films crossword - Food safety policy ppt - 14 principles of motivation - Mk wiring accessories catalogue pdf - British born jazz singer kim lesley - Osha personal protective equipment assessment answers - Rat race coupler applications - Nike unethical business practices case study - 3 day food diary assignment - News article - North penn school district - Serial dilution practice problems worksheet - Zara international case study answers - Pall hydrophobic vent filter - Hag seed anne marie quotes - Openstax org details books us history - Tarra bulga national park camping - Describe the relationships and differences between hackers and viruses - Reproductive Disorders - Total sum of square formula - 4 ESSAY QUESTION FROM LECTURES and NCA reading - Basadur simplex problem solving process - How to write an informal proposal - Youth homeless north east - Schools in lipa city - Catholicism in australia timeline - Miscommunication with a brazilian auto parts manufacturer case study answers - Project -1 - Diversity in hospitality industry - Celestron powerseeker 127eq collimation - Match each character type in robert merton’s strain theory of deviance to its definition. - Flow chart qualitative analysis - What is currency deposit ratio - Impacts of tourism slideshare - Deliverable 4 - Costa’s Mobile and Email Marketing Report - Triumph tina scooter parts - Internal medicine personal statement pdf - The effects of Cloud Computing Risk, on the security and future directions on Data Migration to deliver a service over a network. - Discussion assignment