130 likes | 480 Views
State Diagrams. EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277 ) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee122/ Materials with thanks to Jennifer Rexford, Ion Stoica, and colleagues at Princeton and UC Berkeley.
E N D
State Diagrams EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee122/ Materials with thanks to Jennifer Rexford, Ion Stoica,and colleagues at Princeton and UC Berkeley
State Diagrams • For complicated protocols, operation depends critically on current mode of operation • Important tool for capture this: state diagram • At any given time, protocol endpoint is in a particular state • Dictates its current behavior • Endpoint transitions to other states on events • Interaction with lower layer • Reception of certain types of packets • Interaction with upper layer • New data arrives to send, or received data is consumed • Timers
SMTP State DiagramServer States client sends other commands closed begin connection establishment 2xx HELO connection establishment 4xx wait MAIL FROM: 2xx client sends other commands or errors on MAIL FROM: envelope created; no recipients RSET errors attempt to deliver client sends other commands or errors on RCPT TO: RSET RCPT TO: 2xx text recipients set writing mail ready to deliver DATA client sends other commands or errors on RCPT TO: or RCPT TO: 2xx <CRLF>.<CRLF>
SMTP State DiagramCommand States HELO MAIL RCPT RSET SEND SOML SAML VRFYEXPN HELP NOOP QUIT TURN begin wait 1xx 3xx 4xx 5xx 2xx failure success error