Skip to content

Show adapter IPv4 addresses - #41

Merged
JamesLinYJ merged 1 commit into
mainfrom
cursor/network-ipv4-address-62d0
Oct 20, 2026
Merged

JamesLinYJ merged 1 commit into
mainfrom
cursor/network-ipv4-address-62d0

Conversation

@JamesLinYJ

Copy link
Copy Markdown
Owner

Summary

  • The Networking list gains an IPv4 column.
  • The sampler calls GetAdaptersAddresses and walks FirstUnicastAddress, keeping only AF_INET. 0.0.0.0 is not shown.
  • A failed address query shows Unknown. An adapter with no IPv4 address shows -.

Verification

  • Unit test covers an IPv6 sockaddr being dropped, 0.0.0.0 being dropped, and two IPv4 addresses being joined.
  • cargo check and cargo clippy -D warnings passed for x86_64-pc-windows-msvc on this machine. Windows CI still compiles the resources and runs the full matrix.
Open in Web Open in Cursor 

Walk FirstUnicastAddress and keep only AF_INET. A failed query stays Unknown, and an adapter with no IPv4 stays "-".

Co-authored-by: JamesLinYJ <JamesLinYJ@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T04:41:34.858807Z 0bc03a3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bc03a3472

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pages/network.rs

let ipv4_query = query_unicast_ipv4_by_index();
let ipv4_error = ipv4_query.as_ref().err().copied();
let ipv4_map = ipv4_query.ok();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve IPv4 data when the address query fails

When GetAdaptersAddresses fails—for example after repeated buffer-overflow races during adapter changes—converting the result with .ok() still commits the sample, so ipv4_label replaces every previously valid address with Unknown. Keep the last trusted snapshot (or otherwise preserve and visibly mark the IPv4 data as stale) instead of overwriting it on this global query failure.

AGENTS.md reference: AGENTS.md:L42-L42

Useful? React with 👍 / 👎.

@JamesLinYJ
JamesLinYJ merged commit 52cd9a5 into main Oct 20, 2026
3 checks passed
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