Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178109088
D15855.1795984663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
D15855.1795984663.diff
View Options
Index: cddl/lib/libdtrace/ip.d
===================================================================
--- cddl/lib/libdtrace/ip.d
+++ 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: cddl/lib/libdtrace/tcp.d
===================================================================
--- cddl/lib/libdtrace/tcp.d
+++ 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: cddl/lib/libdtrace/udp.d
===================================================================
--- cddl/lib/libdtrace/udp.d
+++ 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
Sun, Nov 29, 8:37 PM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42096122
Default Alt Text
D15855.1795984663.diff (3 KB)
Attached To
Mode
D15855: Fix dtrace output of IP addresses as strings
Attached
Detach File
Event Timeline