Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148190613
D15855.id44020.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D15855.id44020.diff
View Options
Index: head/cddl/lib/libdtrace/ip.d
===================================================================
--- head/cddl/lib/libdtrace/ip.d
+++ head/cddl/lib/libdtrace/ip.d
@@ -228,11 +228,11 @@
((struct ip *)p)->ip_v == 4 ?
ntohs(((struct ip *)p)->ip_len) - (((struct ip *)p)->ip_hl << 2):
ntohs(((struct ip6_hdr *)p)->ip6_ctlun.ip6_un1.ip6_un1_plen);
- ip_saddr = p == NULL ? 0 :
+ ip_saddr = p == NULL ? "<unknown>" :
((struct ip *)p)->ip_v == 4 ?
inet_ntoa(&((struct ip *)p)->ip_src.s_addr) :
inet_ntoa6(&((struct ip6_hdr *)p)->ip6_src);
- ip_daddr = p == NULL ? 0 :
+ ip_daddr = p == NULL ? "<unknown>" :
((struct ip *)p)->ip_v == 4 ?
inet_ntoa(&((struct ip *)p)->ip_dst.s_addr) :
inet_ntoa6(&((struct ip6_hdr *)p)->ip6_dst);
@@ -246,11 +246,11 @@
ntohs(((struct ip *)m->m_data)->ip_len) -
(((struct ip *)m->m_data)->ip_hl << 2):
ntohs(((struct ip6_hdr *)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen);
- ip_saddr = m == NULL ? 0 :
+ ip_saddr = m == NULL ? "<unknown>" :
((struct ip *)m->m_data)->ip_v == 4 ?
inet_ntoa(&((struct ip *)m->m_data)->ip_src.s_addr) :
inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_src);
- ip_daddr = m == NULL ? 0 :
+ ip_daddr = m == NULL ? "<unknown>" :
((struct ip *)m->m_data)->ip_v == 4 ?
inet_ntoa(&((struct ip *)m->m_data)->ip_dst.s_addr) :
inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_dst);
Index: head/cddl/lib/libdtrace/tcp.d
===================================================================
--- head/cddl/lib/libdtrace/tcp.d
+++ head/cddl/lib/libdtrace/tcp.d
@@ -190,11 +190,11 @@
tcps_active = -1; /* XXX */
tcps_lport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_lport);
tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_fport);
- tcps_laddr = p == NULL ? 0 :
+ tcps_laddr = p == NULL ? "<unknown>" :
p->t_inpcb->inp_vflag == INP_IPV4 ?
inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id6_addr);
- tcps_raddr = p == NULL ? 0 :
+ tcps_raddr = p == NULL ? "<unknown>" :
p->t_inpcb->inp_vflag == INP_IPV4 ?
inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id6_addr);
Index: head/cddl/lib/libdtrace/udp.d
===================================================================
--- head/cddl/lib/libdtrace/udp.d
+++ head/cddl/lib/libdtrace/udp.d
@@ -56,11 +56,11 @@
udps_addr = (uintptr_t)p;
udps_lport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_lport);
udps_rport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_fport);
- udps_laddr = p == NULL ? "" :
+ udps_laddr = p == NULL ? "<unknown>" :
p->inp_vflag == INP_IPV4 ?
inet_ntoa(&p->inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
inet_ntoa6(&p->inp_inc.inc_ie.ie_dependladdr.id6_addr);
- udps_raddr = p == NULL ? "" :
+ udps_raddr = p == NULL ? "<unknown>" :
p->inp_vflag == INP_IPV4 ?
inet_ntoa(&p->inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
inet_ntoa6(&p->inp_inc.inc_ie.ie_dependfaddr.id6_addr);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 17, 9:36 AM (10 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29785854
Default Alt Text
D15855.id44020.diff (3 KB)
Attached To
Mode
D15855: Fix dtrace output of IP addresses as strings
Attached
Detach File
Event Timeline
Log In to Comment