Skip to content

[ul] Implement generic Extended Negotiation#734

Open
pgimeno4d wants to merge 3 commits intoEnet4:masterfrom
pgimeno4d:implement-extended-negotiation
Open

[ul] Implement generic Extended Negotiation#734
pgimeno4d wants to merge 3 commits intoEnet4:masterfrom
pgimeno4d:implement-extended-negotiation

Conversation

@pgimeno4d
Copy link
Contributor

@pgimeno4d pgimeno4d commented Feb 3, 2026

Add a Negotiation trait which contains, for the moment, the extended_negotiation method. In future it can also help implement Role Selection negotiation (#731) and possibly other currently unimplemented features like Common Extended Negotiation. Note I'm also interested in #731 and will probably submit a patch if this one is merged, as it will depend on said trait.

This is a case where the client and the server differ substantially. The Negotiation trait is only for the server; the client just adds pairs SOP Class / Byte array. After the association succeeds, they both have the same set of pairs, which they can look up to determine which extended options are active, through the new method extended_negotiation_for(sop_class_uid: &str) or by walking the user_variables().

Everything is quite low-level, to cover for all current and hopefully future versions of the standard. It's easy to send invalid bytes, for instance.

I'm not quite sure if this is a breaking change. It did not break anything in our application, which is a server. The addition of a new generic concerned me a bit.

Edit: Forgot to mention, this obviously depends on #727, otherwise the bytestream is not correct.

@pgimeno4d pgimeno4d force-pushed the implement-extended-negotiation branch from 9cd9c0a to c9ad719 Compare February 9, 2026 06:58
(Clippy nitpicking)
For the Storage SOP Classes used with C-STORE (PS3.4 B.3.1.1 and B.3.1.2), bytes can have values other than 0 or 1, so the sentence was wrong.
@pgimeno4d
Copy link
Contributor Author

pgimeno4d commented Feb 9, 2026

Rebased on top of #727 so that it can be properly tested with that change applied.

@Enet4 Enet4 added A-lib Area: library C-ul Crate: dicom-ul labels Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library C-ul Crate: dicom-ul

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments