Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EtherCAT Frame and Datagrams support #212

Open
fisherman6v6 opened this issue Sep 5, 2024 · 1 comment
Open

EtherCAT Frame and Datagrams support #212

fisherman6v6 opened this issue Sep 5, 2024 · 1 comment

Comments

@fisherman6v6
Copy link

Hello,

I really appreciate your work on Packet.NET and Sharppcap. I wanted to ask for some help implementing EtherCAT packet dissections natively in Packet.NET. What'd be the best way of doing that in order to achieve the best possible performances?

I've seen that inside the EthernetType enum EtherCAT entry is already present, so I guess it wouldn't be bad to add it to the list of supported packets.

For those unfamiliar with EtherCAT protocol, here you can find the packet structure.

Thank you in advance for your help.

@PhyxionNL
Copy link
Collaborator

I recommend taking a look at the other packets and see how it's done there. One easy example is ArpPacket:
https://github.com/dotpcap/packetnet/blob/master/PacketDotNet/ArpPacket.cs
You should look at the ByteArraySegment ctor first first to parse EtherCAT. Basically what can be should read/write directly from/to the underlying array segment and you'll get the best performance.

Some tests are also needed to verify the read/written data (through pcap files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants