Link Layer Programming (R2)

Link Layer - CSCI 232 Computer Networking Link Layer Programming George Blankenship 1 Programming George Blankenship 1 CSCI 232 Computer Networking

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSCI 232 - Computer Networking Link Layer Programming George Blankenship 1 Programming George Blankenship 1 CSCI 232 Computer Networking: Link Layer Programming George Blankenship Programming George Blankenship 2 Communication Environment Computer Modem Telephone Telephone circuit Parallel/Serial Interface Physical Layer Interface Link Layer Interface Physical Layer Interface (invisible) Programming George Blankenship 3 Lecture Outline • Programming concepts – General concepts – Programming constructs • Physical components – Modem interface – Modem/telephone interface – System-to-system messages • Programming examples CSCI 232 - Computer Networking Link Layer Programming George Blankenship 2 Programming George Blankenship 4 Programming Concepts • Basic concepts – Finite state machine – Interrupts • Programming constructs – Server programming – Client programming – State variable processing – Messages •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example Programming George Blankenship 5 Finite State Machine • Problem is decomposed – Tasks – Events • State is a task with an input and output • Events are the input or output of a task •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example Programming George Blankenship 6 FSM Definition •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example Initial ~DTR ~DSR Initial ~DTR ~DSR WaitConnect Dial OK WaitOK WaitOK Reset CTS WaitCTS WaitCTS IF setup RTS DSR WaitDSR WaitDSR DTR Initialize Initial Next state Output Input State CSCI 232 - Computer Networking Link Layer Programming George Blankenship 3 Programming George Blankenship 7 FSM Map •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example Initial WaitDSR WaitCTS WaitOK WaitCD Init DTR DSR IF Setup, RTS ~DSR ~DTR ~DSR ~DTR CTS Reset ~DSR ~DTR OK Dial ~ D S R ~ D T R RX/TX OK CD Programming George Blankenship 8 Interrupts • Inputs are capture and processed by ad hoc processes • Current state defines applicability of the interrupt • Current state defines processing associated with the interrupt • Interrupt processing centered on current state •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example Programming George Blankenship 9 Programming • Two components to each I/O – Recipient, waiting entity, server – Generator, active entity, client • Server – Device or service provider – Must wait for service request • Client – Requestor of service – Performs read/write as needed •Concepts –FSM –Switch •Programming –Server/Client –State variable –PDU/SDU •Physical –Modem –Dialer •Example CSCI 232 - Computer Networking...
View Full Document

This note was uploaded on 09/03/2010 for the course CS 232 taught by Professor Susan during the Summer '09 term at GWU.

Page1 / 10

Link Layer - CSCI 232 Computer Networking Link Layer Programming George Blankenship 1 Programming George Blankenship 1 CSCI 232 Computer Networking

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online