3n4n / dll-offline Goto Github PK
View Code? Open in Web Editor NEWBUET UGCSE322 Assignment: Implementation of data link layer in C
BUET UGCSE322 Assignment: Implementation of data link layer in C
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.