diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 271ef8a0102b..634786a8bd12 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -1,517 +1,518 @@ .\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $ .\" $OpenBSD: getaddrinfo.3,v 1.35 2004/12/21 03:40:31 jaredy Exp $ .\" .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000, 2001 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" .Dd June 27, 2022 .Dt GETADDRINFO 3 .Os .Sh NAME .Nm getaddrinfo , .Nm freeaddrinfo .Nd socket address structure to host and service name .Sh SYNOPSIS .In sys/types.h .In sys/socket.h .In netdb.h .Ft int .Fo getaddrinfo .Fa "const char *hostname" "const char *servname" .Fa "const struct addrinfo *hints" "struct addrinfo **res" .Fc .Ft void .Fn freeaddrinfo "struct addrinfo *ai" .Sh DESCRIPTION The .Fn getaddrinfo function is used to get a list of addresses and port numbers for host .Fa hostname and service .Fa servname . It is a replacement for and provides more flexibility than the .Xr gethostbyname 3 and .Xr getservbyname 3 functions. .Pp The .Fa hostname and .Fa servname arguments are either pointers to NUL-terminated strings or the null pointer. An acceptable value for .Fa hostname is either a valid host name or a numeric host address string consisting of a dotted decimal IPv4 address, an IPv6 address, or a UNIX-domain address. The .Fa servname is either a decimal port number or a service name listed in .Xr services 5 . At least one of .Fa hostname and .Fa servname must be non-null. .Pp .Fa hints is an optional pointer to a .Li struct addrinfo , as defined by .Aq Pa netdb.h : .Bd -literal struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, .. */ int ai_family; /* AF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ socklen_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; .Ed .Pp This structure can be used to provide hints concerning the type of socket that the caller supports or wishes to use. The caller can supply the following structure elements in .Fa hints : .Bl -tag -width "ai_socktypeXX" .It Fa ai_family The address family that should be used. When .Fa ai_family is set to .Dv AF_UNSPEC , it means the caller will accept any address family supported by the operating system. .It Fa ai_socktype Denotes the type of socket that is wanted: .Dv SOCK_STREAM , .Dv SOCK_DGRAM , .Dv SOCK_SEQPACKET , or .Dv SOCK_RAW . When .Fa ai_socktype is zero the caller will accept any socket type. .It Fa ai_protocol Indicates which transport protocol is desired, .Dv IPPROTO_UDP , .Dv IPPROTO_TCP , .Dv IPPROTO_SCTP , or .Dv IPPROTO_UDPLITE . If .Fa ai_protocol is zero the caller will accept any protocol. .It Fa ai_flags The .Fa ai_flags field to which the .Fa hints parameter points shall be set to zero or be the bitwise-inclusive OR of one or more of the values .Dv AI_ADDRCONFIG , .Dv AI_ALL , .Dv AI_CANONNAME , .Dv AI_NUMERICHOST , .Dv AI_NUMERICSERV , .Dv AI_PASSIVE and .Dv AI_V4MAPPED . For a UNIX-domain address, .Fa ai_flags is ignored. .Bl -tag -width "AI_CANONNAMEXX" .It Dv AI_ADDRCONFIG If the .Dv AI_ADDRCONFIG bit is set, IPv4 addresses shall be returned only if an IPv4 address is configured on the local system, and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system. .It Dv AI_ALL If the .Dv AI_ALL flag is used with the .Dv AI_V4MAPPED flag, then .Fn getaddrinfo shall return all matching IPv6 and IPv4 addresses. .Pp For example, when using the DNS, queries are made for both AAAA records and A records, and .Fn getaddrinfo returns the combined results of both queries. Any IPv4 addresses found are returned as IPv4-mapped IPv6 addresses. .Pp The .Dv AI_ALL flag without the .Dv AI_V4MAPPED flag is ignored. .It Dv AI_CANONNAME If the .Dv AI_CANONNAME bit is set, a successful call to .Fn getaddrinfo will return a NUL-terminated string containing the canonical name of the specified hostname in the .Fa ai_canonname element of the first .Li addrinfo structure returned. .It Dv AI_NUMERICHOST If the .Dv AI_NUMERICHOST bit is set, it indicates that .Fa hostname should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. .It Dv AI_NUMERICSERV If the .Dv AI_NUMERICSERV bit is set, then a non-null .Fa servname string supplied shall be a numeric port string. Otherwise, an .Dv EAI_NONAME error shall be returned. This bit shall prevent any type of name resolution service (for example, NIS+) from being invoked. .It Dv AI_PASSIVE If the .Dv AI_PASSIVE bit is set it indicates that the returned socket address structure is intended for use in a call to .Xr bind 2 . In this case, if the .Fa hostname argument is the null pointer, then the IP address portion of the socket address structure will be set to .Dv INADDR_ANY for an IPv4 address or .Dv IN6ADDR_ANY_INIT for an IPv6 address. .Pp If the .Dv AI_PASSIVE bit is not set, the returned socket address structure will be ready for use in a call to .Xr connect 2 for a connection-oriented protocol or .Xr connect 2 , .Xr sendto 2 , or .Xr sendmsg 2 if a connectionless protocol was chosen. The .Tn IP address portion of the socket address structure will be set to the loopback address if .Fa hostname is the null pointer and .Dv AI_PASSIVE is not set. .It Dv AI_V4MAPPED If the .Dv AI_V4MAPPED flag is specified along with an ai_family of .Dv AF_INET6 , then .Fn getaddrinfo shall return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses ( .Fa ai_addrlen shall be 16). .Pp For example, when using the DNS, if no AAAA records are found then a query is made for A records and any found are returned as IPv4-mapped IPv6 addresses. .Pp The .Dv AI_V4MAPPED flag shall be ignored unless .Fa ai_family equals .Dv AF_INET6 . .El .El .Pp All other elements of the .Li addrinfo structure passed via .Fa hints must be zero or the null pointer. .Pp If .Fa hints is the null pointer, .Fn getaddrinfo behaves as if the caller provided a .Li struct addrinfo with .Fa ai_family set to .Dv AF_UNSPEC and all other elements set to zero or .Dv NULL . .Pp After a successful call to .Fn getaddrinfo , .Fa *res is a pointer to a linked list of one or more .Li addrinfo structures. The list can be traversed by following the .Fa ai_next pointer in each .Li addrinfo structure until a null pointer is encountered. Each returned .Li addrinfo structure contains three members that are suitable for a call to .Xr socket 2 : .Fa ai_family , .Fa ai_socktype , and .Fa ai_protocol . For each .Li addrinfo structure in the list, the .Fa ai_addr member points to a filled-in socket address structure of length .Fa ai_addrlen . .Pp This implementation of .Fn getaddrinfo allows numeric IPv6 address notation with scope identifier, as documented in chapter 11 of RFC 4007. By appending the percent character and scope identifier to addresses, one can fill the .Li sin6_scope_id field for addresses. This would make management of scoped addresses easier and allows cut-and-paste input of scoped addresses. .Pp At this moment the code supports only link-local addresses with the format. The scope identifier is hardcoded to the name of the hardware interface associated with the link .Po such as .Li ne0 .Pc . An example is .Dq Li fe80::1%ne0 , which means .Do .Li fe80::1 on the link associated with the .Li ne0 interface .Dc . .Pp The current implementation assumes a one-to-one relationship between the interface and link, which is not necessarily true from the specification. .Pp All of the information returned by .Fn getaddrinfo is dynamically allocated: the .Li addrinfo structures themselves as well as the socket address structures and the canonical host name strings included in the .Li addrinfo structures. .Pp Memory allocated for the dynamically allocated structures created by a successful call to .Fn getaddrinfo is released by the .Fn freeaddrinfo function. The .Fa ai pointer should be a .Li addrinfo structure created by a call to .Fn getaddrinfo . .Sh IMPLEMENTATION NOTES The behavior of .Li freeaddrinfo(NULL) is left unspecified by both .St -susv4 and .Dv "RFC 3493" . The current implementation ignores a .Dv NULL argument for compatibility with programs that rely on the implementation details of other operating systems. .Sh RETURN VALUES .Fn getaddrinfo returns zero on success or one of the error codes listed in .Xr gai_strerror 3 if an error occurs. .Sh EXAMPLES The following code tries to connect to .Dq Li www.kame.net service .Dq Li http via a stream socket. It loops through all the addresses available, regardless of address family. If the destination resolves to an IPv4 address, it will use an .Dv AF_INET socket. Similarly, if it resolves to IPv6, an .Dv AF_INET6 socket is used. Observe that there is no hardcoded reference to a particular address family. The code works even if .Fn getaddrinfo returns addresses that are not IPv4/v6. .Bd -literal -offset indent struct addrinfo hints, *res, *res0; int error; int s; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); /* NOTREACHED */ } s = -1; for (res = res0; res; res = res->ai_next) { s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s < 0) { cause = "socket"; continue; } if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { cause = "connect"; close(s); s = -1; continue; } break; /* okay we got one */ } if (s < 0) { err(1, "%s", cause); /* NOTREACHED */ } freeaddrinfo(res0); .Ed .Pp The following example tries to open a wildcard listening socket onto service .Dq Li http , for all the address families available. .Bd -literal -offset indent struct addrinfo hints, *res, *res0; int error; int s[MAXSOCK]; int nsock; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); if (error) { errx(1, "%s", gai_strerror(error)); /* NOTREACHED */ } nsock = 0; for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { s[nsock] = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s[nsock] < 0) { cause = "socket"; continue; } if (bind(s[nsock], res->ai_addr, res->ai_addrlen) < 0) { cause = "bind"; close(s[nsock]); continue; } (void) listen(s[nsock], 5); nsock++; } if (nsock == 0) { err(1, "%s", cause); /* NOTREACHED */ } freeaddrinfo(res0); .Ed .Sh SEE ALSO .Xr bind 2 , .Xr connect 2 , .Xr send 2 , .Xr socket 2 , .Xr gai_strerror 3 , .Xr gethostbyname 3 , .Xr getnameinfo 3 , .Xr getservbyname 3 , .Xr resolver 3 , .Xr inet 4 , .Xr inet6 4 , .Xr unix 4 , .Xr hosts 5 , .Xr resolv.conf 5 , .Xr services 5 , -.Xr hostname 7 +.Xr hostname 7 , +.Xr ip6addrctl 8 .Rs .%A R. Gilligan .%A S. Thomson .%A J. Bound .%A J. McCann .%A W. Stevens .%T Basic Socket Interface Extensions for IPv6 .%R RFC 3493 .%D February 2003 .Re .Rs .%A S. Deering .%A B. Haberman .%A T. Jinmei .%A E. Nordmark .%A B. Zill .%T "IPv6 Scoped Address Architecture" .%R RFC 4007 .%D March 2005 .Re .Rs .%A Craig Metz .%T Protocol Independence Using the Sockets API .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re .Sh STANDARDS The .Fn getaddrinfo function is defined by the .St -p1003.1-2004 specification and documented in .Dv "RFC 3493" , .Dq Basic Socket Interface Extensions for IPv6 . diff --git a/usr.bin/getaddrinfo/getaddrinfo.1 b/usr.bin/getaddrinfo/getaddrinfo.1 index ff99cd1ea1ee..fa9e8adce6a2 100644 --- a/usr.bin/getaddrinfo/getaddrinfo.1 +++ b/usr.bin/getaddrinfo/getaddrinfo.1 @@ -1,179 +1,180 @@ .\" $NetBSD: getaddrinfo.1,v 1.5 2014/04/22 06:02:06 wiz Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This documentation is derived from text contributed to The NetBSD .\" Foundation by Taylor R. Campbell. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd March 20, 2017 .Dt GETADDRINFO 1 .Os .Sh NAME .Nm getaddrinfo .Nd resolve names to socket addresses .Sh SYNOPSIS .Nm .Op Fl cNnP .Op Fl f Ar family .Op Fl p Ar protocol .Op Fl s Ar service Ns Op Ns / Ns Ar protocol .Op Fl t Ar socktype .Op Ar hostname .Sh DESCRIPTION The .Nm utility resolves host and service names to socket addresses with .Xr getaddrinfo 3 and prints them to standard output in a user-friendly format. .Pp The output is a sequence of lines with space-separated fields: .Pp .Dl socket-type address-family protocol [af-specific data ...] .Pp For the .Dq inet and .Dq inet6 address families, the af-specific data are the IP/IPv6 address and port number. .Pp Depending on the settings in .Xr nsswitch.conf 5 , .Nm might query DNS for answers. However, it is not intended to be a general-purpose DNS query utility. Use .Xr drill 1 for that. .Pp These options are available: .Bl -tag -width Ds .It Fl c Look up a canonical name as if with the .Dv AI_CANONNAME flag to .Xr getaddrinfo 3 and print it on the first line before the socket addresses. .It Fl f Ar family Specify an address family. Address families are named like the .Dv AF_... constants for address family numbers in the .Aq Pa sys/socket.h header file but without the .Dv AF_ prefix and lowercase. For example, .Dq inet corresponds with .Dv AF_INET . .It Fl N Treat the service as numeric and do not attempt service name resolution, as if with the .Dv AI_NUMERICSERV flag to .Xr getaddrinfo 3 . .It Fl n Treat the hostname as a numeric address and do not attempt name resolution, as if with the .Dv AI_NUMERICHOST flag to .Xr getaddrinfo 3 . .It Fl P Return socket addresses intended for use with .Xr bind 2 , as if with the .Dv AI_PASSIVE flag to .Xr getaddrinfo 3 . By default, the socket addresses are intended for use with .Xr connect 2 , .Xr sendto 2 , or .Xr sendmsg 2 . .It Fl p Ar protocol Specify a protocol. Protocols are numeric or symbolic as listed in .Xr protocols 5 . .It Fl s Ar service Ns Op Ns / Ns Ar protocol Specify a service to look up. Services are symbolic or numeric with an optional protocol suffix as listed in .Xr services 5 . If a service is not specified, a hostname is required. .It Fl t Ar socktype Specify a socket type. Socket types are named like the .Dv SOCK_... constants for socket type numbers in the .Aq Pa sys/socket.h header file but without the .Dv SOCK_ prefix and lowercase. For example, .Dq dgram corresponds with .Dv SOCK_DGRAM . .El .Sh EXIT STATUS .Ex -std getaddrinfo .Sh EXAMPLES Look up .Dq www.NetBSD.org : .Bd -literal -offset indent $ getaddrinfo www.NetBSD.org dgram inet6 udp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0 dgram inet udp 149.20.53.67 0 stream inet6 tcp 2001:4f8:3:7:2e0:81ff:fe52:9ab6 0 stream inet tcp 149.20.53.67 0 .Ed .Pp The port number here is zero because no service was specified. .Pp Look up .Dq morden.NetBSD.org for stream sockets on port 80, and show the canonical name: .Bd -literal -offset indent $ getaddrinfo -c -t stream -s 80 morden.NetBSD.org canonname ftp.NetBSD.org stream inet6 tcp 2001:470:1f05:3d::21 80 stream inet tcp 199.233.217.249 80 .Ed .Sh SEE ALSO .Xr drill 1 , .Xr getent 1 , .Xr getaddrinfo 3 , .Xr getnameinfo 3 , .Xr resolver 3 , .Xr hosts 5 , .Xr nsswitch.conf 5 , .Xr protocols 5 , .Xr resolv.conf 5 , -.Xr services 5 +.Xr services 5 , +.Xr ip6addrctl 8 .Sh HISTORY The .Nm command first appeared in .Nx 7.0 . diff --git a/usr.sbin/ip6addrctl/ip6addrctl.8 b/usr.sbin/ip6addrctl/ip6addrctl.8 index cf8f1db4a8bd..50245cef91ea 100644 --- a/usr.sbin/ip6addrctl/ip6addrctl.8 +++ b/usr.sbin/ip6addrctl/ip6addrctl.8 @@ -1,127 +1,129 @@ .\" $KAME: ip6addrctl.8,v 1.3 2003/03/22 05:56:41 jinmei Exp $ .\" .\" Copyright (C) 2001 WIDE Project. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the project nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd August 10, 2024 .Dt IP6ADDRCTL 8 .Os .\" .Sh NAME .Nm ip6addrctl .Nd configure address selection policy for IPv6 and IPv4 .\" .Sh SYNOPSIS .Nm .Op Cm show .Nm .Cm add .Ar prefix precedence label .Nm .Cm delete .Ar prefix .Nm .Cm flush .Nm .Cm install .Ar configfile .\" .Sh DESCRIPTION The .Nm utility manages the policy table of source and destination address selection for outgoing IPv4 and IPv6 packets. When .Nm is invoked without an argument or with a single argument .Cm show , it prints the content of the policy table currently installed in the kernel. .Pp To modify the table, the following operations are available: .Bl -tag -width indent .It Cm add Ar prefix precedence label Add a policy entry. The .Ar prefix argument is an IPv6 prefix, which is a key for the entry. An IPv4 prefix should be specified with an IPv6 prefix using an IPv4-mapped IPv6 address. The .Ar precedence and .Ar label arguments are decimal numbers, which specify the precedence and label values for the entry, respectively. This operation should be performed without an existing entry for the prefix. .It Cm delete Ar prefix Delete a policy entry specified by .Ar prefix , which should be an IPv6 prefix. A corresponding entry for the prefix should have already been installed. .It Cm flush Delete all existing policy entries in the kernel. .It Cm install Ar configfile Install policy entries from a configuration file named .Ar configfile . The configuration file should contain a set of policy entries. Each entry is specified in a single line which contains an IPv6 prefix, a decimal precedence value, and a decimal label value, separated with white space or tab characters. In the configuration file, lines beginning with the pound-sign .Pq Ql # are comments and are ignored. .El .\" .Sh EXIT STATUS .Ex -std .\" .Sh SEE ALSO +.Xr getaddrinfo 1 , +.Xr getaddrinfo 3 .Rs .%A "Dave Thaler" .%A "Richard Draves" .%A "Arifumi Matsumoto" .%A "Tim Chown" .%T "Default Address Selection for Internet Protocol Version 6 (IPv6)" .%R RFC 6724 .Re .\" .Sh HISTORY The .Nm utility first appeared in the KAME IPv6 protocol stack kit. The original command name was .Nm addrselect , but it was then renamed to the current one so that the name would describe its function well. .\" .Sh BUGS .\" (to be written)