Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add IPv6 support to IPAddress#169

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

sgryphon
Copy link
Contributor

@sgryphonsgryphon commentedAug 14, 2022
edited
Loading

Some suggested code to add support for IPv6 to the IPAddress class. (Issue#168 )

The public interface changes are minimal:

  • add a type() getter and corresponding enum
  • add three new constructors: one for 16 octets, empty with type specifier, and byte pointer with type specifier
  • add constant for IP6ADDR_ANY (similar function as IPADDR_NONE)

The changes are backward compatible. All of the IPv4 test cases continue to pass without any changes. i.e. Any IPv4 code will continue to get the same outputs for a given inputs.

Test cases added to cover IPv6.

Note: Whilst backwards compatible, this change does increase the memory footprint from 4 bytes to 20 bytes (assuming the enum compiles as an underlying int32_t, I think).

@CLAassistant
Copy link

CLAassistant commentedAug 14, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commentedAug 14, 2022
edited
Loading

Codecov Report

Merging#169 (bcc5233) intomaster (e03b653) willincrease coverage by0.10%.
The diff coverage is97.27%.

@@            Coverage Diff             @@##           master     #169      +/-   ##==========================================+ Coverage   96.00%   96.11%   +0.10%==========================================  Files          13       13                Lines         827      953     +126     ==========================================+ Hits          794      916     +122- Misses         33       37       +4
Impacted FilesCoverage Δ
api/Common.h100.00% <ø> (ø)
api/IPAddress.cpp97.15% <97.22%> (-0.81%)⬇️
api/IPAddress.h100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

Copy link
Contributor

@aentingeraentinger left a comment

Choose a reason for hiding this comment

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

Thank you@sgryphon 🚀 Great work! Also thank you for adding all those test cases! I believe the size increase from 4 to 20 Bytes is an acceptable tradeoff for adding support for IPv6.

@aentingeraentinger merged commitc8ee90f intoarduino:masterAug 22, 2022
@aentingeraentinger mentioned this pull requestAug 22, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@aentingeraentingeraentinger approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@sgryphon@CLAassistant@codecov-commenter@aentinger

[8]ページ先頭

©2009-2025 Movatter.jp