You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "acassis (via GitHub)" <gi...@apache.org> on 2023/01/27 12:09:52 UTC

[GitHub] [nuttx] acassis commented on a diff in pull request #8285: Force sockaddr_storage to the desired alignment

acassis commented on code in PR #8285:
URL: https://github.com/apache/nuttx/pull/8285#discussion_r1088888505


##########
include/sys/socket.h:
##########
@@ -279,6 +279,12 @@
 #define SCM_CREDENTIALS 0x02    /* rw: struct ucred */
 #define SCM_SECURITY    0x03    /* rw: security label */
 
+/* Desired design of maximum size and alignment (see RFC2553) */
+
+#define SS_MAXSIZE      128  /* Implementation specific max size */
+#define SS_ALIGNSIZE    (sizeof(FAR struct sockaddr *))
+                             /* Implementation specific desired alignment */
+

Review Comment:
   Should be interesting to add a DEBUG_ASSERTION to check if SS_MAXSIZE is greater than sa_family_t !



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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