mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 05:22:07 +08:00
65a2c62114
* 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 old-commit-hash: e8cb6ea06a2470dd89a6ad8fd17bd1d1b62034cc
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()
|
|
|