arduino / arduino/ArduinoCore-API
IPAddress toString should use existing printTo algorithm and conform to RFC 5952 canonical format for IPv6 addresses
- 主要言語
- C++
- スター
- 306
- フォーク
- 150
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### API component
IPAddress
### Description
The `toString()` for an IPv6 type address has a different output from `printTo()`, and does not follow the RFC 5952 canonical format. It has an unnecessarily long fixed length format. Note that IPv4 does not use a fixed length format.
Also note that the existing `printTo()` method already implements the RFC 5952 canonical format algorithm, and has extensive tests (there are no tests for the `toString()` method).
The recommendation would be for `toString()` simply to use the existing algorithm from `printTo()` (and add some unit tests for `toString`).
### Is this a breaking change?
No. Both formats are valid string formats for IPv6, and `fromString()` handles both of them (and all other valid formats), as should any other system. The canonical format is usually shorter, but will not exceed the fixed length format, so there is no issue with overruns.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず IPAddress toString() と printTo() の実装から始め、RFC 5952 の正規 IPv6 ケースに対する既存の printTo() テストを確認します。toString() が確立されている printTo() アルゴリズムを使用するようにし、その出力を網羅する単体テストを追加します。完了の条件は、両方のメソッドが期待される正規形式を生成することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- api, networking
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100