Skip to content

Net

Re-implements some psutil functionality to be able to get information from remote debugging sessions.

TCP_STATUSES = {'01': 'established', '02': 'syn_sent', '03': 'syn_recv', '04': 'fin_wait1', '05': 'fin_wait2', '06': 'time_wait', '07': 'close', '08': 'close_wait', '09': 'last_ack', '0A': 'listen', '0B': 'closing'} module-attribute

Connection

Bases: inode

family: str | None = None class-attribute instance-attribute

inode: int | None = None class-attribute instance-attribute

lhost: str | None = None class-attribute instance-attribute

lport: int | None = None class-attribute instance-attribute

rhost: str | None = None class-attribute instance-attribute

rport: int | None = None class-attribute instance-attribute

status: str | None = None class-attribute instance-attribute

__repr__()

__str__()

Bases: inode

eth: int = 0 class-attribute instance-attribute

pid: int | None = None class-attribute instance-attribute

__repr__()

__str__()

UnixSocket

Bases: inode

path = '(anonymous)' class-attribute instance-attribute

__repr__()

__str__()

inode

inode: int | None = None class-attribute instance-attribute

tcp(data)

It will first list all listening TCP sockets, and next list all established TCP connections. A typical entry of /proc/net/tcp would look like this (split up into 3 parts because of the length of the line):

unix(data)