Enhanced AS2Rel Command and New Pfx2as Command #91
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.
Summary
This PR adds significant enhancements to the
as2relcommand with advanced filtering capabilities, introduces a newpfx2ascommand for prefix-to-ASN mapping lookups, and improves table output with visual truncation indicators.New Features
New
monocle pfx2asCommandA new command for prefix-to-ASN mapping lookups with RPKI validation:
Features:
--show-nameflag to display AS organization names--include-subto include more specific (sub) prefixes--include-superto include less specific (super) prefixes--limitto control result countEnhanced
monocle as2relCommandNew filtering options for more targeted relationship queries:
--min-visibility <PERCENT>--single-homed--is-upstream--is-downstream--is-peerMulti-ASN Support:
# Query relationships among multiple ASNs (shows all pair combinations) monocle as2rel 174 2914 3356 --show-nameSingle-homed Discovery:
Visual Truncation Indicators
Tables now show a
...row when results are truncated, making it immediately visible that additional data exists:This applies to:
Architecture
The
pfx2asimplementation follows the lens/command separation pattern perDEVELOPMENT.md:Pfx2asLens(src/lens/pfx2as/mod.rs): Contains all business logicCommand (
src/bin/commands/pfx2as.rs): Thin CLI wrapper (~170 lines)Files Changed
New Files:
src/bin/commands/pfx2as.rs- CLI command handlerexamples/database/pfx2as_search.rs- Usage exampleModified Files:
src/lens/pfx2as/mod.rs- Enhanced with search functionality, RPKI validation, AS name enrichmentsrc/lens/as2rel/mod.rs- Added filtering and multi-ASN supportsrc/lens/as2rel/args.rs- New CLI argumentssrc/database/monocle/as2rel.rs- New database query methodssrc/lens/inspect/mod.rs- Added truncation indicatorssrc/bin/commands/as2rel.rs- Updated command handlersrc/bin/monocle.rs- Added Pfx2as commandREADME.md- Documentation for pfx2as commandCHANGELOG.md- Feature documentationCargo.toml- Added example entryexamples/README.md- Added pfx2as exampleTesting
Pfx2asSearchArgsandPfx2asSearchResultBreaking Changes
None. All changes are additive.