Need help with writing a C program that meets this requirements: Most computers on the internet have

Need help with writing a C program that meets this requirements: Most computers on the internet have a 32 bit Internet Protocol Version 4 (IPv4) address. As reading these addresses would be difficult using binary or hexadecimal notation, IPv4 addresses are usually represented in dotted decimal notation. For example: The first two components of the address indicate the computer’s locality on the network. In the above example, the locality is specified by the numbers 172 and 16. Another example: For purposes of representation, the 32 bits composing the address may be divided into four octets (bytes) written in decimal numbers, each ranging from 0 to 255, and concatenated as a character string with a full stop (ASCII 46) between each number. Locally, computers are often known by an alias (nickname) as well. You will design and write a program to process a list of Internet addresses from file “CS222_Inet.txt. Your program should read a list of up to 100 addresses and nicknames terminated by a sentinel address of all zeros and the sentinel nickname, “none”. Sample CS222_Inet.txt: 111.22.3.44 platte 131.250.95.21 jet 172.66.7.88 wabash 111.22.5.66 green 131.250.47.63 baker 0.0.0.0 none Your program will generate a report listing all computers from the same For this assignment, you will create your own test data files using the sample format. Grading will involve using different data files with the same format. locality—that is, each computer with matching values in the first two components of the address. In the list, the computers should be identified by their alias. The report will be saved to file “222 Locality Report”. The user will also generate a report listing all of the computers sorted alphabetically by alias. This report will be saved to file “222 Alias As with HW2, both reports will contain the user’s name and current date, along with the generated report listing. Examples: List”. Hal Greenwald April 13, 2017 CS222 Network Locality Report 111.22 platte green 131.250 jet baker 172.66 wabash Hal Greenwald April 13, 2017 CS222 Network Alias Listing baker green jet platte wabash 131.250.47.63 111.22.5.66 131.250.95.21 111.22.3.44 172.66.7.88 Program structure and design: Create a two-dimensional array called locality_t which will contain each unique locality pair: int locality_t[100][2]; In the above example, the locality_t would contain the following three unique locality pairs: locality_t[row][0] locality_t[row][1] You may use the Bubble Sort discussed in class, or any other sorting mechanism of your choice for the alias sort. Include at least the following UDFs (You may define your own prototypes): a. Read_Data_File (Note: you may assume that the data file is syntactically correct.) a. Generate_Locality_Rpt b. Generate_Alias_List Rubric 10 points: Is the source code well formatted using clearly readable indentation and white space (while viewed within vi)? 2 points Is the source code well documented with comments? 2 points Is the code modular with respect to UDFs? 2 points Is “222 Locality Report” correct? 2 point Is “222 Alias Listing” correct? 2 point Extra credit: Implement locality_t as a linked list. 4 points (Both reports must be correct for the additional points to apply). Note: Unlike HW # 2, this project does not require an interactive user interface

 

Looking for a Similar Assignment? Hire our Top Uk Tutors while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Active Discount Code FREE15