[openbeos] We need netcat!
- From: Mat Hounsell <mat_geek@xxxxxxxxxxxx>
- To: Open BeOS <openbeos@xxxxxxxxxxxxx>
- Date: Tue, 20 Mar 2007 18:28:17 -0700 (PDT)
After struglling all week with my RTSP client I was able to debug and fix it in
30 minutes with netcat. (Admitedly it was almost correct)
$> nc -l -p 3333 -x "Maximize-Reliability" -c "nc -o ~/dump localhost 8554"
setup a pass through server that would record the data sent
"> 00000000 53 45 54 55 50 20 2f 6d 6f 73 2d 32 30 30 37 2d # SETUP /mos-2007-
"> 00000010 63 6c 75 62 62 65 72 73 2d 30 31 2e 6d 70 33 20 # clubbers-01.mp3
"> 00000020 52 54 53 50 2f 31 2e 43 53 65 71 3a 20 32 0d 0a # RTSP/1.CSeq: 2..
"> 00000030 00 6a 55 f0 b7 a8 7a 05 08 54 72 61 6e 73 70 6f # .jU...z..Transpo
"> 00000040 72 74 3a 20 52 54 50 2f 41 56 50 3b 75 6e 69 63 # rt: RTP/AVP;unic
"> 00000050 61 73 74 3b 63 6c 69 65 6e 74 5f 70 6f 72 74 3d # ast;client_port=
"> 00000060 38 30 31 32 2d 38 30 31 33 0d 0a 0d 0a 00 # 8012-8013.....
"< 00000000 52 54 53 50 2f 31 2e 30 20 32 30 30 20 4f 4b 0d # RTSP/1.0 200 OK.
"< 00000010 0a 43 53 65 71 3a 20 32 0d 0a 44 61 74 65 3a 20 # .CSeq: 2..Date:
"< 00000020 57 65 64 2c 20 4d 61 72 20 32 31 20 32 30 30 37 # Wed, Mar 21 2007
"< 00000030 20 30 31 3a 30 33 3a 31 32 20 47 4d 54 0d 0a 54 # 01:03:12 GMT..T
"< 00000040 72 61 6e 73 70 6f 72 74 3a 20 52 54 50 2f 41 56 # ransport: RTP/AV
"< 00000050 50 3b 75 6e 69 63 61 73 74 3b 64 65 73 74 69 6e # P;unicast;destin
"< 00000060 61 74 69 6f 6e 3d 31 32 37 2e 30 2e 30 2e 31 3b # ation=127.0.0.1;
"< 00000070 63 6c 69 65 6e 74 5f 70 6f 72 74 3d 30 2d 31 3b # client_port=0-1;
"< 00000080 73 65 72 76 65 72 5f 70 6f 72 74 3d 36 39 37 30 # server_port=6970
"< 00000090 2d 36 39 37 31 0d 0a 53 65 73 73 69 6f 6e 3a 20 # -6971..Session:
"< 000000a0 35 34 0d 0a 0d 0a # 54....
"> 0000006e 50 4c 41 59 20 00 2f 6d 6f 73 2d 32 30 30 37 2d # PLAY ./mos-2007-
"> 0000007e 63 6c 75 62 62 65 72 73 2d 30 31 2e 6d 70 33 20 # clubbers-01.mp3
"> 0000008e 52 54 53 50 2f 31 2e 43 53 65 71 3a 20 33 0d 0a # RTSP/1.CSeq: 3..
"> 0000009e 00 40 e4 b7 a0 36 e4 b7 4c 53 65 73 73 69 6f 6e # .@...6..LSession
"> 000000ae 3a 20 35 34 0d 0a 00 36 e4 b7 4c # : 54...6..L
The setup's and play's "'RTSP/1.0\r\n" was missing "0\r\n"
The setup's and play's CSeq was followed by an NUL then garbage.
The setup's Transport field was followed by NUL
The paly's session was followed by NUL and garbage.
The play had no blank line to terminate the request.
Most of the problems were send sizes.
And live555's media server parsed and aprroved that grabage request.
I was using Hobbit's netcat, public domain open source, on ubuntu.
Haiku OS - Free, Open, and Fantastic: http://haiku-os.org/
Send instant messages to your online friends http://au.messenger.yahoo.com
- Follow-Ups:
- [openbeos] Re: We need netcat!
- From: François Revol
- [openbeos] Re: We need netcat!
- From: Axel Dörfler
Other related posts:
- » [openbeos] We need netcat!
- » [openbeos] Re: We need netcat!
- » [openbeos] Re: We need netcat!
- [openbeos] Re: We need netcat!
- From: François Revol
- [openbeos] Re: We need netcat!
- From: Axel Dörfler