Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142899107
D42253.id128914.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D42253.id128914.diff
View Options
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -1065,18 +1065,11 @@
}
#ifdef DDB
-struct llentry_sa {
- struct llentry base;
- struct sockaddr l3_addr;
-};
-
static void
-llatbl_lle_show(struct llentry_sa *la)
+llatbl_lle_show(struct llentry *lle)
{
- struct llentry *lle;
uint8_t octet[6];
- lle = &la->base;
db_printf("lle=%p\n", lle);
db_printf(" lle_next=%p\n", lle->lle_next.cle_next);
db_printf(" lle_lock=%p\n", &lle->lle_lock);
@@ -1097,15 +1090,15 @@
octet[0], octet[1], octet[2], octet[3], octet[4], octet[5]);
db_printf(" lle_timer=%p\n", &lle->lle_timer);
- switch (la->l3_addr.sa_family) {
+ switch (lle->lle_tbl->llt_af) {
#ifdef INET
case AF_INET:
{
- struct sockaddr_in *sin;
+ struct sockaddr_in sin;
char l3s[INET_ADDRSTRLEN];
- sin = (struct sockaddr_in *)&la->l3_addr;
- inet_ntoa_r(sin->sin_addr, l3s);
+ lltable_fill_sa_entry(lle, (struct sockaddr *)&sin);
+ (void) inet_ntop(AF_INET, &sin.sin_addr, l3s, sizeof(l3s));
db_printf(" l3_addr=%s\n", l3s);
break;
}
@@ -1113,17 +1106,17 @@
#ifdef INET6
case AF_INET6:
{
- struct sockaddr_in6 *sin6;
+ struct sockaddr_in6 sin6;
char l3s[INET6_ADDRSTRLEN];
- sin6 = (struct sockaddr_in6 *)&la->l3_addr;
- ip6_sprintf(l3s, &sin6->sin6_addr);
+ lltable_fill_sa_entry(lle, (struct sockaddr *)&sin6);
+ (void) inet_ntop(AF_INET6, &sin6.sin6_addr, l3s, sizeof(l3s));
db_printf(" l3_addr=%s\n", l3s);
break;
}
#endif
default:
- db_printf(" l3_addr=N/A (af=%d)\n", la->l3_addr.sa_family);
+ db_printf(" l3_addr=N/A (af=%d)\n", lle->lle_tbl->llt_af);
break;
}
}
@@ -1136,7 +1129,7 @@
return;
}
- llatbl_lle_show((struct llentry_sa *)addr);
+ llatbl_lle_show((struct llentry *)addr);
}
static void
@@ -1150,7 +1143,7 @@
for (i = 0; i < llt->llt_hsize; i++) {
CK_LIST_FOREACH(lle, &llt->lle_head[i], lle_next) {
- llatbl_lle_show((struct llentry_sa *)lle);
+ llatbl_lle_show(lle);
if (db_pager_quit)
return;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 1:51 PM (5 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27944672
Default Alt Text
D42253.id128914.diff (2 KB)
Attached To
Mode
D42253: lltable: fix ddb show llentry l3_addr pretty printer
Attached
Detach File
Event Timeline
Log In to Comment