pkarashchenko commented on code in PR #8739: URL: https://github.com/apache/nuttx/pull/8739#discussion_r1126264765
########## net/netdev/netdev_ioctl.c: ########## @@ -1219,6 +1219,40 @@ static int netdev_imsf_ioctl(FAR struct socket *psock, int cmd, } #endif +/**************************************************************************** + * Name: ioctl_arpreq_parse + * + * Description: + * Parse arpreq into netdev and sockaddr. + * + * Input Parameters: + * req The argument of the ioctl cmd + * dev The pointer to get ethernet driver device structure + * addr The pointer to get address in the request + * + * Returned Value: + * true on success and false on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_NET_ARP +static bool ioctl_arpreq_parse(FAR struct arpreq *req, + FAR struct net_driver_s **dev, + FAR struct sockaddr_in **addr) +{ + if (req != NULL) + { + *addr = (FAR struct sockaddr_in *)&req->arp_pa; + *dev = req->arp_dev[0] ? Review Comment: ```suggestion *dev = req->arp_dev[0] != '\0' ? ``` -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org