def main(): # Test 0x8091 packet processing # Test 0x8092 packet processing print "Begin 0x8092 Good Test"; pkt = gen_8092_pkt(); values = PCAPReader.parse_8092_packet(pkt); print "Number of bit errors: " + str(values[0]); print "Bit error positions: ", values[1]; print "Begin 0x8092 Bad Test"; pkt = gen_bad_8092_pkt(); values = PCAPReader.parse_8092_packet(pkt); print "Number of bit errors: " + str(values[0]); print "Bit error positions: ", values[1];
def main(): # Test 0x8091 packet processing # Test 0x8092 packet processing print "Begin 0x8092 Good Test"; pkt = gen_8092_pkt(); values = PCAPReader.parse_8092_packet(pkt); print "Number of bit errors: " + str(values[0]); print "Bit error positions: ", values[1]; print "Begin 0x8092 Bad Test"; pkt = gen_bad_8092_pkt(); values = PCAPReader.parse_8092_packet(pkt); print "Number of bit errors: " + str(values[0]); print "Bit error positions: ", values[1]; """ print "Begin Output to file test"; dataContainer = PCAPReader.DataContainer(); dataContainer.fillPktInfo_8091(PCAPReader.parse_8091_packet(gen_8091_pkt())); dataContainer.fillPktInfo_8092(PCAPReader.parse_8092_packet(gen_bad_8092_pkt())); dataContainer.writeToFile('Iteration1.csv'); print "Done." """ #PCAPReader.RunPCAPRead(filename); PCAPReader.RunTrial(1000, 'eth7', "Iteration1.pcap");