summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2005-11-19 17:04:52 +0000
committerandre <andre@FreeBSD.org>2005-11-19 17:04:52 +0000
commit7649e1342fd51e2bca52a0cbca9904b6b0f069b7 (patch)
tree7b90ae4b3658682fad480abf3fb2b61b27a600a9 /sys/netinet
parenta9203048910de63fd07e54a38ed908abfcff9b07 (diff)
downloadFreeBSD-src-7649e1342fd51e2bca52a0cbca9904b6b0f069b7.zip
FreeBSD-src-7649e1342fd51e2bca52a0cbca9904b6b0f069b7.tar.gz
Remove 'ipprintfs' which were protected under DIAGNOSTIC. It doesn't
have any know to enable it from userland and could only be enabled by either setting it to 1 at compile time or through the kernel debugger. In the future it may be brought back as KTR tracing points. Discussed with: rwatson Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_input.c16
-rw-r--r--sys/netinet/ip_options.c20
2 files changed, 0 insertions, 36 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 75563f0..9d1a43d 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -145,10 +145,6 @@ static int ip_checkinterface = 0;
SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW,
&ip_checkinterface, 0, "Verify packet arrives on correct interface");
-#ifdef DIAGNOSTIC
-static int ipprintfs = 0;
-#endif
-
struct pfil_head inet_pfil_hook; /* Packet filter hooks */
static struct ifqueue ipintrq;
@@ -1267,14 +1263,6 @@ ip_forward(struct mbuf *m, int srcrt)
struct in_addr dest;
int error, type = 0, code = 0, mtu = 0;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("forward: src %lx dst %lx ttl %x\n",
- (u_long)ip->ip_src.s_addr, (u_long)ip->ip_dst.s_addr,
- ip->ip_ttl);
-#endif
-
-
if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) {
ipstat.ips_cantforward++;
m_freem(m);
@@ -1375,10 +1363,6 @@ ip_forward(struct mbuf *m, int srcrt)
/* Router requirements says to only send host redirects */
type = ICMP_REDIRECT;
code = ICMP_REDIRECT_HOST;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("redirect (%d) to %lx\n", code, (u_long)dest.s_addr);
-#endif
}
}
if (rt)
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
index 2b99306..39126c8 100644
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -382,10 +382,6 @@ save_rte(m, option, dst)
return;
olen = option[IPOPT_OLEN];
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("save_rte: olen %d\n", olen);
-#endif
if (olen > sizeof(opts->ip_srcrt) - (1 + sizeof(dst))) {
m_tag_free((struct m_tag *)opts);
return;
@@ -424,20 +420,12 @@ ip_srcroute(m0)
/* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
m->m_len = opts->ip_nhops * sizeof(struct in_addr) +
sizeof(struct in_addr) + OPTSIZ;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf("ip_srcroute: nhops %d mlen %d", opts->ip_nhops, m->m_len);
-#endif
/*
* First save first hop for return route
*/
p = &(opts->ip_srcrt.route[opts->ip_nhops - 1]);
*(mtod(m, struct in_addr *)) = *p--;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" hops %lx", (u_long)ntohl(mtod(m, struct in_addr *)->s_addr));
-#endif
/*
* Copy option fields and padding (nop) to mbuf.
@@ -454,20 +442,12 @@ ip_srcroute(m0)
* reversing the path (pointers are now aligned).
*/
while (p >= opts->ip_srcrt.route) {
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx", (u_long)ntohl(q->s_addr));
-#endif
*q++ = *p--;
}
/*
* Last hop goes to final destination.
*/
*q = opts->ip_srcrt.dst;
-#ifdef DIAGNOSTIC
- if (ipprintfs)
- printf(" %lx\n", (u_long)ntohl(q->s_addr));
-#endif
m_tag_delete(m0, (struct m_tag *)opts);
return (m);
}
OpenPOWER on IntegriCloud