nuclear_kote
@nuclear_kote

Как считается checksum в TCP?

5aec681464800653313473.png

По документации вроде как каждые 2 байта складываются начиная с адресов, но что то не сходиться
https://tools.ietf.org/html/rfc793
  • Вопрос задан
  • 1096 просмотров
Решения вопроса 1
@Sumor
Вы не дочитали эту часть:

The checksum also covers a 96 bit pseudo header conceptually
prefixed to the TCP header. This pseudo header contains the Source
Address, the Destination Address, the Protocol, and TCP length.
This gives the TCP protection against misrouted segments. This
information is carried in the Internet Protocol and is transferred
across the TCP/Network interface in the arguments or results of
calls by the TCP on the IP.

+--------+--------+--------+--------+
| Source Address |
+--------+--------+--------+--------+
| Destination Address |
+--------+--------+--------+--------+
| zero | PTCL | TCP Length |
+--------+--------+--------+--------+

The TCP Length is the TCP header length plus the data length in
octets (this is not an explicitly transmitted quantity, but is
computed), and it does not count the 12 octets of the pseudo
header.

Нужно добавить данные псевдозаголовка.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы