feat(p2): parse the full ifXTable (64-bit HC counters) - #24
Merged
Conversation
IfEntry only read the 32-bit ifTable counters, so ifInOctets/ifOutOctets wrap in seconds on Gbit links, and none of the ifXTable identity/HC fields were exposed. - if_entry: replace the growing per-column case with a COLUMNS lookup table (OID-object => setter), dropping the CyclomaticComplexity disable - add all 19 ifXTable columns (RFC 2863): 64-bit HC in/out octet + packet counters, ifName/ifAlias/ifHighSpeed, and the trap-enable/promiscuous/ connector flags - spec: if_xtable_spec covers the new fields (incl. a >2^32 HC counter) and a classic-ifTable regression Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64 tasks
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.
Fourth slice of the P2 (protocol completeness) group (#7). Follows #21, #22, #23.
Problem
IfEntryonly read the 32-bitifTablecounters, soifInOctets/ifOutOctetswrap in seconds on Gbit links, and none of theifXTableidentity or high-capacity fields were exposed.Change
casewith aCOLUMNSlookup table (column-object OID → setter), dropping the# ameba:disable Metrics/CyclomaticComplexity.ifXTablecolumns (RFC 2863): the 64-bit HC in/out octet + packet counters (hc_in_octets,hc_out_octets, …),ifName/ifAlias/ifHighSpeed, and theifLinkUpDownTrapEnable/ifPromiscuousMode/ifConnectorPresentflags (exposed as…?predicates).The
>2^32HC counters decode correctly thanks to the earlierget_unsigned64fix.Note
This is the lookup-table refactor, so it also rewrites the existing
ifTableparsing into the same table — covered by the pre-existinghelpers_specregression (still green) plus a new regression case.Tests
if_xtable_speccovers the new fields across all four value types (incl. ahc_in_octetsabove 2^32) and a classic-ifTableregression. Deterministic 77/77, multi-threaded 77/77, legacy 3/3, ameba clean, format clean.Tracked in #7. Last P2 slice after this: trap/inform sending.
🤖 Generated with Claude Code