- packet1=self.client.rxpacket();
- packet2=self.client.rxpacket();
- if( packet1 != None and packet2 != None):
- print "packets recieved :\n "
- print self.client.packet2parsedstr(packet1);
- print self.client.packet2parsedstr(packet2);
- continue
+ starttime = time.time()
+ while ((time.time() - starttime) < duration):
+ packet = self.client.rxpacket()
+ if( packet == None):
+ continue
+ row = []
+ row.append("%f"%time.time()) #timestamp
+ row.append(0) #error flag (not checkign)
+ row.append("rtrRequest_%d"%i) #comment
+ row.append(duration) #sniff time
+ row.append(1) # filtering boolean
+ for byte in packet:
+ row.append("%02x"%ord(byte));
+ dataWriter.writerow(row)
+ print self.client.packet2parsedstr(packet)
+# packet1=self.client.rxpacket();
+# packet2=self.client.rxpacket();
+# if( packet1 != None and packet2 != None):
+# print "packets recieved :\n "
+# print self.client.packet2parsedstr(packet1);
+# print self.client.packet2parsedstr(packet2);
+# continue
+# elif( packet1 != None):
+# print self.client.packet2parsedstr(packet1)
+# elif( packet2 != None):
+# print self.client.packet2parsedstr(packet2)