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

MinMDNS refactor: support legacy replies and time throttling #4102

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Dec 7, 2020

Problem

mDNS requires 'legacy replies' to include the original query in the response. This was not implemented in minMDNS.

Summary of Changes

Add support for:

  • include queries in mDNS replies for legacy queries
  • throttle replies to 1/sec
  • some readability updates
  • use PacketBufferHandle

- support legacy respones (include query in the response)
- Some refactoring for better readability
Copy link
Contributor

@kpschoedel kpschoedel left a comment

Choose a reason for hiding this comment

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

Approval note — I only paid close attention to PacketBuffer-related code, as I'm not particularly familiar with MDNS.

@mspang mspang merged commit 0e2b4a4 into project-chip:master Dec 8, 2020
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Dec 8, 2020
andy31415 pushed a commit that referenced this pull request Jan 8, 2021
* Convert mdns Builder classes to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer`
directly.

#### Summary of Changes

Convert mdns::Minimal::QueryBuilder and mdns::Minimal::ResponseBuilder
to take and hold PacketBufferHandle.

Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system

* Review: make QueryBuilder take const&

* WIP

* Revise to match ResponseBuilder in #4102

* Restyled by clang-format

* remove PacketReporter.cpp change

Co-authored-by: Restyled.io <[email protected]>
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Jan 8, 2021
…4094)

* Convert mdns Builder classes to use PacketBufferHandle

#### Problem

Code should use `PacketBufferHandle` rather than `PacketBuffer`
directly.

#### Summary of Changes

Convert mdns::Minimal::QueryBuilder and mdns::Minimal::ResponseBuilder
to take and hold PacketBufferHandle.

Part of issue project-chip#2707 - Figure out a way to express PacketBuffer ownership in the type system

* Review: make QueryBuilder take const&

* WIP

* Revise to match ResponseBuilder in project-chip#4102

* Restyled by clang-format

* remove PacketReporter.cpp change

Co-authored-by: Restyled.io <[email protected]>
@andy31415 andy31415 deleted the 03_response_sending_legacy branch October 28, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants