Introduction
In this assignment, you will implement the packet encoding and decoding for a basic instant messaging protocol. You will be using void pointers and pointer arithmetic, along with functions from string.h to accomplish this. You will learn about pointer arithmetic, raw memory access, and data serialization. This assignment only requires you to encode and decode the outgoing and incoming packets, the rest of the instant messaging application is already implemented for you.
1 Getting Started
You should have received a GitHub Classroom invitation for this project. Follow it and check out the resulting
repository.
As always, read over the entirety of this handout before starting the assignment. If you have not yet read
Chapter 5 of The C Programming Language by Kernighan & Ritchie, you should also read that before starting.
You will specifically find Sections 5.3, 5.4, and 5.5 to be very helpful.
You should read and understand all of the code in the src directory. You are not expected to read or understand any code in the client directory, although you may look at it if you wish.
Man page sections are noted as a number in square brackets after a keyword in this document. For example,
memset [3] indicates that the manual page for the memset() function is found in section 3 of the Unix manual,
and you can view it with the command man 3 memset.
Get Free Quote!
291 Experts Online