albert_forster_
Apr 05, 2005Nimbostratus
relate_client & relate_server
We use TCP::collect and TCP::payload to gather the initial OPTIONS command. Then use TCP::respond to send an options response back to the client. With TCP::collect and TCP::payload we get the DESCRIBE request from the client. A TCP::release to send the DESCRIBE request (data from TCP::collect) to the server. The DESCRIBE is answered (RTSP OK) by the server.
Obviously no UDP connection can be established, so the client sends a TEARDOWN request after a timeout. For the proposed relate_client/relate_server commands no documantion can be found, so we don't even know the syntax.
Furthermore it seems, that the TCP::respond triggers a TCP::release and sends the OPTIONS command to the server, so the client receives two RTSP OK responds (one from TCP::respond and one from the server), both with CSeq: 1.
when CLIENT_ACCEPTED {
set i 0
TCP::collect
}
when CLIENT_DATA {
if { [TCP::payload] contains "CSeq: 1" and $i < 1}
{
set i 1
TCP::respond "RTSP/1.0 200 OK\r
CSeq: 1\r
Date: Mon, 04 Apr 2005 11:15:56 GMT\r
Server: Helix Mobile Server Version 10.0.5.1621 (sunos-5.8-sparc-server) (RealServer compatible)\r
Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN\r
RealChallenge1: 162a2d05500ae08260f6c0cb21e37855\r
StatsMask: 7\r
\r
"
TCP::collect
}
if { [TCP::payload] contains "transid" }
{
set desc [findstr [TCP::payload] "transid" 8 7]
log "desc: $desc"
TCP::release
}
}