Repository navigation
Implement EtherNet/IP and CIP library - #1
Merged
Merged
Conversation
Initial implementation of the EtherNet/IP stack: the cip and encap codecs with a generated catalog of CIP codes, the explicit messaging client (unconnected, routed, Class 3), the implicit I/O runtime, the scanner and the adapter server with the standard objects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The eds package parses, validates, formats, builds and generates Go from Electronic Data Sheets. internal/cmd/interopnode puts the library behind the ethernetip-interop container contract; interop/ (build tag interop) runs it against OpENer, cpppo, EIPScanner and pycomm3. Fixes found by tests and fuzzing: a panic on a malformed Multiple Service Packet, 32-bit class IDs truncated, unbounded template recursion in logix, UDP ListIdentity reporting 0.0.0.0, multicast membership on the I/O socket, Logix partial transfers ending mid-element, Write Tag tolerance of pycomm3's duplicated requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes: requests with short deadlines no longer close the shared session (write deadlines come from the client's timeout); two concurrent Forward_Opens can no longer both own an output assembly; a timed-out RegisterSession matches ErrTimeout; Class 3 timeouts above 610 hours no longer wrap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…OConfig The Ethernet Link interface flags reported half duplex (0x0D) where full duplex was meant (0x0F). Listen's documentation now says the UDP socket uses the TCP port. IOConfig.Output and Idle let a scanner start a connection with its first outputs, in idle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- client: the target closes the connection after UnRegisterSession; the reader could see that first and report the application's Close as a lost connection to metrics and state handlers. - implicit test: a broadcast send does not fail on Linux; use an IPv6 destination, which an IPv4 socket cannot reach anywhere. - .gitattributes: LF endings, so that generated and golden files compare on Windows. - e2e and scanner tests: a timeout multiplier of 2 for short RPIs, which coarse timers on loaded runners otherwise time out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
The corrupting proxy could flip a bit of the RegisterSession reply of the test's own initial dial, which the client rightly refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The interop suite passes against the published images: 49 pass, 0 fail, 10 not applicable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Go's race detector does not support windows/arm64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Serve on a server whose Close had started could add to the WaitGroup Close waits on; it now returns ErrClosed. Found by the race detector on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First implementation of go-ethernetip: a pure Go EtherNet/IP and CIP library with no dependencies (Go 1.23+).
What's in it
cip,encap,implicit: codecs (CIP messages, EPATH, Connection Manager services, encapsulation, CPF, I/O datagrams) and a catalog of CIP codes generated fromcip/catalog.json, each code with its public source.client: explicit messaging (unconnected, routed via Unconnected_Send, Class 3), Forward_Open/Close, discovery.scanner: Class 0/1 I/O (point-to-point, multicast, exclusive owner / input only / listen only, run/idle, reconnect).server: adapter with Identity, Message Router, Assembly, Connection Manager, Port, TCP/IP Interface, Ethernet Link; Class 0/1/3 target connections.logix: Rockwell Logix tag services (vendor specific) and a tag-server emulation.eds: EDS parse, validate, format, build, generate Go.Evidence (local, darwin/arm64 and linux/arm64 in Docker)
-race(make coverage-check, gate 90%).INTEROPERABILITY.md).This is the first CI run on GitHub: amd64, Windows and macOS Intel have not been exercised yet. The interop workflow pins
ethernetip-interopv0.1.0 images, which are published only once otfabric/ethernetip-interop is tagged, so that workflow is expected to fail until then.Full report:
docs/DELIVERY_REPORT.md. Not ODVA conformance tested; CIP Security is TLS only (docs/STANDARDS.md,docs/LIMITATIONS.md).🤖 Generated with Claude Code