mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
#ifdef INET6 printing of inpcb IPv6 addresses in DDB. Patch committed
with minor adjustments. Submitted by: Florian C. Smeets <flo at kasimir dot com>
This commit is contained in:
parent
ae0663a383
commit
03dc38a48b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166811
@ -1261,15 +1261,19 @@ db_print_inconninfo(struct in_conninfo *inc, const char *name, int indent)
|
|||||||
|
|
||||||
indent += 2;
|
indent += 2;
|
||||||
|
|
||||||
|
#ifdef INET6
|
||||||
if (inc->inc_flags == 1) {
|
if (inc->inc_flags == 1) {
|
||||||
/* IPv6. */
|
/* IPv6. */
|
||||||
ip6_sprintf(laddr_str, &inc->inc6_laddr);
|
ip6_sprintf(laddr_str, &inc->inc6_laddr);
|
||||||
ip6_sprintf(faddr_str, &inc->inc6_faddr);
|
ip6_sprintf(faddr_str, &inc->inc6_faddr);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
/* IPv4. */
|
/* IPv4. */
|
||||||
inet_ntoa_r(inc->inc_laddr, laddr_str);
|
inet_ntoa_r(inc->inc_laddr, laddr_str);
|
||||||
inet_ntoa_r(inc->inc_faddr, faddr_str);
|
inet_ntoa_r(inc->inc_faddr, faddr_str);
|
||||||
|
#ifdef INET6
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
db_print_indent(indent);
|
db_print_indent(indent);
|
||||||
db_printf("inc_laddr %s inc_lport %u\n", laddr_str,
|
db_printf("inc_laddr %s inc_lport %u\n", laddr_str,
|
||||||
ntohs(inc->inc_lport));
|
ntohs(inc->inc_lport));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user