Preview

Nt1310 Unit 1 Exercise 1

Powerful Essays
Open Document
Open Document
5033 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Nt1310 Unit 1 Exercise 1
CS601: Computer Networks lab
EXERCISE - 1 Write a Program in C/ C++ for error detecting code using CRC-CCITT (16 bit)
Objective: To enable the receiver of a message transmitted through noisy channel to check whether the message has been corrupted. The aim of an error detection technique is to enable the receiver of a message transmitted through noisy channel to determine whether the message has been corrupted. To do this, the transmitter constructs a value called a checksum that is the function of message and appends it’s to message. The receiver can then use the same function to calculate the checksum of the received message and compare it with the appended checksum to see if the message was correctly received.

IMPLEMENTATION

Figure: Euclidean division algorithm The message is represented by a information polynomial i(x). i(x) is store as a bit pattern of k length in an integer array. The k information bits are represented by k-1 degree polynomial i(x) = i(k-1)x(k-1) + i(k-2)x(k-2) +……………………………..+i1x+i0 A polynomial code is specified by its generating polynomial g(x). If we assume that we are dealing with a code in which codewords have n bits of which k are information bits and n-k are check bits . The
…show more content…
If not sure of machine IP address, keep the structure member s_addr to INADDR_ANY. Assign a port number between 3000 and 5000 to sin_port. 3) Listen for connections with the listen (sfd, …) system call 4) sfd = Accept a connection with the accept (sfd, …) system call. This call typically blocks until a client connects with the server. 5) Read the filename from the socket by n = read(sfd, buffer, sizeof(buffer)) 6) Open the file by fd = open(buffer) 7) Read the contents of the file by m = read(fd, buffer1, sizeof(buffer1)) 8) Write the file content to socket by write( sfd, buffer1, m) 9) Go to step 7 if m>0 10)

You May Also Find These Documents Helpful

  • Good Essays

    Nt1310 Unit 8 Assignment 1

    • 1415 Words
    • 6 Pages

    This project used an Atmega644 microcontroller clocked at 20MHz in each of the two functional modules for processing. Memory storage is provided by a standard Secure Digital (SD) card. Xbee modules provide bidirectional wireless communication and we use the TLV5616 DAC chip for generating analog audio. The LM358 dual op amp provides active filtering to the output of the DAC. Music files can be added to the SD card using any computer with a multimedia card reader. Once the base station detects an SD card inserted into the holder, it awaits data requests from the portable module. The portable module requests data when required and feeds these values into the DAC. The DAC output is low-pass filtered by the op amp, which also buffers the DAC output before it reaches the audio output…

    • 1415 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    NT1310 Unit 6 Exercise 1

    • 419 Words
    • 2 Pages

    On a TWISTED PAIR CABLE I chose to install an RJ-45. This is the standard Ethernet connector for most systems used today. I would first measure out the length of cable that I would need. I would then use a wire cutter to cut the length that I need, leaving enough room for corrections and to open the wire. I would then use wire strippers to remove a small piece of the outer most jacket. I would then choose what connection I wanted to make (568A or 568B). I would then untwist the wires and put them in the correct color order that I need. Then I would flatten out the wires and in one hand hold my RJ-45 connector and then with the other hand feed the wires into the connector. This is usually pretty simple with the way the connectors are made, and they are also usually clear. After I’m sure that the wires are in the connector all the way, and in the right order, I would use a wire crimper to clamp the wires securely into the connector.…

    • 419 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Over the last week the market has saw December corn futures fall $.08 on the heels of the Monday USDA report. The September report confirmed what most analysts have predicted for the last several weeks; there will almost certainly be a massive corn crop this season. The general consensus this week is that corn will continue to decrease throughout the harvest season. Kevin McNew of Grain Hedge believes if there is a late winter rally coming it will be “a game of small moves,”. I decided that it would be beneficial to calculate how much per bushel I need to make my break-even point. As a result of using the Missouri Extension numbers for average yield and average cost per acre I found that the minimum break-even price per bushel comes in at about…

    • 323 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    It is important to test the cables before you install them and after they are installed. Although there are many tools that are used for testing the cables in a network this paper is only going to talk about three. The first one is the multifunction cable scanner, they are available for testing both copper and fiber optic cable. One such model is the Hobbes 258898 it can test every pin of almost 20 often used cables from coax to 40 pin ribbon cables. It identifies opens, shorts and mis-wires at the pin level. With a multifunction cable tester you can perform a range of tests that you would normally need a few different testers to do. You can do wire-mapping, test for the length of the cable, test the attenuation, and you can test NEXT (near end crosstalk) for copper cables. They will also test for optical power and signal loss in fiber optic cables. A lot of the multifunction cable testers perform other more comprehensive test such as PS-NEXT, ACRF, PS-ACRF, delay…

    • 659 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Nt1330 Exercise 1.1

    • 1895 Words
    • 8 Pages

    Ants may lay pheromone trails when travelling from the nest to food, or from food to the nest, or when travelling in either direction depending on the species. They also follow these trails with a allegiance which is a function of the trail strength, among other variables. Ants drop pheromones as they walk by stopping briefly and touching their gaster, which carries the pheromone secreting gland, on the ground. The strength of the trail they lay is a function of the rate at which they make deposits, and the amount per deposit. Since pheromones evaporate and diffuse away, the strength of the trail when it is encountered by another ant is a function of the original strength, and the time since the trail…

    • 1895 Words
    • 8 Pages
    Good Essays
  • Satisfactory Essays

    Now, select a virtual switch depending on how you have configured the host. Proceed to the configuration of port properties. Give the port a specific name. I have given the label as ‘VMK’. Enter VLAN ID if there is any or else chose ‘None’. Put a check next to the ‘Virtual SAN traffic’ box and then click ‘Next’. Now start with configuring IPv4 settings for this port. After completing that, click ‘Next’. Click on the finish button to end the configuration for port group creation. Make sure that the group is created. Again a new window will pop up showing the devices created and their respective IP addresses. After confirming that the host is created, repeat this procedure two more times, since we require at least three hosts for configuring VSAN.…

    • 229 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 5 Exercise 1

    • 322 Words
    • 2 Pages

    1. List the patients that you took care of this week (one initial only); their age; gender; and primary diagnosis.…

    • 322 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Grandfather – father – Son: According to this backup rotation schedule incremental backups are performed daily, while full backups are done weekly and monthly.…

    • 770 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    a. The time in hours, minutes, and seconds is to be passed to a function named totsec().…

    • 720 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    NT 1330 Unit 2 Exercise 1

    • 363 Words
    • 2 Pages

    Let’s begin with the smaller branch supporting the five user workstations and the very slow network connectivity. You may not need a DNS server at all. If there is a lot of file & data sharing, then maybe the branch could benefit from a server, but configured in a secondary zone, such as an ADI. If there is not enough file/data sharing to need the presence of the server, an ADI server could potentially slow down an already sluggish system even more.…

    • 363 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    I recently had to deal with a problem with the Event Name as: BlueScreen. The Locale ID of the fault can be designated by the numerical value as: 5146. I am a touch apprehensive as to whether such a typical fault has been triggered owing to a virus attack. What should I do to eliminate the fault and ensure that the problem does not occur all over again?…

    • 474 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    1. BY 12/4 THE DEALER HAD NOT MADE CONTACT, INSTEAD GOT A CALL FROM MS. MELTON.…

    • 596 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    User Datagram

    • 844 Words
    • 4 Pages

    Checksum: This field is used to detect errors over the entire user datagram (header plus data).…

    • 844 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Ebook

    • 3677 Words
    • 15 Pages

    I. INTRODUCTION The Binary Erasure Channel (BEC) is a channel model where the receiver either receives the transmitted bit or is informed with the erasure of the bit, that is, the bit was not received or erased. Therefore, the receiver has no idea about the transmitted bit with a certain probability p, and is exactly sure about the transmitted bit with a certain probability 1-p. According to Shannon, the capacity of BEC is 1-p, which means that for the alphabet size of 2 k , where k is the number of bits in the alphabet, no more than (1 − p )k bits/symbol can be reliably communicated over the binary erasure channel. Additionally, any feedback from the receiver to the transmitter will not increase the capacity of the channel and reliable communication should be possible at this rate. Automatic Repeat Request (ARQ) schemes have so long been used as a classical approach to solve the reliable communication problem [6]. However, excessive number of feedbacks used in the case of erasures causes wasteful usage of bandwidth, network overloads and intolerable delays. Another approach is to use Forward Error Correcting (FEC) codes. Very powerful FEC codes exist such as Reed-Solomon codes, which can recover K source symbols from any K encoded symbols of N total number of transmitted symbols. However, the rate R = K N should be determined in compliance with the erasure probability p, before the transmission. If p changes or is less or more than the expected, this either will cause problems on the decoder side or will result a rate less than the…

    • 3677 Words
    • 15 Pages
    Powerful Essays
  • Good Essays

    Information Theory

    • 2168 Words
    • 9 Pages

    1. Types of Errors Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference. This interference can change the shape of the signal. In a single-bit error, a 0 is changed to a 1 or a 1 to a 0. The term single-bit error means that only 1 bit of a given data unit (such as a byte, character, or packet) is changed from 1 to 0 or from 0 to 1. The term burst error means that 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1. 2. Redundancy The central concept in detecting or correcting errors is redundancy. To be able to detect or correct errors, we need to send some extra bits with our data. These redundant bits are added by the sender and removed by the receiver. Their presence allows the receiver to detect or correct corrupted bits. The concept of including extra information in the transmission for error detection is a good one. But instead of repeating the entire data stream, a shorter group of bits may be appended to the end of each unit. This technique is called redundancy because the extra bits are redundant to the information: they are discarded as soon as the accuracy of the transmission has been determined. Figure 8 shows the process of using redundant bits to check the accuracy of a data unit. Once the data stream has been generated, it passes through a device that analyses it and adds on an appropriately coded redundancy check. The data unit, now enlarged by several hits, travels over the link…

    • 2168 Words
    • 9 Pages
    Good Essays

Related Topics