print warning if packets with the same time stamp are detected
@@ -260,6 +260,8 @@ FILE *fheapol;
FILE *fhnetwork;
bool tscleanflag;
+bool tssameflag;
+
int endianess;
int pcapreaderrors;
unsigned long long int rawpacketcount;
@@ -273,6 +275,9 @@ uint8_t myaktnonce[32];
uint8_t filtermac[6];
+uint32_t tv_sec_old;
+uint32_t tv_usec_old;
+
char pcapnghwinfo[1024];
char pcapngosinfo[1024];
char pcapngapplinfo[1024];
@@ -535,6 +540,10 @@ if(tscleanflag == true)
{
printf("warning..........................: zero value time stamps detected - this prevents EAPOL timeout calculation\n");
}
+if(tssameflag == true)
+ {
+ printf("warning..........................: packets with same time stamp detected - this prevents EAPOL timeout calculation\n");
+ }
if(wdsframecount != 0)
{
printf("WDS packets......................: %llu\n", wdsframecount);
@@ -5273,6 +5282,12 @@ if((tv_sec == 0) && (tv_usec == 0))
tv_sec = tvtmp.tv_sec;
tv_usec = tvtmp.tv_usec;
}
+else if ((tv_sec == tv_sec_old) && (tv_usec == tv_usec_old))
+ {
+ tssameflag = true;
+ }
+tv_sec_old = tv_sec;
+tv_usec_old = tv_usec;
if(linktype == DLT_NULL)
{
@@ -6098,10 +6113,12 @@ char *pcapngstr = "pcapng";
char *msnetmon1str = "Microsoft NetworkMonitor 1";
char *msnetmon2str = "Microsoft NetworkMonitor 2";
+tscleanflag = false;
+tssameflag = false;
+
versionmajor = 0;
versionminor = 0;
dltlinktype = 0;
-tscleanflag = false;
endianess = 0;
pcapreaderrors = 0;
rawpacketcount = 0;
