Expand description
§Network Target Parser
This module provides the logic to resolve abstract input strings into a concrete,
deduplicated IpSet. It acts as the translation layer between user intent
(CLI arguments, configuration strings) and the underlying network models.
§Supported Formats
The parser recognizes several distinct IPv4 formats:
- Single IP: Standard dotted-decimal notation (e.g.,
127.0.0.1). - CIDR Block: Network address with a prefix length (e.g.,
192.168.1.0/24). - Explicit Range: Two full IPs separated by a hyphen (e.g.,
10.0.0.1-10.0.0.50). - Shortened Range: An IP followed by a hyphen and a partial suffix (e.g.,
10.0.0.1-50or192.168.1.1-2.254). - Keywords: Special identifiers like
lan, which resolve dynamically based on the host’s active interface.
§Merging Behavior
All inputs are resolved into an IpSet. The parser ensures that overlapping
or adjacent inputs are merged into contiguous ranges to optimize scanning performance.
Enums§
- IpParse
Error - Errors encountered during the parsing or resolution of IP-related strings.
- Keyword
Statics§
- IS_
LAN_ SCAN - Global indicator set to
trueif a “lan” resolution was successfully performed.
Functions§
Type Aliases§
- Resolver
Fn - Resolves a collection of input strings into a consolidated
IpSet.