Here, shall i change “udp.port” as “tcp.port” for my tcp based application layer protocol dissector? asked 11 Nov ‘11, 17:27 JK7 edited 12 Nov ‘11, 13:29 Guy Harris ♦♦ |
2 Answers:
Yes, that should be all that's required. answered 12 Nov '11, 00:07 grahamb ♦ |
UDP is a packet-oriented protocol, so packets for a protocol running atop UDP usually have a one-to-one correspondence with UDP packets. TCP is a byte-stream oriented protocol, so packets for a protocol running atop TCP have to put their own packet boundaries into the byte stream, with, for example, a packet size field. Dissectors for protocols running atop TCP just get handed TCP segment data, with no guarantee that they're being handed exactly one packet or that they're being handed all of the data in a packet. The dissector would have to handle that itself. Depending on how your protocol does that, you might, for example, be able to use answered 12 Nov '11, 13:27 Guy Harris ♦♦ |
I think the OP is asking the question as the Developers Guide shows the "FOO" dissector as running atop UDP as per the example the OP has posted.
Your points are all worth noting though.