- if src == mac_address or dst == mac_address:
- # Check if timestamp already exists in the map
- # If yes, then just increment the frequency value...
- if time_str in time_freq:
- time_freq[time_str] = time_freq[time_str] + 1
- else: # If not, then put the value one there
- time_freq[time_str] = 1
- return time_freq
+ if incomingoutgoing:
+ if dst == macaddress:
+ # Check if timestamp already exists in the map
+ # If yes, then just increment the frequency value...
+ if timestr in timefreq:
+ timefreq[timestr] = timefreq[timestr] + 1
+ else: # If not, then put the value one there
+ timefreq[timestr] = 1
+ else:
+ if src == macaddress:
+ # Check if timestamp already exists in the map
+ # If yes, then just increment the frequency value...
+ if timestr in timefreq:
+ timefreq[timestr] = timefreq[timestr] + 1
+ else: # If not, then put the value one there
+ timefreq[timestr] = 1
+
+ return timefreq