Repository navigation
feat: IPv6 support in subnet matching, ARP discovery, and export (#40) - #57
Merged
Merged
Conversation
…GE-MIB Walk dot1dTpFdbTable (address/port/status columns) on each eligible node to discover MAC addresses the switch has learned. Resolves MACs to IPs via the local ARP table and emits edges with Confidence='L2-FDB' when the IP matches a topology node. Fills in layer-2 edges that CDP/LLDP miss. Changes: - New function Get-SnmpBridgeNeighbors in Public/ - Reuses Invoke-SnmpWalk for SNMP walks (redaction + injection guards) - Status filtering: only status=3 (learned) entries produce edges - MAC-to-IP resolution via local ARP table (queried once) - No ARP match produces Write-Verbose, not Write-Warning - Updated Merge-Edges confidence ranking: L2-SNMP > L2-FDB > L2-SNMP-Heuristic > L3-Inferred - Added Get-SnmpBridgeNeighbors to FunctionsToExport in psd1 - Pester tests: - Get-SnmpBridgeNeighbors: edge count, status filtering, unresolvable MAC - Merge-Edges: three-way confidence ranking in both input orders
cursor
Bot
force-pushed
the
feature/ipv6-support-40
branch
from
September 9, 2026 13:11
6c1a6b6 to
5e1765d
Compare
The SNMP mock returned the same FDB table for every eligible node, so host walks created an extra L2-FDB edge. Empty topology.Edges unwraps to $null and Merge-Edges then returned @($null); return a real empty array when nothing survives the merge. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
- Generalize Test-IPInSubnet to handle both IPv4 and IPv6 using byte-level prefix comparison; mixed families return false, never throw - Remove -AddressFamily IPv4 restriction from Get-LocalARPTable on Windows so both v4 and v6 neighbors are returned - Add AddressFamily field to ARP table entries across all platforms - Extend ConvertFrom-ArpText to parse IPv6 neighbor entries on macOS and Linux (ip neigh) - Export-DrawIO automatically places v6 nodes in v6 subnet containers via the generalized Test-IPInSubnet - Fix .gitignore: scope test-*.ps1 pattern to tests/ and repo root so module source files (Test-IPInSubnet, etc.) are not accidentally ignored - Add IPv6 tests: CIDR match, CIDR mismatch, mixed-family safety - Add Export-DrawIO IPv6 container parenting test
[int]::TryParse(..., [ref]$null) does not write a prefix length and can reject valid IPv4 and IPv6 CIDRs. Use a local [int] out variable. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
cursor
Bot
force-pushed
the
feature/ipv6-support-40
branch
from
September 9, 2026 13:16
5e1765d to
4109f29
Compare
This was referenced Sep 9, 2026
jacobyoby
added a commit
that referenced
this pull request
Sep 9, 2026
Align the packaged smoke job with test/lint checkout@v7, assert every FunctionsToExport command after staged Import-Module, and add an offline dual-stack Export-DrawIO path (IPv6 parenting after #57). Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dual-stack support for network diagrams.
Test-IPInSubnet: Generalized from IPv4-only to byte-level prefix comparison for both IPv4 and IPv6. Mixed families return false (never throw).
Get-LocalARPTable: Removed -AddressFamily IPv4 restriction. Both v4 and v6 neighbors returned with AddressFamily field.
ConvertFrom-ArpText: Added IPv6 parsing for macOS (ndp) and Linux (ip neigh) output.
Export-DrawIO: No changes needed — v6 nodes now automatically parent into v6 subnet containers via the fixed Test-IPInSubnet.
Tests: 5 new Pester tests covering IPv6 /32 match, /48 mismatch, mixed-family safety (both directions), and v6 container parenting in DrawIO export.
Note: pwsh not available locally — CI should validate Pester tests.
Closes #40.
Generated with Qwen Code