Miniss
Displays a list of open listening sockets. It is a minimal alternative to ss or netstat.
Constants
TCP states code mapping.
Used in Miniss::Socket#parse_line.
NOTE: Parsed from /usr/src/linux/include/net/tcp_states.h. I made the choice not to use the same words as ss (https://github.com/sivasankariit/iproute2/blob/1179ab033c31d2c67f406be5bcd5e4c0685855fe/misc/ss.c#L400-L413).
UDP "states" (UDP is stateless) code mapping.
Used in Miniss::Socket#parse_line.
NOTE: sk_state in /usr/src/linux/include/net/udp.h is always ESTABLISHED or CLOSE (ss shows UNCONN for unconnected).
miniss version.
NOTE: see all versions available on the release page.
Class methods
Returns the decoded IPv4 address + port from hexadecimal format (low nibble) to the dotted decimal format. Returns the decoded IPv6 address + port from hexadecimal format (low nibble) to the double-dotted hexadecimal format.
Example:
Miniss.decode_addr("3500007F:0035", 4_u8) # => "127.0.0.53:53"
Miniss.decode_addr("000080FE00000000FF005450B6AD1DFE:0222", 6_u8) # => "[fe80::5054:ff:fe1d:adb6]:546"
Miniss.decode_addr("00000000000000000000000000000000:14E9", 6_u8) # => "[::]:5353"