RedFlag/agent/internal/system/connections.go
Fimeg 67e26be2d9 projection: begin the exact-path public epoch
The public tree and its history contain only the listed paths. Earlier projection history remains preserved internally.

Source-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Policy-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Tree-Digest: 180ae530c1058a2a5c89837bdce2d323ae83e669e38590ca72e75b8d92b7262f
2026-09-08 21:59:33 -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()
}