Documentation ¶
Index ¶
- Constants
- type RequestTwSession
- type TwampAcceptSession
- type TwampClientSetUpResponse
- type TwampFullClient
- type TwampFullConnection
- func (c *TwampFullConnection) Close()
- func (c *TwampFullConnection) CreateFullSession(config common.TwampSessionConfig) (*TwampFullSession, error)
- func (c *TwampFullConnection) GetConnection() net.Conn
- func (c *TwampFullConnection) LocalAddr() net.Addr
- func (c *TwampFullConnection) RemoteAddr() net.Addr
- type TwampFullSession
- func (s *TwampFullSession) CreateTest() (*TwampFullTest, error)
- func (s *TwampFullSession) GetConfig() common.TwampSessionConfig
- func (s *TwampFullSession) GetConnection() net.Conn
- func (s *TwampFullSession) GetPort() uint16
- func (s *TwampFullSession) Stop()
- func (s *TwampFullSession) Write(buf []byte)
- type TwampFullTest
- func (t *TwampFullTest) FormatJSON(r *common.PingResults)
- func (t *TwampFullTest) GetConnection() *net.UDPConn
- func (t *TwampFullTest) GetLocalTestHost() string
- func (t *TwampFullTest) GetRemoteTestHost() string
- func (t *TwampFullTest) GetRemoteTestPort() uint16
- func (t *TwampFullTest) GetSession() *TwampFullSession
- func (t *TwampFullTest) Ping(count int, isRapid bool, interval int) *common.PingResults
- func (t *TwampFullTest) RemoteAddr() (*net.UDPAddr, error)
- func (t *TwampFullTest) ReturnJSON(r *common.PingResults) string
- func (t *TwampFullTest) Run() (*common.TwampResults, error)
- func (t *TwampFullTest) RunX(count int, callback common.TwampTestCallbackFunction, doneSignal chan bool) *common.PingResults
- func (t *TwampFullTest) SetConnection(connection *net.UDPConn)
- type TwampServerGreeting
- type TwampServerStart
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 ¶
func (b RequestTwSession) Encode(c common.TwampSessionConfig)
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 (s *TwampFullSession) GetConfig() common.TwampSessionConfig
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 }
Click to show internal directories.
Click to hide internal directories.