loggerd: remove obsolete ethernetsniffer.py (#22139)
	
		
	
				
					
				
			
							parent
							
								
									4a79692092
								
							
						
					
					
						commit
						8bca70878f
					
				
				 1 changed files with 0 additions and 17 deletions
			
			
		@ -1,17 +0,0 @@ | 
				
			|||||||
#!/usr/bin/env python3 | 
					 | 
				
			||||||
# pylint: skip-file | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import cereal.messaging as messaging | 
					 | 
				
			||||||
import pcap | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def main(): | 
					 | 
				
			||||||
  ethernetData = messaging.pub_sock('ethernetData') | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  for ts, pkt in pcap.pcap('eth0'): | 
					 | 
				
			||||||
    dat = messaging.new_message('ethernetData', 1) | 
					 | 
				
			||||||
    dat.ethernetData[0].ts = ts | 
					 | 
				
			||||||
    dat.ethernetData[0].pkt = str(pkt) | 
					 | 
				
			||||||
    ethernetData.send(dat.to_bytes()) | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if __name__ == "__main__": | 
					 | 
				
			||||||
  main() | 
					 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue