full

package
v0.0.0-...-4950795 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeUnspecified     = 0
	ModeUnauthenticated = 1
	ModeAuthenticated   = 2
	ModeEncypted        = 4
)

Security modes for TWAMP session.

View Source
const (
	OK                          = 0
	Failed                      = 1
	InternalError               = 2
	NotSupported                = 3
	PermanentResourceLimitation = 4
	TemporaryResourceLimitation = 5
)

TWAMP Accept Field Status Code

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestTwSession

type RequestTwSession []byte

func (RequestTwSession) Encode

type TwampAcceptSession

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

func NewTwampAcceptSession

func NewTwampAcceptSession(buf bytes.Buffer) *TwampAcceptSession

type TwampClientSetUpResponse

type TwampClientSetUpResponse struct {
	Mode     uint32
	KeyID    [80]byte
	Token    [64]byte
	ClientIV [16]byte
}

TWAMP client session negotiation message.

type TwampFullClient

type TwampFullClient struct{}

func NewFullClient

func NewFullClient() *TwampFullClient

func (*TwampFullClient) Connect

func (c *TwampFullClient) Connect(hostname string, port int) (*TwampFullConnection, error)

type TwampFullConnection

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

func NewTwampFullConnection

func NewTwampFullConnection(conn net.Conn) *TwampFullConnection

func (*TwampFullConnection) Close

func (c *TwampFullConnection) Close()

func (*TwampFullConnection) CreateFullSession

func (c *TwampFullConnection) CreateFullSession(config common.TwampSessionConfig) (*TwampFullSession, error)

func (*TwampFullConnection) GetConnection

func (c *TwampFullConnection) GetConnection() net.Conn

func (*TwampFullConnection) LocalAddr

func (c *TwampFullConnection) LocalAddr() net.Addr

func (*TwampFullConnection) RemoteAddr

func (c *TwampFullConnection) RemoteAddr() net.Addr

type TwampFullSession

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

func (*TwampFullSession) CreateTest

func (s *TwampFullSession) CreateTest() (*TwampFullTest, error)

func (*TwampFullSession) GetConfig

func (*TwampFullSession) GetConnection

func (s *TwampFullSession) GetConnection() net.Conn

func (*TwampFullSession) GetPort

func (s *TwampFullSession) GetPort() uint16

func (*TwampFullSession) Stop

func (s *TwampFullSession) Stop()

func (*TwampFullSession) Write

func (s *TwampFullSession) Write(buf []byte)

type TwampFullTest

type TwampFullTest struct {
	Session    *TwampFullSession
	Connection *net.UDPConn
	Sequence   uint32
}

TWAMP test connection used for running TWAMP tests.

func (*TwampFullTest) FormatJSON

func (t *TwampFullTest) FormatJSON(r *common.PingResults)

func (*TwampFullTest) GetConnection

func (t *TwampFullTest) GetConnection() *net.UDPConn

Get TWAMP Test UDP connection.

func (*TwampFullTest) GetLocalTestHost

func (t *TwampFullTest) GetLocalTestHost() string

Get the local IP address for the TWAMP control Session.

func (*TwampFullTest) GetRemoteTestHost

func (t *TwampFullTest) GetRemoteTestHost() string

Get the remote IP address for the TWAMP control Session.

func (*TwampFullTest) GetRemoteTestPort

func (t *TwampFullTest) GetRemoteTestPort() uint16

Get the remote TWAMP UDP port number.

func (*TwampFullTest) GetSession

func (t *TwampFullTest) GetSession() *TwampFullSession

Get the underlying TWAMP control Session for the TWAMP test.

func (*TwampFullTest) Ping

func (t *TwampFullTest) Ping(count int, isRapid bool, interval int) *common.PingResults

func (*TwampFullTest) RemoteAddr

func (t *TwampFullTest) RemoteAddr() (*net.UDPAddr, error)

Get the remote TWAMP IP/UDP address.

func (*TwampFullTest) ReturnJSON

func (t *TwampFullTest) ReturnJSON(r *common.PingResults) string

func (*TwampFullTest) Run

func (t *TwampFullTest) Run() (*common.TwampResults, error)

Run a TWAMP test and return a pointer to the TwampResults.

func (*TwampFullTest) RunX

func (t *TwampFullTest) RunX(count int, callback common.TwampTestCallbackFunction, doneSignal chan bool) *common.PingResults

func (*TwampFullTest) SetConnection

func (t *TwampFullTest) SetConnection(connection *net.UDPConn)

type TwampServerGreeting

type TwampServerGreeting struct {
	Mode      uint32   // modes (4 bytes)
	Challenge [16]byte // challenge (16 bytes)
	Salt      [16]byte // salt (16 bytes)
	Count     uint32   // count (4 bytes)
}

TWAMP server greeting message.

type TwampServerStart

type TwampServerStart struct {
	Accept    byte
	ServerIV  [16]byte
	StartTime common.TwampTimestamp
}

Jump to

Keyboard shortcuts

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