zhhyu7 commented on code in PR #17735:
URL: https://github.com/apache/nuttx/pull/17735#discussion_r2654659863
##########
net/socket/net_sockif.c:
##########
@@ -109,6 +125,55 @@ static int ctrl_close(FAR struct socket *psock)
return 0;
}
+/****************************************************************************
+ * Name: ctrl_getsockopt / ctrl_setsockopt
+ *
+ * Description:
+ * Only support IPPROTO_IP and IPPROTO_IPV6.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_NET_SOCKOPTS
+static int ctrl_getsockopt(FAR struct socket *psock, int level, int option,
+ FAR void *value, FAR socklen_t *value_len)
+{
+ switch (level)
+ {
+#ifdef CONFIG_NET_IPv4
+ case IPPROTO_IP:/* IPv4 protocol socket options (see
include/netinet/in.h) */
+ return ipv4_getsockopt(psock, option, value, value_len);
+#endif
+
+#ifdef CONFIG_NET_IPv6
+ case IPPROTO_IPV6:/* IPv6 protocol socket options (see
include/netinet/in.h) */
+ return ipv6_getsockopt(psock, option, value, value_len);
Review Comment:
>
Done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]