mirror of
https://github.com/nmap/nmap.git
synced 2026-01-25 07:39:02 +00:00
Remove vestiges of nsp_settrace.
Now you call nsock_set_log_function then nsock_set_loglevel. http://seclists.org/nmap-dev/2013/q1/72
This commit is contained in:
3
nmap.h
3
nmap.h
@@ -274,9 +274,6 @@ void *realloc();
|
||||
|
||||
#define MAXFALLBACKS 20 /* How many comma separated fallbacks are allowed in the service-probes file? */
|
||||
|
||||
/* The trace level to give to nsp_settrace with --packet-trace et al. */
|
||||
#define NSOCK_TRACE_LEVEL 2
|
||||
|
||||
/* Default maximum send delay between probes to the same host */
|
||||
#ifndef MAX_TCP_SCAN_DELAY
|
||||
#define MAX_TCP_SCAN_DELAY 1000
|
||||
|
||||
@@ -186,7 +186,7 @@ void telnet_event_handler(nsock_pool nsp, nsock_event nse, void *mydata) {
|
||||
}
|
||||
|
||||
void usage() {
|
||||
fprintf(stderr, "\nUsage: nsock_telnet [-s] [-t tracelevel] <hostnameorip> [portnum]\n" " Where -s enables SSL for the connection\n\n");
|
||||
fprintf(stderr, "\nUsage: nsock_telnet [-s] <hostnameorip> [portnum]\n" " Where -s enables SSL for the connection\n\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -199,21 +199,16 @@ int main(int argc, char *argv[]) {
|
||||
struct telnet_state ts;
|
||||
int c;
|
||||
int usessl = 0;
|
||||
int tracelevel = 0;
|
||||
struct timeval now;
|
||||
struct sockaddr_in taddr;
|
||||
|
||||
ts.stdin_nsi = NULL;
|
||||
|
||||
while ((c = getopt(argc, argv, "st:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "s")) != -1) {
|
||||
switch (c) {
|
||||
case 's':
|
||||
usessl = 1;
|
||||
break;
|
||||
case 't':
|
||||
tracelevel = atoi(optarg);
|
||||
assert(tracelevel >= 0);
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
break;
|
||||
@@ -243,8 +238,6 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
gettimeofday(&now, NULL);
|
||||
|
||||
nsp_settrace(nsp, NULL, tracelevel, &now);
|
||||
|
||||
if ((ts.tcp_nsi = nsi_new(nsp, NULL)) == NULL) {
|
||||
fprintf(stderr, "Failed to create new nsock_iod. QUITTING.\n");
|
||||
exit(1);
|
||||
|
||||
@@ -140,8 +140,6 @@ int main(int argc, char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
nsp_settrace(nsp, NULL, 10, NULL);
|
||||
|
||||
ev_ids[num_ids++] = request_timer(nsp, timer_handler, 1800, NULL);
|
||||
ev_ids[num_ids++] = request_timer(nsp, timer_handler, 800, NULL);
|
||||
ev_ids[num_ids++] = request_timer(nsp, timer_handler, 1300, NULL);
|
||||
|
||||
@@ -211,15 +211,6 @@ void nsp_setud(nsock_pool nsp, void *data);
|
||||
* retrieve that data ... */
|
||||
void *nsp_getud(nsock_pool nsp);
|
||||
|
||||
/* Sets a trace/debug level and stream. A level of 0 (the default) turns
|
||||
* tracing off, while higher numbers are more verbose. If the stream given is
|
||||
* NULL, it defaults to stdout. This is generally only used for debugging
|
||||
* purposes. A level of 1 or 2 is usually sufficient, but 10 will ensure you get
|
||||
* everything. The basetime can be NULL to print trace lines with the current
|
||||
* time, otherwise the difference between the current time and basetime will be
|
||||
* used (the time program execution starts would be a good candidate) */
|
||||
void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct timeval *basetime);
|
||||
|
||||
/* Turns on or off broadcast support on new sockets. Default is off (0, false)
|
||||
* set in nsp_new(). Any non-zero (true) value sets SO_BROADCAST on all new
|
||||
* sockets (value of optval will be used directly in the setsockopt() call). */
|
||||
|
||||
Reference in New Issue
Block a user