Cleanup: detecting the link type is done automatically per handle
This commit is contained in:
12
main.cpp
12
main.cpp
@@ -138,7 +138,6 @@ int main (int argc, char** argv)
|
|||||||
process_init();
|
process_init();
|
||||||
|
|
||||||
device * devices = NULL;
|
device * devices = NULL;
|
||||||
//dp_link_type linktype = dp_link_ethernet;
|
|
||||||
int promisc = 0;
|
int promisc = 0;
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
@@ -172,16 +171,6 @@ int main (int argc, char** argv)
|
|||||||
case 'c':
|
case 'c':
|
||||||
refreshlimit = atoi(optarg);
|
refreshlimit = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case 'f':
|
|
||||||
argv++;
|
|
||||||
if (strcmp (optarg, "ppp") == 0)
|
|
||||||
linktype = dp_link_ppp;
|
|
||||||
else if (strcmp (optarg, "eth") == 0)
|
|
||||||
linktype = dp_link_ethernet;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
default:
|
default:
|
||||||
help(true);
|
help(true);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@@ -332,4 +321,3 @@ int main (int argc, char** argv)
|
|||||||
//clean up
|
//clean up
|
||||||
clean_up();
|
clean_up();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ bool bughuntmode = false;
|
|||||||
bool sortRecv = true;
|
bool sortRecv = true;
|
||||||
// viewMode: kb/s or total
|
// viewMode: kb/s or total
|
||||||
int viewMode = VIEWMODE_KBPS;
|
int viewMode = VIEWMODE_KBPS;
|
||||||
//packet_type packettype = packet_ethernet;
|
|
||||||
//dp_link_type linktype = dp_link_ethernet;
|
|
||||||
const char version[] = " version " VERSION "." SUBVERSION "." MINORVERSION;
|
const char version[] = " version " VERSION "." SUBVERSION "." MINORVERSION;
|
||||||
|
|
||||||
timeval curtime;
|
timeval curtime;
|
||||||
@@ -235,4 +233,3 @@ public:
|
|||||||
const char * devicename;
|
const char * devicename;
|
||||||
handle * next;
|
handle * next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user