wengzhe commented on code in PR #1718: URL: https://github.com/apache/nuttx-apps/pull/1718#discussion_r1173263642
########## netutils/iperf/iperf.c: ########## @@ -196,6 +204,47 @@ static int iperf_show_socket_error_reason(FAR const char *str, int sockfd) return err; } +/**************************************************************************** + * Name: iperf_print_addr + * + * Description: + * Print addr info + * + ****************************************************************************/ + +static void iperf_print_addr(FAR const char *str, FAR struct sockaddr *addr) +{ + switch (addr->sa_family) + { + case AF_INET: + { + FAR struct sockaddr_in *inaddr = (FAR struct sockaddr_in *)addr; + printf("%s: %s:%d\n", str, inet_ntoa(inaddr->sin_addr), + htons(inaddr->sin_port)); Review Comment: Then maybe I can align `htons`'s 'h' with `inet_ntoa`'s 'i' (like newest patch) -- 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