0

I had a look in those replies, but those doesn't answered my questions, so I decide to ask one by myself.

1) The first I don't understand: why TCP/UDP should know something about the IP at all? It is absolutely different protocols, which operates on a different levels. Isn't an IP module crops down the IP header before transmitting the message to an UDP module?

2) The second: it is very hard to see how to use the pseudoheader in a checksum calculating. The RFC page of UDP says that I need to add a pseudoheader, and calculate it too. But isn't this impossible? Because there's only two variants:

A) I am create this pseudoheader and fill it with some values, but the RFC doesn't say what the values it should be: if I use one values, and receiver other ones, the checksum just wouldn't match! More over: in this case I can just neglect this step, and this doesn't hurt somehow (at least no more then the using different values for filling).

B) IP somehow gets an access to a higher-level protocol (i.e. UDP), and gives to me it's own filled header, which is I going to use in a checksum calculating step. But this way the header will not be "pseudo-", and the two protocols will be in fact one protocol.

The reason why I'm asking: I need to create a stable connection through a serial port(for some reason there could be somehow broken packets), and I am decided to make a TCP here, and I am absolutely don't need an IP protocol.

Community
  • 1
  • 1
Hi-Angel
  • 4,933
  • 8
  • 63
  • 86
  • 1
    1 and B are answered very well in the linked answers - read all of them and follow the links - so you probably should clarify what you don't understand. 2 and A are explained in detail in paragraphs 3 and 4 (with a diagram, too) on page 2 of the RFC. – molbdnilo May 23 '14 at 10:20
  • @molbdnilo seems you mean the TFBW's answer. Yeah, it is really clarify the first item; I had read all the answers except this one because he gives a link to the mail of someone who developed those protocols, and wrote that all other part of answer is a brief of the mail. But to be honest it is not a brief, he more clearly explains, then the mail. – Hi-Angel May 23 '14 at 10:39
  • @molbdnilo thank you, they just broke up a note about a checksum calculating to two paragraphs, the second one is in the end of the RFC. It is horroble in my opinion: calculate a checksum, as told there, should an IP module. So in my case I can't just take some source code of TCP module, because it will be linked with an IP one. I need to write my own, and this actually will not be compatible with TCP. – Hi-Angel May 23 '14 at 10:44

0 Answers0