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/10/13 04:02:45 UTC
[GitHub] [incubator-nuttx] anhnt-dev opened a new issue, #7300: How to get IPv4 address with usrsock ioctl?
anhnt-dev opened a new issue, #7300:
URL: https://github.com/apache/incubator-nuttx/issues/7300
With device uses usrsock, how can I get the IPv4 address from ioctl:
``` C
int netlib_get_ipv4addr(FAR const char *ifname, FAR struct in_addr *addr)
{
...
struct ifreq req;
strlcpy(req.ifr_name, ifname, IFNAMSIZ);
ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req);
...
return ret;
}
```
I checked in usrsock_host_ioctl() function, there's no argument was referenced to **_req_** variable.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] anhnt-dev commented on issue #7300: How to get IPv4 address with usrsock ioctl?
Posted by GitBox <gi...@apache.org>.
anhnt-dev commented on issue #7300:
URL: https://github.com/apache/incubator-nuttx/issues/7300#issuecomment-1277025423
>
Thanks @xiaoxiang781216 , a good point to start.
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #7300: How to get IPv4 address with usrsock ioctl?
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on issue #7300:
URL: https://github.com/apache/incubator-nuttx/issues/7300#issuecomment-1277018913
sim's usrsock isn't a full implementation, you can reference one implementation here:
https://github.com/apache/incubator-nuttx-apps/blob/master/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c#L745-L787
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 closed issue #7300: How to get IPv4 address with usrsock ioctl?
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed issue #7300: How to get IPv4 address with usrsock ioctl?
URL: https://github.com/apache/incubator-nuttx/issues/7300
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #7300: How to get IPv4 address with usrsock ioctl?
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on issue #7300:
URL: https://github.com/apache/incubator-nuttx/issues/7300#issuecomment-1277085081
Let's close it now. If you have more question, please reopen this issue.
--
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