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


##########
include/nuttx/net/usrsock.h:
##########
@@ -83,6 +83,7 @@ enum usrsock_request_types_e
   USRSOCK_REQUEST_ACCEPT,
   USRSOCK_REQUEST_IOCTL,
   USRSOCK_REQUEST_SHUTDOWN,
+  USRSOCK_REQUEST_AVAILABLE,

Review Comment:
   > @xiaoxiang781216 san In my understand, USRSOCK_REQUEST_SOCKET is just for 
setup usrsock daemon socket, and it is done by socket.c. I want to tell usrsock 
can use socket for internet connection or not. So, I added a new I/F.
   
   it is no much difference here. We can move the call of si_setup from 
psock_socket to net_sockif and:
   
   1. Try to call g_usrsock_sockif->si_setup first
   2. continue the normal path if fail
   
   maybe we can change from:
   ```
   FAR const struct sock_intf_s *
   net_sockif(sa_family_t family, int type, int protocol);
   ```
   to:
   ```
   int net_setup(FAR struct socket *psock);
   ```



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

Reply via email to