types

package
v0.0.0-...-81d58bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnState

type ConnState string

ConnState represents the status of a connection

var (
	ConnStateEnstablished ConnState = "ESTABLISHED"
	ConnStateSynSent      ConnState = "SYN_SENT"
	ConnStateSynRecv      ConnState = "SYN_RECV"
	ConnStateFinWait1     ConnState = "FIN_WAIT1"
	ConnStateFinWait2     ConnState = "FIN_WAIT2"
	ConnStateTimeWait     ConnState = "TIME_WAIT"
	ConnStateClose        ConnState = "CLOSE"
	ConnStateCloseWait    ConnState = "CLOSE_WAIT"
	ConnStateLastAck      ConnState = "LAST_ACK"
	ConnStateListen       ConnState = "LISTEN"
	ConnStateClosing      ConnState = "CLOSING"
	ConnStateNewSynRecv   ConnState = "NEW_SYN_RECV"
	ConnStateUnknown      ConnState = "UNKNOWN"
)

type ConnectionInfo

type ConnectionInfo struct {
	// LocalAddr is the local address of the connection
	LocalAddr string `json:"local_address"`

	// RemoteAddr is the remote address of the connection
	RemoteAddr string `json:"remote_address"`

	// State is the state of the connection
	State ConnState `json:"state"`
}

ConnectionInfo represents information about an connection

type DNSInfo

type DNSInfo struct {
	Hostname    string   `json:"hostname"`
	IPAddresses []string `json:"ip_addresses"`
}

DNSInfo represents DNS (Domain Name System) information

type NetworkInterfaceInfo

type NetworkInterfaceInfo struct {
	// Name is the name of the network interface
	Name string `json:"name"`

	// HardwareAddr is the hardware address of the network interface
	HardwareAddr string `json:"hardware_address"`

	// IPAddresses is a list of IP addresses associated with the
	// network interface
	IPAddresses []string `json:"ip_addresses"`

	// Status is the status of the network interface
	Status NetworkInterfaceStatus `json:"status"`

	// Running indicates whether the network interface is running
	Running bool `json:"running"`

	// SupportsBroadcast indicates whether the network interface supports
	// broadcast
	SupportsBroadcast bool `json:"supports_broadcast"`

	// SupportsMulticast indicates whether the network interface supports
	// multicast
	SupportsMulticast bool `json:"supports_multicast"`

	// IsLoopback indicates whether the network interface is a loopback
	// interface
	IsLoopback bool `json:"is_loopback"`

	// IsP2P indicates whether the network interface is a point-to-point
	// interface
	IsP2P bool `json:"is_point_to_point"`
}

NetworkInterfaceInfo represents information about a network interface

type NetworkInterfaceStatus

type NetworkInterfaceStatus string

NetworkInterfaceStatus represents the status of a network interface

const (
	// NetworkInterfaceStatusUp indicates that the network interface is up
	NetworkInterfaceStatusUp NetworkInterfaceStatus = "up"

	// NetworkInterfaceStatusDown indicates that the network interface is down
	NetworkInterfaceStatusDown NetworkInterfaceStatus = "down"

	// NetworkInterfaceStatusUnknown indicates that the status of the network
	// interface is unknown
	NetworkInterfaceStatusUnknown NetworkInterfaceStatus = "unknown"
)

type PortStatus

type PortStatus string

PortStatus represents the status of a network port

const (
	PortOpen    PortStatus = "open"
	PortClosed  PortStatus = "closed"
	PortUnknown PortStatus = "unknown"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL