Commit Graph

24 Commits (63f0516318712df79bd6056558d309df0a3fd55c)

Author SHA1 Message Date
Jonathan Schwartz 63f0516318 Replace concurrentqueue with ringbuffer 2024-04-05 17:24:53 +00:00
Kyle Schwarz cd7b0b0a7b Driver: PCAP: Properly handle RX timeout
If res == 0 the header and data will not be populated because no message
was RXed.
2023-03-29 00:51:38 -04:00
Kyle Schwarz 9b46d486cb Driver: Add TCP support
Device: Close Driver in heartbeat thread on disconnection
2023-03-08 18:32:26 +00:00
Kyle Schwarz f4e4a103ad POSIX: PCAP: Check header & data before using 2022-12-19 03:03:12 -05:00
Paul Hollinsky 781fc2c034 Drivers: Decouple from devices
This allows us to better implement alternative drivers
for devices, such as for device sharing servers or
talking to CoreMini processors within the same device.
2022-03-27 14:30:31 -04:00
Paul Hollinsky 96f18dcfd6 PCAP: Don't use pthread_cancel on Linux
It is not necessary and can cause a crash in libunwind
2021-12-08 14:30:02 -05:00
Paul Hollinsky ac77fe2b56 POSIX: PCAP: Use EthernetPacketizer 2021-09-23 21:31:59 -04:00
Paul Hollinsky 16b88b7787 macOS: PCAP: Fix typo 2021-07-05 23:55:22 -04:00
Paul Hollinsky 02c14aeb35 macOS: PCAP: Add code necessary for device discovery
You will still need chmod_bpf or similar to find devices
2021-06-17 21:07:22 -04:00
Paul Hollinsky 37d06807e4 POSIX: PCAP: Update inferface name to match Windows implementation 2021-06-15 19:09:13 -04:00
Paul Hollinsky 19aabdfacf POSIX: PCAP: Cancel after pcap_breakloop() to EINTR out of poll()
This is necessary as pcap_breakloop() does not actually wake the
thread from blocking operations, such as poll.
2021-06-10 15:17:43 -04:00
Kyle Schwarz 33a84bf8ce PCAP: Switch to pcap_dispatch() 2020-11-17 15:05:14 -05:00
Paul Hollinsky 9dc4b302ef POSIX: PCAP: Enable if permissions are set, with a warning otherwise
On Linux, raw packet capture requires CAP_NET_RAW (or root).

If we can't capture raw packets, we will not be able to find/connect to
devices over ethernet.
2020-09-14 11:51:15 -04:00
Paul Hollinsky a325d8a12b PCAP: Send initial requests from the interface MAC
This allows the device to respond directly to us
2020-09-01 15:53:45 -04:00
Paul Hollinsky 5db07102aa PCAP: Listen for ICS_UNSET_MAC
On newer firmware, the device will address the PC directly after
EnableNetworkComm. Before this, it will set the destination MAC to
00:FC:70:FF:FF:FF.
2020-08-27 12:24:35 -04:00
Paul Hollinsky b5c9443fc8 POSIX: PCAP: Ensure packets get captured
No packets were being captured with a timeout of 0
2020-08-27 12:24:35 -04:00
Paul Hollinsky 38e24d7641 Refactor ICommunication/Transport => Driver 2020-03-09 14:09:27 -04:00
Jeffrey Quesnelle 5112e1d2f9 fix building for macos 2019-08-06 17:14:12 -04:00
EricLiu2000 f41b5c4a79 Removed cancellation of error downgrading after closing, was causing read access violations. 2019-08-01 14:07:42 -04:00
EricLiu2000 66126b2b61 Downgraded non-user thread errors to warnings 2019-07-24 13:22:17 -04:00
EricLiu2000 f45bd6772f Builds and runs on both windows and ubuntu 2019-06-25 13:20:49 -04:00
EricLiu2000 50dba62a89 Event refactor builds on Windows 2019-06-24 17:59:45 -04:00
Paul Hollinsky e081724da6 POSIX PCAP: Resolve a crash on a communication error 2019-05-14 15:22:12 -04:00
Paul Hollinsky 424d3d98a3 Linux Ethernet device support 2019-03-18 11:37:20 -04:00