Skip to content

feat(nfs3_client)!: add prot param to PortmapperClient::getport#161

Merged
Vaiz merged 2 commits into
mainfrom
issue-151-getport-prot
May 2, 2026
Merged

feat(nfs3_client)!: add prot param to PortmapperClient::getport#161
Vaiz merged 2 commits into
mainfrom
issue-151-getport-prot

Conversation

@Vaiz
Copy link
Copy Markdown
Owner

@Vaiz Vaiz commented May 2, 2026

Closes #151

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the nfs3_client portmapper API so PortmapperClient::getport can query ports for an explicit transport protocol instead of always assuming TCP. That brings the client closer to RFC 1057 and makes the low-level portmapper primitive usable for both TCP and UDP service discovery.

Changes:

  • Extend PortmapperClient::getport to accept a prot: u32 transport-protocol argument.
  • Update internal client connection logic to continue requesting TCP service ports explicitly.
  • Update the portmap example to pass IPPROTO_TCP to the new API.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/nfs3_client/src/portmapper.rs Changes the public getport API and request construction to use a caller-supplied protocol.
crates/nfs3_client/src/connect.rs Adapts connection setup to the new getport signature while preserving TCP-based resolution.
crates/nfs3_client/examples/portmap.rs Updates the example client to call the new API with IPPROTO_TCP.

@Vaiz Vaiz marked this pull request as ready for review May 2, 2026 10:06
@Vaiz Vaiz merged commit f2984de into main May 2, 2026
15 checks passed
@Vaiz Vaiz deleted the issue-151-getport-prot branch May 2, 2026 10:14
@github-actions github-actions Bot mentioned this pull request May 2, 2026
@github-actions github-actions Bot mentioned this pull request May 24, 2026
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

Successfully merging this pull request may close these issues.

PortmapperClient::getport should accept the transport-protocol field defined by RFC 1057

2 participants