Watch
1
0
Fork
You've already forked RedFlag
0
RedFlag/agent/internal/system/connections.go
Fimeg f487de554a desktop: become the machine console
Qt/QML now carries 11 local views while the Agent owns observation and intent. Tauri, WebKit, and the second React desktop build leave together. Linux ships first; Windows waits for a native Qt runner.
2026-09-01 08:29:58 -04:00

26 lines
733 B
Go

package system
import "time"
type ConnectionSnapshot struct {
Connections []Connection `json:"connections"`
Count int `json:"count"`
CollectedAt time.Time `json:"collected_at"`
}
type Connection struct {
PID int `json:"pid,omitempty"`
Process string `json:"process,omitempty"`
Protocol string `json:"protocol"`
Family string `json:"family"`
LocalAddr string `json:"local_addr"`
LocalPort int `json:"local_port"`
RemoteAddr string `json:"remote_addr,omitempty"`
RemotePort int `json:"remote_port,omitempty"`
State string `json:"state"`
Inode uint64 `json:"inode"`
}
func GetConnectionsSnapshot() (*ConnectionSnapshot, error) {
return getConnectionsSnapshot()
}