Giter VIP home page Giter VIP logo

dll-offline's Introduction

Data Link Layer
===============

This is an assignment for Level-3/Term-2.


Implementation Guideline
------------------------

[x] Adopt the code from your TCP assignment. Replace 'struct msg' with 'struct
    pkt'. Also replace 'struct pkt' with 'struct frm'. In each frame, keep an
    additional variable to designate the type of the frame.

[x] Make necessary changes in the procedure names to replace the word 'layer5'
    with 'layer3' and 'layer3' with 'layer1'. For example,
    tolayer3(calling_entity,packet) will be renamed as
    tolayer1(calling_entity,frame); tolayer5(calling_entity,message) will be
    renamed as tolayer3(calling_entity,packet).

[x] Unidirectional/bidirectional data transfer. Please follow the TCP assignment
    guideline to achieve this.

[x] Implementation of piggybacked acknowledgement: To achieve piggybacking with
    minimal change in your code, we have come up with the following protocol
    which differs from the ideal implementation of piggybacking.

[x] Error control. You will implement the error detection mechanism using CRC
    (Cyclic Redundancy Check) checksum. The generator polynomial should be taken
    as input in your code. Your code must print the input bit string to the CRC
    algorithm, generator polynomial, and the calculated CRC while computing CRC
    on the sender’s side. On the receiver side, print the input bit string to
    the CRC algorithm, generator polynomial and an error message if a data
    transmission error has occurred.


Protocol for Piggybacked Acknowledgement
----------------------------------------

After B receives a data frame Fab from A, B does not send an acknowledgement
immediately. B sets a state variable called “OutstandingACK” to 1. If B receives
a packet from its upper layer (layer 3) while OutstandingACK = 1, then B creates
a data-ack frame Fba and piggybacks the acknowledgement of the previously
received frame Fab in this frame. Otherwise, B creates a data frame.

However, it is possible that B does not receive any data frame to piggyback the
acknowledgement. In this case, A will eventually resend frame Fab. Upon
receiving a duplicate frame, B will send the outstanding acknowledge frame

dll-offline's People

Contributors

3n4n avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.