Skip to content

Import-NmapScan: include IPv6 hosts from nmap XML #63

Closed

Description

@jacobyoby

Context

Import-NmapScan only keeps address entries with addrtype='ipv4' and continues when none exist. Dual-stack or IPv6-only nmap -oX scans therefore drop live hosts even after #57 made topology/export IPv6-capable.

What

  • Prefer ipv4 when both families are present on one host (stable single-node identity), or emit one node per family with clear dedupe rules — pick one approach and document it.
  • Accept addrtype='ipv6' when no ipv4 is present.
  • Validate with [System.Net.IPAddress]::Parse for both families.
  • Extend tests/fixtures/nmap-sample.xml (or add nmap-sample-ipv6.xml) and Pester coverage.

Acceptance criteria

  • Fixture with an up IPv6-only host produces a topology node with that address.
  • Existing IPv4 fixture behavior unchanged (node count / down host drop).
  • Malformed address still skipped or throws consistently with current error style.
  • Help/DESCRIPTION mentions IPv4 and IPv6 address elements.

Related

Follows #36 and #57. Coordinates with Import-Inventory dual-stack normalization if shared helpers land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions