Ifconf — Domain Model Design
A domain-model specification for parsing ifconfig output using
ronin-support as the infrastructure layer for IP/CIDR/MAC primitives.
Status
Planning phase — this package contains the complete design specification prior to implementation.
Usage
raw = `ifconfig -a`
snapshot = Ifconf.parse(raw)
snapshot.find_by_name("eth0") # => NetworkInterface | nil
snapshot.operational # => Array<NetworkInterface>
snapshot.with_ipv4 # => Array<NetworkInterface>
snapshot.find_by_ip("192.168.1.5") # => NetworkInterface | nil
# Non-fatal parse errors (replaces domain events)
snapshot.errors.each { |e| warn e. }
The parser is a pure function from String → Snapshot. The caller provides
the raw text and decides whether and how to persist the result.
Contents
CLAUDE.md Implementation guide (auto-loaded by Claude Code)
spec-skeleton.yml Behavioral contract / test plan
docs/
01-ddd-pseudocode.md Core design: value objects, entity, snapshot,
parser, error reporting
02-ronin-support-mapping.md Exploration of ronin-support network namespace
03-entity-relationship.md Entity relationship diagram (ASCII)
04-value-objects.md Full method catalog for all Value Objects
05-entities-and-aggregates.md Full method catalog for Entity + Snapshot
06-domain-services.md All parser services with method signatures
07-integration-notes.md Boundary decisions and caller responsibilities
08-exceptions.md Exception hierarchy
09-ronin-integration.md ronin-support integration point summary
diagrams/
layer-map.txt Architecture layer diagram
entity-relationships.txt Full ER diagram
Architecture Stack
┌─────────────────────────────────────────────┐
│ Ifconf (Public API) │
│ .parse(raw_text) → Snapshot │
├─────────────────────────────────────────────┤
│ Domain Model │
│ (NetworkInterface, Snapshot, │
│ InterfaceFlags, InterfaceStatistics, …) │
├─────────────────────────────────────────────┤
│ ronin-support Network Layer │
│ (IP, IPRange::CIDR, Text::Patterns, │
│ InvalidIP, IP.extract, MAC_ADDR regex) │
├─────────────────────────────────────────────┤
│ Ruby stdlib (IPAddr, Socket) │
└─────────────────────────────────────────────┘
Dependencies
- Ruby >= 3.4
- ronin-support ~> 1.1