1- /* $NetBSD: getnameinfo.c,v 1.1 2025/01/27 18:30:19 christos Exp $ */
1+ /* $NetBSD: getnameinfo.c,v 1.2 2025/01/27 19:12:11 wiz Exp $ */
22
33/*
44 * Copyright (c) 2025 The NetBSD Foundation, Inc.
3131
3232#include <sys/cdefs.h>
3333#ifndef lint
34- __RCSID ("$NetBSD: getnameinfo.c,v 1.1 2025/01/27 18:30:19 christos Exp $" );
34+ __RCSID ("$NetBSD: getnameinfo.c,v 1.2 2025/01/27 19:12:11 wiz Exp $" );
3535#endif
3636
3737#include <sys/types.h>
@@ -54,18 +54,18 @@ __RCSID("$NetBSD: getnameinfo.c,v 1.1 2025/01/27 18:30:19 christos Exp $");
5454 * similar to the getnameinfo function in the standard library.
5555 *
5656 * usage:
57- * getnameinfo [-46rufnNHS ] [-p port] <IP-address>
57+ * getnameinfo [-46fHNnrSu ] [-p port] <IP-address>
5858 *
5959 * -4: Restrict lookup to IPv4 addresses only
6060 * -6: Restrict lookup to IPv6 addresses only
61- * -r: Ensure that the name is returned (error if no name is found)
62- * -u: Use UDP instead of the default TCP
6361 * -f: Suppress the fully-qualified domain name (FQDN)
64- * -n: Display the numeric host address instead of the hostname
65- * -N: Display the numeric service name instead of the service name
6662 * -H: Display only the hostname, omitting the service name
67- * -S: Display only the service name, omitting the hostname
63+ * -N: Display the numeric service name instead of the service name
64+ * -n: Display the numeric host address instead of the hostname
6865 * -p: Specify the port number to be used in the lookup
66+ * -r: Ensure that the name is returned (error if no name is found)
67+ * -S: Display only the service name, omitting the hostname
68+ * -u: Use UDP instead of the default TCP
6969 */
7070
7171
@@ -257,6 +257,6 @@ static void __dead
257257usage (void )
258258{
259259 (void )fprintf (stderr , "Usage: %s" , getprogname ());
260- (void )fprintf (stderr , " [-46rufnNHS ] [-p port] <IP-address>\n" );
260+ (void )fprintf (stderr , " [-46fHNnrSu ] [-p port] <IP-address>\n" );
261261 exit (EXIT_FAILURE );
262262}
0 commit comments