Skip to content

Comments

netinet: add ipv6 address ioctl macros#447

Merged
rmikielis merged 1 commit intomasterfrom
rmikielis/ifconfig-ipv6-support
Oct 23, 2025
Merged

netinet: add ipv6 address ioctl macros#447
rmikielis merged 1 commit intomasterfrom
rmikielis/ifconfig-ipv6-support

Conversation

@rmikielis
Copy link
Contributor

@rmikielis rmikielis commented Oct 10, 2025

JIRA RTOS-1160

add psh/ifconfig feature to show ipv6 address assigned

Description

Dependency tree:
phoenix-rtos/phoenix-rtos-utils#246

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (ia32-QEMU / imxrt-1064evk).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@gemini-code-assist
Copy link

Summary of Changes

Hello @rmikielis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces essential updates to the networking stack to enhance IPv6 support. The primary goal is to enable the display of assigned IPv6 addresses through tools like ifconfig by providing the necessary IOCTL macros and address structure definitions. These changes lay the groundwork for more robust IPv6 address management and visibility within the system.

Highlights

  • IPv6 IOCTL Macros: New macros like SIOCGIFADDR_IN6 have been added to include/net/if6.h to facilitate retrieving IPv6 addresses and other interface information.
  • in6_ifreq Structure Enhancements: The struct in6_ifreq in include/net/if6.h has been updated with convenience macros (e.g., ifr_addr6, ifr_flags6) for easier access to its union members, and ifru_flags was removed.
  • Global IPv6 Address Detection: A new macro, IN6_IS_ADDR_GLOBAL, has been introduced in include/netinet/in.h to identify unicast global IPv6 addresses.
  • LWIP IPv6 Configuration: The LWIP_IPV6_NUM_ADDRESSES macro has been defined in include/net/if6.h to configure the number of IPv6 addresses for LWIP.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces new ioctl macros to support IPv6 address handling, which is a dependency for an ifconfig feature. The changes are mostly in header files, defining new structures, macros, and ioctl commands. While the additions are functionally relevant, I've identified a critical issue with conflicting ioctl command numbers that must be addressed. There is also a suggestion to improve code maintainability.

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

Unit Test Results

9 442 tests   8 853 ✅  48m 41s ⏱️
  544 suites    589 💤
    1 files        0 ❌

Results for commit a4d2724.

♻️ This comment has been updated with latest results.

@rmikielis rmikielis force-pushed the rmikielis/ifconfig-ipv6-support branch from 66fa422 to b2fea05 Compare October 10, 2025 12:44
@rmikielis rmikielis force-pushed the rmikielis/ifconfig-ipv6-support branch from b2fea05 to 37283cd Compare October 20, 2025 13:22
@rmikielis rmikielis force-pushed the rmikielis/ifconfig-ipv6-support branch from 37283cd to 145cd8b Compare October 21, 2025 09:08
@rmikielis rmikielis force-pushed the rmikielis/ifconfig-ipv6-support branch from 145cd8b to 52e84b1 Compare October 21, 2025 09:12
@rmikielis rmikielis force-pushed the rmikielis/ifconfig-ipv6-support branch from 52e84b1 to a4d2724 Compare October 22, 2025 10:41
@rmikielis rmikielis merged commit 1742c37 into master Oct 23, 2025
39 checks passed
@rmikielis rmikielis deleted the rmikielis/ifconfig-ipv6-support branch October 23, 2025 09:18
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.

2 participants