You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/07 22:44:24 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #3865: Fix tcp seq wrap around issues

yamt commented on a change in pull request #3865:
URL: https://github.com/apache/incubator-nuttx/pull/3865#discussion_r646988874



##########
File path: net/tcp/tcp.h
##########
@@ -86,6 +86,15 @@
 #  endif
 #endif
 
+/* 32-bit modular arithmetics for tcp sequence numbers */
+
+#define TCP_SEQ_LT(a, b)	((int32_t)((a) - (b)) < 0)
+#define TCP_SEQ_GT(a, b)	TCP_SEQ_LT(b, a)
+#define TCP_SEQ_LTE(a, b)	!TCP_SEQ_GT(a, b)

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org