svn commit: r220127 - projects/sv/sys/netinet
Attilio Rao
attilio at FreeBSD.org
Tue Mar 29 15:06:36 UTC 2011
Author: attilio
Date: Tue Mar 29 15:06:36 2011
New Revision: 220127
URL: http://svn.freebsd.org/changeset/base/220127
Log:
Remove bogus debugging knobs.
Modified:
projects/sv/sys/netinet/netdump_client.c
Modified: projects/sv/sys/netinet/netdump_client.c
==============================================================================
--- projects/sv/sys/netinet/netdump_client.c Tue Mar 29 12:38:13 2011 (r220126)
+++ projects/sv/sys/netinet/netdump_client.c Tue Mar 29 15:06:36 2011 (r220127)
@@ -113,9 +113,6 @@ static int netdump_send_arp(void);
static void netdump_trigger(void *arg, int howto);
static int netdump_udp_output(struct mbuf *m);
-#ifdef NETDUMP_CLIENT_DEBUG
-static int sysctl_force_crash(SYSCTL_HANDLER_ARGS);
-#endif
static int sysctl_handle_ifxname(SYSCTL_HANDLER_ARGS);
static int sysctl_handle_inaddr(SYSCTL_HANDLER_ARGS);
@@ -245,41 +242,6 @@ sysctl_handle_inaddr(SYSCTL_HANDLER_ARGS
return (error);
}
-#ifdef NETDUMP_CLIENT_DEBUG
-static int
-sysctl_force_crash(SYSCTL_HANDLER_ARGS)
-{
- int error, force_crash;
-
- force_crash = 0;
- error = sysctl_handle_int(oidp, &force_crash, force_crash, req);
- if (error || req->newptr == NULL)
- return error;
-
- switch (force_crash) {
- case 1:
- printf("\nLivelocking system...\n");
- for (;;);
- break;
- case 2:
- printf("\nPanic'ing system...\n");
- panic("netdump forced crash");
- break;
- case 3:
- critical_enter();
- panic("Forcing spourious critical section");
- break;
- case 4:
- critical_enter();
- printf("\nLivelocking in a critical section\n");
- for (;;);
- default:
- return EINVAL;
- }
- return 0;
-}
-#endif
-
SYSCTL_NODE(_net, OID_AUTO, dump, CTLFLAG_RW, 0, "netdump");
SYSCTL_PROC(_net_dump, OID_AUTO, server, CTLTYPE_STRING|CTLFLAG_RW, &nd_server,
0, sysctl_handle_inaddr, "A", "dump server");
@@ -295,11 +257,7 @@ SYSCTL_INT(_net_dump, OID_AUTO, retries,
"times to retransmit lost packets");
SYSCTL_INT(_net_dump, OID_AUTO, enable, CTLTYPE_INT|CTLFLAG_RW, &nd_enable,
0, "enable network dump");
-#ifdef NETDUMP_CLIENT_DEBUG
-SYSCTL_NODE(_debug, OID_AUTO, netdump, CTLFLAG_RW, NULL, "Netdump debugging");
-SYSCTL_PROC(_debug_netdump, OID_AUTO, crash, CTLTYPE_INT|CTLFLAG_RW, 0,
- sizeof(int), sysctl_force_crash, "I", "force crashing");
-#endif
+
TUNABLE_STR("net.dump.server", nd_server_tun, sizeof(nd_server_tun));
TUNABLE_STR("net.dump.client", nd_client_tun, sizeof(nd_client_tun));
TUNABLE_STR("net.dump.gateway", nd_gw_tun, sizeof(nd_gw_tun));
More information about the svn-src-projects
mailing list