File: socket.go

package info (click to toggle)
witr 0.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 736 kB
  • sloc: sh: 79; makefile: 10
file content (17 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package model

type Socket struct {
	Inode   string
	Port    int
	Address string // 0.0.0.0, 127.0.0.1, ::
}

// SocketInfo holds information about a socket's state
type SocketInfo struct {
	Port        int
	State       string // LISTEN, TIME_WAIT, CLOSE_WAIT, ESTABLISHED, etc.
	LocalAddr   string
	RemoteAddr  string
	Explanation string // Human-readable explanation of the state
	Workaround  string // Suggested workaround if applicable
}