Logo Search packages:      
Sourcecode: scapy version File versions

def scapy::ScapyPcapWriter::write_packet (   self,
  packet 
)

writes a single packet to the pcap file                      

Definition at line 3954 of file scapy.py.

03954                                       :                                         
                """writes a single packet to the pcap file                      
                """                                                             
                s = str(packet)                                                 
                l = len(s)                                                      
                sec = int(packet.time)                                          
                usec = int((packet.time-sec)*1000000)                           
                self.f.write(struct.pack("IIII", sec, usec, l, l))              
                self.f.write(s)                                                 
                                                                                


Generated by  Doxygen 1.6.0   Back to index