rmcpplus

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenSessionRequestSize     = 32
	OpenSessionResponseSize    = 36
	OpenSessionResponseMinSize = 8
)

Open Session / RAKP message sizes (v2.0§13.17–13.18).

View Source
const (
	MaxUserNameLength = 16
	RAKP1MessageSize  = 44
)

Variables

This section is empty.

Functions

func NewAlgorithmPayloads

NewAlgorithmPayloads builds the three Open Session algorithm records for the given algorithms (payload type 00h/01h/02h, length 08h).

Types

type AuthenticationPayload

type AuthenticationPayload struct {
	PayloadType   uint8
	PayloadLength uint8
	AuthAlg       uint8
}

AuthenticationPayload is the auth-algorithm record in Open Session (v2.0§13.17).

func (*AuthenticationPayload) Pack

func (p *AuthenticationPayload) Pack() []byte

func (*AuthenticationPayload) Unpack

func (p *AuthenticationPayload) Unpack(msg []byte) error

type ConfidentialityPayload

type ConfidentialityPayload struct {
	PayloadType   uint8
	PayloadLength uint8
	CryptAlg      uint8
}

ConfidentialityPayload is the confidentiality-algorithm record in Open Session.

func (*ConfidentialityPayload) Pack

func (p *ConfidentialityPayload) Pack() []byte

func (*ConfidentialityPayload) Unpack

func (p *ConfidentialityPayload) Unpack(msg []byte) error

type IntegrityPayload

type IntegrityPayload struct {
	PayloadType   uint8
	PayloadLength uint8
	IntegrityAlg  uint8
}

IntegrityPayload is the integrity-algorithm record in Open Session.

func (*IntegrityPayload) Pack

func (p *IntegrityPayload) Pack() []byte

func (*IntegrityPayload) Unpack

func (p *IntegrityPayload) Unpack(msg []byte) error

type OpenSessionRequest

type OpenSessionRequest struct {
	MessageTag                     uint8
	RequestedMaximumPrivilegeLevel types.PrivilegeLevel
	RemoteConsoleSessionID         uint32
	AuthenticationPayload
	IntegrityPayload
	ConfidentialityPayload
}

OpenSessionRequest is an RMCP+ Open Session Request (v2.0§13.17).

func (*OpenSessionRequest) Command

func (req *OpenSessionRequest) Command() types.Command

func (*OpenSessionRequest) Pack

func (req *OpenSessionRequest) Pack() []byte

func (*OpenSessionRequest) Unpack

func (req *OpenSessionRequest) Unpack(data []byte) error

Unpack parses an Open Session Request payload.

type OpenSessionResponse

type OpenSessionResponse struct {
	MessageTag             uint8
	RmcpStatusCode         types.RmcpStatusCode
	MaximumPrivilegeLevel  uint8
	RemoteConsoleSessionID uint32
	ManagedSystemSessionID uint32
	AuthenticationPayload
	IntegrityPayload
	ConfidentialityPayload
}

OpenSessionResponse is an RMCP+ Open Session Response (v2.0§13.18).

func (*OpenSessionResponse) Format

func (res *OpenSessionResponse) Format() string

func (*OpenSessionResponse) Pack

func (res *OpenSessionResponse) Pack() []byte

Pack encodes a successful or error Open Session Response. On error (RmcpStatusCode != NoErrors) only the 8-byte short form is returned.

func (*OpenSessionResponse) Unpack

func (res *OpenSessionResponse) Unpack(data []byte) error

type RAKPMessage1

type RAKPMessage1 struct {
	MessageTag uint8

	ManagedSystemSessionID uint32

	RemoteConsoleRandomNumber [16]byte

	NameOnlyLookup                 bool
	RequestedMaximumPrivilegeLevel types.PrivilegeLevel

	UsernameLength uint8
	Username       []byte
}

RAKPMessage1 is RAKP Message 1 (v2.0§13.20).

func (*RAKPMessage1) Command

func (req *RAKPMessage1) Command() types.Command

func (*RAKPMessage1) Pack

func (r *RAKPMessage1) Pack() []byte

func (*RAKPMessage1) Role

func (r *RAKPMessage1) Role() uint8

Role returns the privilege byte combining RequestedMaximumPrivilegeLevel and NameOnlyLookup (stored for RAKP auth-code computation).

func (*RAKPMessage1) Unpack

func (r *RAKPMessage1) Unpack(msg []byte) error

Unpack parses a RAKP Message 1 payload.

type RAKPMessage2

type RAKPMessage2 struct {
	// AuthAlg is the negotiated authentication algorithm; needed to know how
	// many KeyExchangeAuthenticationCode bytes to read.
	AuthAlg types.AuthAlg

	MessageTag uint8

	RmcpStatusCode types.RmcpStatusCode

	RemoteConsoleSessionID uint32

	ManagedSystemRandomNumber [16]byte

	ManagedSystemGUID [16]byte

	KeyExchangeAuthenticationCode []byte
}

RAKPMessage2 is RAKP Message 2 (v2.0§13.21).

func (*RAKPMessage2) Format

func (res *RAKPMessage2) Format() string

func (*RAKPMessage2) Pack

func (res *RAKPMessage2) Pack() []byte

Pack encodes a RAKP Message 2 response (success or short error form).

func (*RAKPMessage2) Unpack

func (res *RAKPMessage2) Unpack(msg []byte) error

type RAKPMessage3

type RAKPMessage3 struct {
	MessageTag uint8

	RmcpStatusCode types.RmcpStatusCode

	ManagedSystemSessionID uint32

	KeyExchangeAuthenticationCode []byte
}

RAKPMessage3 is RAKP Message 3 (v2.0§13.22).

func (*RAKPMessage3) Command

func (req *RAKPMessage3) Command() types.Command

func (*RAKPMessage3) Pack

func (req *RAKPMessage3) Pack() []byte

func (*RAKPMessage3) Unpack

func (req *RAKPMessage3) Unpack(msg []byte, authAlg types.AuthAlg) error

Unpack parses a RAKP Message 3 payload. authAlg selects the expected auth-code length.

type RAKPMessage4

type RAKPMessage4 struct {
	AuthAlg types.AuthAlg

	MessageTag uint8

	RmcpStatusCode types.RmcpStatusCode

	MgmtConsoleSessionID uint32

	IntegrityCheckValue []byte
}

RAKPMessage4 is RAKP Message 4 (v2.0§13.23).

func (*RAKPMessage4) Format

func (res *RAKPMessage4) Format() string

func (*RAKPMessage4) Pack

func (res *RAKPMessage4) Pack() []byte

Pack encodes a RAKP Message 4 response.

func (*RAKPMessage4) Unpack

func (res *RAKPMessage4) Unpack(msg []byte) error

Jump to

Keyboard shortcuts

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