You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/02/07 18:50:41 UTC

[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8370: include/sys/socket.h: Add SOCK_CTRL to socket type

xiaoxiang781216 commented on code in PR #8370:
URL: https://github.com/apache/nuttx/pull/8370#discussion_r1099068077


##########
include/nuttx/net/netconfig.h:
##########
@@ -104,52 +104,48 @@
 
 #define NET_SOCK_PROTOCOL  0
 
-/* SOCK_DGRAM is the preferred socket type to use when we just want a
- * socket for performing driver ioctls.  However, we can't use SOCK_DRAM
- * if UDP is disabled.
- *
- * Pick a socket type (and perhaps protocol) compatible with the currently
- * selected address family.
+/* SOCK_CTRL is the preferred socket type to use when we just want a
+ * socket for performing driver ioctls.
  */
 
 #if NET_SOCK_FAMILY == AF_INET
 #  if defined(CONFIG_NET_UDP)
-#    define NET_SOCK_TYPE SOCK_DGRAM
+#    define NET_SOCK_TYPE SOCK_CTRL

Review Comment:
   let's alwasy define
   NET_SOCK_TYPE SOCK_CTRL and simplify the logic to define NET_SOCK_PROTOCOL



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