mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-24 01:33:50 +08:00
e8cb6ea06a
* too many if * unused * whitespace * key * sefldrive/car/* * no more gctx * lower * start abstracting common events * all cars * start small * all cars * reverse gear * wrongCarMode * wrongGear * espDisabled * steerUnvailable * make linter happy * c isn't used * fix esp_disabled in VW * update ref * more red * more cleanup * fix subaru * update ref
20 lines
439 B
Python
Executable File
20 lines
439 B
Python
Executable File
#!/usr/bin/env python3
|
|
import zmq
|
|
import cereal.messaging as messaging
|
|
from cereal.services import service_list
|
|
import pcap
|
|
|
|
def main():
|
|
ethernetData = messaging.pub_sock('ethernetData')
|
|
|
|
for ts, pkt in pcap.pcap('eth0'):
|
|
dat = messaging.new_message()
|
|
dat.init('ethernetData', 1)
|
|
dat.ethernetData[0].ts = ts
|
|
dat.ethernetData[0].pkt = str(pkt)
|
|
ethernetData.send(dat.to_bytes())
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|