IPv6 cleanup: netstat
Rename the variable for the in6_addr from in6p to ia6 to follow the convention generally used in FreeBSD. No functional changes. MFC after: 3 months Sponsored by: Netflix
This commit is contained in:
parent
a1589eb835
commit
57a44fcd34
@ -1310,7 +1310,7 @@ inet6print(const char *container, struct in6_addr *in6, int port,
|
||||
*/
|
||||
|
||||
char *
|
||||
inet6name(struct in6_addr *in6p)
|
||||
inet6name(struct in6_addr *ia6)
|
||||
{
|
||||
struct sockaddr_in6 sin6;
|
||||
char hbuf[NI_MAXHOST], *cp;
|
||||
@ -1319,7 +1319,7 @@ inet6name(struct in6_addr *in6p)
|
||||
static int first = 1;
|
||||
int flags, error;
|
||||
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(in6p)) {
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(ia6)) {
|
||||
strcpy(line, "*");
|
||||
return (line);
|
||||
}
|
||||
@ -1332,9 +1332,9 @@ inet6name(struct in6_addr *in6p)
|
||||
domain[0] = 0;
|
||||
}
|
||||
memset(&sin6, 0, sizeof(sin6));
|
||||
memcpy(&sin6.sin6_addr, in6p, sizeof(*in6p));
|
||||
memcpy(&sin6.sin6_addr, ia6, sizeof(*ia6));
|
||||
sin6.sin6_family = AF_INET6;
|
||||
/* XXX: in6p.s6_addr[2] can contain scopeid. */
|
||||
/* XXX: ia6.s6_addr[2] can contain scopeid. */
|
||||
in6_fillscopeid(&sin6);
|
||||
flags = (numeric_addr) ? NI_NUMERICHOST : 0;
|
||||
error = getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), hbuf,
|
||||
|
Loading…
Reference in New Issue
Block a user