3.1.5.4 Receive Session Request Message

When a Miracast Sink receives a Session Request message (section 2.2.4), it MUST parse the Security Options TLV (section 2.2.7.5), store the Security Options (section 3.1.1), and determine the next expected state. If the Security Options indicate UseDtlsStreamEncryption (section 2.2.7.5) and the Sink included this bit in its capabilities, then the Sink MUST go to the Waiting for Security Handshake state (section 3.1.1). If the Security Options also indicate SinkDisplaysPin (section 2.2.7.5) and the Sink included this bit in its capabilities, then the Sink MUST randomly generate and display an 8 digit numeric PIN.