| 1 | This is a good example. Here, the client sends Connection Close in the
|
|---|
| 2 | 1st PSH message. The result is the same as if MythTV received Keep-Alive
|
|---|
| 3 | and responded with Close. I have that protocol too.
|
|---|
| 4 |
|
|---|
| 5 | The following was done with unmodified MythTV code.
|
|---|
| 6 |
|
|---|
| 7 | Normal 3 way handshake and PSH, nothing new here:
|
|---|
| 8 |
|
|---|
| 9 | No. Time Source Destination Protocol Length Info
|
|---|
| 10 | 1 0.000000 mythandroid.local mc0.local TCP 74 59865 > myth-sapi [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=51699359 TSecr=0 WS=64
|
|---|
| 11 |
|
|---|
| 12 | No. Time Source Destination Protocol Length Info
|
|---|
| 13 | 2 0.000037 mc0.local mythandroid.local TCP 74 myth-sapi > 59865 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=3529371 TSecr=51699359 WS=32
|
|---|
| 14 |
|
|---|
| 15 | No. Time Source Destination Protocol Length Info
|
|---|
| 16 | 3 0.003469 mythandroid.local mc0.local TCP 74 59865 > myth-sapi [ACK] Seq=1 Ack=1 Win=14656 Len=0 TSval=51699359 TSecr=3529371 [ETHERNET FRAME CHECK SEQUENCE INCORRECT]
|
|---|
| 17 |
|
|---|
| 18 | No. Time Source Destination Protocol Length Info
|
|---|
| 19 | 4 0.004115 mythandroid.local mc0.local TCP 189 59865 > myth-sapi [PSH, ACK] Seq=1 Ack=1 Win=14656 Len=123 TSval=51699359 TSecr=3529371
|
|---|
| 20 |
|
|---|
| 21 | 0000 00 1f d0 90 98 8f 18 46 17 e2 5b d4 08 00 45 00 .......F..[...E.
|
|---|
| 22 | 0010 00 af 81 79 40 00 40 06 33 cc c0 a8 01 e7 c0 a8 ...y@.@.3.......
|
|---|
| 23 | 0020 01 cc e9 d9 19 90 7b 45 5f e9 9d dc 61 a9 80 18 ......{E_...a...
|
|---|
| 24 | 0030 00 e5 b2 03 00 00 01 01 08 0a 03 14 de 9f 00 35 ...............5
|
|---|
| 25 | 0040 da 9b 47 45 54 20 2f 4d 79 74 68 2f 47 65 74 48 ..GET /Myth/GetH <------- Simple <host>:6544/Myth/GetHost
|
|---|
| 26 | 0050 6f 73 74 4e 61 6d 65 20 48 54 54 50 2f 31 2e 31 ostName HTTP/1.1
|
|---|
| 27 | 0060 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c ..Connection: Cl <------- Client software modified to prevent Keep-Alive,
|
|---|
| 28 | 0070 6f 73 65 0d 0a 41 63 63 65 70 74 2d 45 6e 63 6f ose..Accept-Enco ------ because I know that MythTV doesn't support it.
|
|---|
| 29 | 0080 64 69 6e 67 3a 20 69 64 65 6e 74 69 74 79 0d 0a ding: identity..
|
|---|
| 30 | 0090 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 41 46 0d User-Agent: MAF.
|
|---|
| 31 | 00a0 0a 48 6f 73 74 3a 20 31 39 32 2e 31 36 38 2e 31 .Host: 192.168.1
|
|---|
| 32 | 00b0 2e 32 30 34 3a 36 35 34 34 0d 0a 0d 0a .204:6544....
|
|---|
| 33 |
|
|---|
| 34 | No. Time Source Destination Protocol Length Info
|
|---|
| 35 | 5 0.004131 mc0.local mythandroid.local TCP 66 myth-sapi > 59865 [ACK] Seq=1 Ack=124 Win=14496 Len=0 TSval=3529372 TSecr=51699359
|
|---|
| 36 |
|
|---|
| 37 | MythTV response, also good
|
|---|
| 38 |
|
|---|
| 39 | No. Time Source Destination Protocol Length Info
|
|---|
| 40 | 6 0.004522 mc0.local mythandroid.local TCP 419 myth-sapi > 59865 [PSH, ACK] Seq=1 Ack=124 Win=14496 Len=353 TSval=3529372 TSecr=51699359
|
|---|
| 41 |
|
|---|
| 42 | 0000 18 46 17 e2 5b d4 00 1f d0 90 98 8f 08 00 45 00 .F..[.........E.
|
|---|
| 43 | 0010 01 95 bb 33 40 00 40 06 f9 2b c0 a8 01 cc c0 a8 ...3@.@..+......
|
|---|
| 44 | 0020 01 e7 19 90 e9 d9 9d dc 61 a9 7b 45 60 64 80 18 ........a.{E`d..
|
|---|
| 45 | 0030 01 c5 bf 63 00 00 01 01 08 0a 00 35 da 9c 03 14 ...c.......5....
|
|---|
| 46 | 0040 de 9f 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f ..HTTP/1.1 200 O
|
|---|
| 47 | 0050 4b 0d 0a 44 61 74 65 3a 20 38 20 4f 63 74 20 32 K..Date: 8 Oct 2
|
|---|
| 48 | 0060 30 31 33 20 31 37 3a 35 30 3a 33 36 0d 0a 53 65 013 17:50:36..Se
|
|---|
| 49 | 0070 72 76 65 72 3a 20 4c 69 6e 75 78 20 33 2e 32 2e rver: Linux 3.2.
|
|---|
| 50 | 0080 30 2d 34 33 2d 67 65 6e 65 72 69 63 2c 20 55 50 0-43-generic, UP
|
|---|
| 51 | 0090 6e 50 2f 31 2e 30 2c 20 4d 79 74 68 54 56 20 30 nP/1.0, MythTV 0
|
|---|
| 52 | 00a0 2e 32 38 2e 32 30 31 33 31 30 30 31 2d 31 0d 0a .28.20131001-1..
|
|---|
| 53 | 00b0 41 63 63 65 70 74 2d 52 61 6e 67 65 73 3a 20 62 Accept-Ranges: b
|
|---|
| 54 | 00c0 79 74 65 73 0d 0a 43 61 63 68 65 2d 43 6f 6e 74 ytes..Cache-Cont
|
|---|
| 55 | 00d0 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 3d 22 45 rol: no-cache="E
|
|---|
| 56 | 00e0 78 74 22 2c 20 6d 61 78 2d 61 67 65 20 3d 20 35 xt", max-age = 5
|
|---|
| 57 | 00f0 30 30 30 0d 0a 45 54 61 67 3a 20 22 64 61 33 39 000..ETag: "da39
|
|---|
| 58 | 0100 61 33 65 65 35 65 36 62 34 62 30 64 33 32 35 35 a3ee5e6b4b0d3255
|
|---|
| 59 | 0110 62 66 65 66 39 35 36 30 31 38 39 30 61 66 64 38 bfef95601890afd8
|
|---|
| 60 | 0120 30 37 30 39 22 0d 0a 43 6f 6e 6e 65 63 74 69 6f 0709"..Connectio <------- Services API agrees not to do
|
|---|
| 61 | 0130 6e 3a 20 43 6c 6f 73 65 0d 0a 43 6f 6e 74 65 6e n: Close..Conten <------- a persistent connections.
|
|---|
| 62 | 0140 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 78 6d 6c t-Type: text/xml
|
|---|
| 63 | 0150 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 ..Content-Length
|
|---|
| 64 | 0160 3a 20 35 39 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 : 59....<?xml ve
|
|---|
| 65 | 0170 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f rsion="1.0" enco
|
|---|
| 66 | 0180 64 69 6e 67 3d 22 55 54 46 2d 38 22 3f 3e 3c 53 ding="UTF-8"?><S
|
|---|
| 67 | 0190 74 72 69 6e 67 3e 6d 63 30 3c 2f 53 74 72 69 6e tring>mc0</Strin <------- and here's the requested hostname
|
|---|
| 68 | 01a0 67 3e 0a g>.
|
|---|
| 69 |
|
|---|
| 70 | MythTV sends FIN-ACK to close its end of the connection
|
|---|
| 71 | and gets an ACK.
|
|---|
| 72 |
|
|---|
| 73 | No. Time Source Destination Protocol Length Info
|
|---|
| 74 | 7 0.004561 mc0.local mythandroid.local TCP 66 myth-sapi > 59865 [FIN, ACK] Seq=354 Ack=124 Win=14496 Len=0 TSval=3529372 TSecr=51699359
|
|---|
| 75 |
|
|---|
| 76 | No. Time Source Destination Protocol Length Info
|
|---|
| 77 | 10 0.009317 mythandroid.local mc0.local TCP 74 59865 > myth-sapi [ACK] Seq=124 Ack=354 Win=15680 Len=0 TSval=51699360 TSecr=3529372 [ETHERNET FRAME CHECK SEQUENCE INCORRECT]
|
|---|
| 78 |
|
|---|
| 79 | MythTV Android Frontend sends ACKs for the PSH and the FIN-ACK
|
|---|
| 80 |
|
|---|
| 81 | No. Time Source Destination Protocol Length Info
|
|---|
| 82 | 12 0.045274 mythandroid.local mc0.local TCP 74 59865 > myth-sapi [ACK] Seq=124 Ack=355 Win=15680 Len=0 TSval=51699364 TSecr=3529372 [ETHERNET FRAME CHECK SEQUENCE INCORRECT]
|
|---|
| 83 |
|
|---|
| 84 | No. Time Source Destination Protocol Length Info
|
|---|
| 85 | 18 0.105505 mythandroid.local mc0.local TCP 66 59865 > myth-sapi [FIN, ACK] Seq=124 Ack=355 Win=15680 Len=0 TSval=51699369 TSecr=3529372
|
|---|
| 86 |
|
|---|
| 87 | MythTV sends an ACK for the above and we're done. Perfect.
|
|---|
| 88 |
|
|---|
| 89 | No. Time Source Destination Protocol Length Info
|
|---|
| 90 | 19 0.105521 mc0.local mythandroid.local TCP 66 myth-sapi > 59865 [ACK] Seq=355 Ack=125 Win=14496 Len=0 TSval=3529397 TSecr=51699369
|
|---|
| 91 |
|
|---|