protocols

package
v0.0.0-...-de29d83 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProtocolICMP the name of the protocol
	ProtocolICMP = "icmp"
)
View Source
const (
	// ProtocolSCTP is sctp's protocol name
	ProtocolSCTP = "sctp"
)
View Source
const (
	// ProtocolTCP the name of the protocol
	ProtocolTCP = "tcp"
)
View Source
const (
	// ProtocolUDP the name of the protocol
	ProtocolUDP = "udp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonTest

type CommonTest struct {
	MTU             int
	ServerIP        string
	ProtocolVersion int
	Negative        bool
}

CommonTest keeps common vars from connectivity tests

func (*CommonTest) RunCommand

func (ct *CommonTest) RunCommand(cmd string) (string, error)

RunCommand runs command and return output

type ICMPTest

type ICMPTest struct {
	InterfaceName string
	// contains filtered or unexported fields
}

ICMPTest define, run and process return code of icmp test command

func NewICMPTest

func NewICMPTest(mtu int, protocolVersion int, serverIP string, intefaceName string, negative bool) *ICMPTest

NewICMPTest creates new instance of ConnectivityTestParameters

func (*ICMPTest) RunTest

func (test *ICMPTest) RunTest()

RunTest runs the test

type SCTPTest

type SCTPTest struct {
	CommonTest
	ServerPort int
}

SCTPTest is a struct with information for sctp test

func NewSCTPTest

func NewSCTPTest(mtu int, serverIP string, protocolVersion int, serverPort int, negative bool) *SCTPTest

NewSCTPTest returns a new SCTP test

func (*SCTPTest) RunTest

func (sctpTest *SCTPTest) RunTest()

RunTest runs the sctp test

type TCPTest

type TCPTest struct {
	CommonTest
	ServerPort    int
	InterfaceName *net.Interface
}

TCPTest define, run and process return code of tcp test command

func NewTCPTest

func NewTCPTest(mtu int, protocolVersion int, serverIP string, serverPort int, negative bool, interfaceName string) *TCPTest

NewTCPTest creates new instance of ConnectivityTestParameters

func (*TCPTest) RunTest

func (test *TCPTest) RunTest()

RunTest runs the test

type UDPTest

type UDPTest struct {
	CommonTest
	ServerPort    int
	Multicast     bool
	Broadcast     bool
	InterfaceName *net.Interface
}

UDPTest define, run and process return code of udp test command

func NewUDPTest

func NewUDPTest(mtu int, protocolVersion int, serverIP string, serverPort int, negative bool, multicast bool, broadcast bool, interfaceName string) *UDPTest

NewUDPTest creates new instance of ConnectivityTestParameters

func (*UDPTest) RunTest

func (test *UDPTest) RunTest()

RunTest runs the test

Jump to

Keyboard shortcuts

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