Most computers on the internet have a 32 bit Internet Protocol Version 4 (IPv4) address.

computer science

Description

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 purposes of representation, the 32 bits composing the address may be divided into four octets (bytes) written as decimal numbers, each ranging from 0 to 255, and concatenated as a character string with a full stop (ASCII 46) between each number.


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 ordered pair: 172 and 16.


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 “CS531_Inet.txt”. Each line in “CS531_Inet.txt” will contain an addresses/alias pair as shown below:


Program structure and design: 

Create a structure type called address_t with components for the four integers of an IPv4 address along with a fifth component in which to store an associated alias (key field) of up to 10 characters. You will then create a singly linked list of address_t structures which will contain all of the address/alias pairs read in from the “CS531_Inet.txt” file. For this exercise, the linked list may be unsorted. Once the linked list has been created, the user will receive the following menu options:

Instruction Files

Related Questions in computer science category