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 2022/01/04 14:04:13 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5159: socket: extend socket_storage for rpmsg_socket addrinfo

pkarashchenko commented on a change in pull request #5159:
URL: https://github.com/apache/incubator-nuttx/pull/5159#discussion_r778104011



##########
File path: include/sys/socket.h
##########
@@ -284,23 +284,13 @@
  * aligned at an appropriate boundary so that pointers to it can be cast
  * as pointers to protocol-specific address structures and used to access
  * the fields of those structures without alignment problems.
- *
- * REVISIT: sizeof(struct sockaddr_storge) should be 128 bytes.
  */
 
-#ifdef CONFIG_NET_IPv6
 struct sockaddr_storage
 {
   sa_family_t ss_family;       /* Address family */
-  char        ss_data[26];     /* 26-bytes of address data */
+  char        ss_data[126];    /* 126-bytes of address data */

Review comment:
       `126` is quite expensive. Maybe we can change to 32 to handle `rexecd` and extend in case if it will be needed in future?

##########
File path: include/sys/socket.h
##########
@@ -284,23 +284,13 @@
  * aligned at an appropriate boundary so that pointers to it can be cast
  * as pointers to protocol-specific address structures and used to access
  * the fields of those structures without alignment problems.
- *
- * REVISIT: sizeof(struct sockaddr_storge) should be 128 bytes.
  */
 
-#ifdef CONFIG_NET_IPv6
 struct sockaddr_storage
 {
   sa_family_t ss_family;       /* Address family */
-  char        ss_data[26];     /* 26-bytes of address data */
+  char        ss_data[126];    /* 126-bytes of address data */

Review comment:
       `126` is quite expensive. Maybe we can change to `32` to handle `rexecd` and extend in case if it will be needed in future?




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