virtualnetwork

package
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPStats

type IPStats struct {
	PacketsReceived                     uint64 `json:"PacketsReceived"`
	InvalidDestinationAddressesReceived uint64 `json:"InvalidDestinationAddressesReceived"`
	InvalidSourceAddressesReceived      uint64 `json:"InvalidSourceAddressesReceived"`
	PacketsDelivered                    uint64 `json:"PacketsDelivered"`
	PacketsSent                         uint64 `json:"PacketsSent"`
	OutgoingPacketErrors                uint64 `json:"OutgoingPacketErrors"`
	MalformedPacketsReceived            uint64 `json:"MalformedPacketsReceived"`
	MalformedFragmentsReceived          uint64 `json:"MalformedFragmentsReceived"`
}

type Stats

type Stats struct {
	BytesSent                  uint64   `json:"BytesSent"`
	BytesReceived              uint64   `json:"BytesReceived"`
	UnknownProtocolRcvdPackets uint64   `json:"UnknownProtocolRcvdPackets"`
	MalformedRcvdPackets       uint64   `json:"MalformedRcvdPackets"`
	DroppedPackets             uint64   `json:"DroppedPackets"`
	IP                         IPStats  `json:"IP"`
	TCP                        TCPStats `json:"TCP"`
	UDP                        UDPStats `json:"UDP"`
}

type TCPStats

type TCPStats struct {
	ActiveConnectionOpenings           uint64 `json:"ActiveConnectionOpenings"`
	PassiveConnectionOpenings          uint64 `json:"PassiveConnectionOpenings"`
	CurrentEstablished                 uint64 `json:"CurrentEstablished"`
	CurrentConnected                   uint64 `json:"CurrentConnected"`
	EstablishedResets                  uint64 `json:"EstablishedResets"`
	EstablishedClosed                  uint64 `json:"EstablishedClosed"`
	EstablishedTimedout                uint64 `json:"EstablishedTimedout"`
	ListenOverflowSynDrop              uint64 `json:"ListenOverflowSynDrop"`
	ListenOverflowAckDrop              uint64 `json:"ListenOverflowAckDrop"`
	ListenOverflowSynCookieSent        uint64 `json:"ListenOverflowSynCookieSent"`
	ListenOverflowSynCookieRcvd        uint64 `json:"ListenOverflowSynCookieRcvd"`
	ListenOverflowInvalidSynCookieRcvd uint64 `json:"ListenOverflowInvalidSynCookieRcvd"`
	FailedConnectionAttempts           uint64 `json:"FailedConnectionAttempts"`
	ValidSegmentsReceived              uint64 `json:"ValidSegmentsReceived"`
	InvalidSegmentsReceived            uint64 `json:"InvalidSegmentsReceived"`
	SegmentsSent                       uint64 `json:"SegmentsSent"`
	SegmentSendErrors                  uint64 `json:"SegmentSendErrors"`
	ResetsSent                         uint64 `json:"ResetsSent"`
	ResetsReceived                     uint64 `json:"ResetsReceived"`
	Retransmits                        uint64 `json:"Retransmits"`
	FastRecovery                       uint64 `json:"FastRecovery"`
	SACKRecovery                       uint64 `json:"SACKRecovery"`
	SlowStartRetransmits               uint64 `json:"SlowStartRetransmits"`
	FastRetransmit                     uint64 `json:"FastRetransmit"`
	Timeouts                           uint64 `json:"Timeouts"`
}

type UDPStats

type UDPStats struct {
	PacketsReceived          uint64 `json:"PacketsReceived"`
	UnknownPortErrors        uint64 `json:"UnknownPortErrors"`
	ReceiveBufferErrors      uint64 `json:"ReceiveBufferErrors"`
	MalformedPacketsReceived uint64 `json:"MalformedPacketsReceived"`
	PacketsSent              uint64 `json:"PacketsSent"`
	PacketSendErrors         uint64 `json:"PacketSendErrors"`
}

type VirtualNetwork

type VirtualNetwork struct {
	// contains filtered or unexported fields
}

func New

func New(configuration *types.Configuration) (*VirtualNetwork, error)

func (*VirtualNetwork) AcceptQemu

func (n *VirtualNetwork) AcceptQemu(ctx context.Context, conn net.Conn) error

func (*VirtualNetwork) AcceptVpnKit

func (n *VirtualNetwork) AcceptVpnKit(conn net.Conn) error

func (*VirtualNetwork) BytesReceived

func (n *VirtualNetwork) BytesReceived() uint64

func (*VirtualNetwork) BytesSent

func (n *VirtualNetwork) BytesSent() uint64

func (*VirtualNetwork) Dial

func (n *VirtualNetwork) Dial(network, addr string) (net.Conn, error)

func (*VirtualNetwork) Listen

func (n *VirtualNetwork) Listen(network, addr string) (net.Listener, error)

func (*VirtualNetwork) Mux

func (n *VirtualNetwork) Mux() *http.ServeMux

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL