How markmental/hss works
hss emulates a socket table by collecting candidate ports, probing a chosen host, and (for local targets) heuristically matching open ports to processes. The main program coordinates these stages and prints ss-style rows. The graph preserves the documented port sources, interface-address display, remote-target limitation, and process controls. Relationships are based on the sampled C source and README; detailed documentation files are present in the tree but were not sampled.
Main entry points: hss.c Scan coordinator · hss-ports.h Gather candidates · hss-probe.h Probe and format · hss-proc.h Enumerate processes
Components 17
Scan workflow
- Scan coordinator
hss.c - Socket table output
Port discovery
- Gather candidates
hss-ports.h - Sorted deduplication
hss-ports.h - Built-in ports
hss-ports.h
Network probing
- Probe and format
hss-probe.h - Nonblocking connect
hss-probe.h - Interface addresses
hss-probe.h
Process lookup
- Enumerate processes
hss-proc.h - Heuristic matching
hss-proc.h - Process arguments
hss-proc.h
Other components
- User
- Target host
- System services
- User port config
- TCP network
- Hurd proc server
Connections 24
- User → Scan coordinator: runs with options
- User → User port config: configures ports
- Scan coordinator → Gather candidates: parses services
- System services → Gather candidates: provides entries
- Gather candidates → Sorted deduplication: adds candidates
- Scan coordinator → Built-in ports: adds built-ins
- Scan coordinator → Sorted deduplication: adds built-ins
- Scan coordinator → Gather candidates: parses config
- User port config → Gather candidates: provides ports
- Gather candidates → Sorted deduplication: adds config ports
- Scan coordinator → Interface addresses: enumerates addresses
- Interface addresses → TCP network: queries interfaces
- Scan coordinator → Target host: selects host
- Scan coordinator → Probe and format: probes each port
- Probe and format → Nonblocking connect: tests connection
- Nonblocking connect → TCP network: connects to host
- Probe and format → Interface addresses: checks local addresses
- Scan coordinator → Hurd proc server: gets local server
- Scan coordinator → Enumerate processes: looks up owners
- Enumerate processes → Hurd proc server: enumerates PIDs and args
- Enumerate processes → Heuristic matching: tests command lines
- Hurd proc server → Process arguments: returns process args
- Heuristic matching → Process arguments: matches port heuristics
- Scan coordinator → Socket table output: prints scan rows