Documentation ¶
Overview ¶
********************************************************************
- Copyright (c) Intel Corporation 2022
- SPDX-License-Identifier: Apache-2.0 *********************************************************************
********************************************************************
- Copyright (c) Intel Corporation 2022
- SPDX-License-Identifier: Apache-2.0 *********************************************************************
Index ¶
- Constants
- func ChannelOpen(senderChannel int) bytes.Buffer
- func Process(data []byte, session *Session) bytes.Buffer
- func ProcessChannelData(data []byte, session *Session)
- func ProcessChannelOpenConfirmation(data []byte, session *Session)
- func ProcessChannelOpenFailure(data []byte, session *Session)
- func ProcessChannelWindowAdjust(data []byte, session *Session)
- func ProcessGlobalRequest(data []byte) interface{}
- type APF_CHANNEL_CLOSE_MESSAGE
- type APF_CHANNEL_DATA_MESSAGE
- type APF_CHANNEL_OPEN_CONFIRMATION_MESSAGE
- type APF_CHANNEL_OPEN_FAILURE_MESSAGE
- type APF_CHANNEL_OPEN_MESSAGE
- type APF_CHANNEL_WINDOW_ADJUST_MESSAGE
- type APF_DISCONNECT_MESSAGE
- type APF_GENERIC_HEADER
- type APF_MESSAGE_HEADER
- type APF_PROTOCOL_VERSION_MESSAGE
- type APF_SERVICE_ACCEPT_MESSAGE
- type APF_SERVICE_REQUEST_MESSAGE
- type APF_TCP_FORWARD_REPLY_MESSAGE
- type APF_TCP_FORWARD_REQUEST
- type APF_USERAUTH_SUCCESS_MESSAGE
- type Session
Constants ¶
View Source
const APF_AUTH_NONE = "none"
APF Authentication method
View Source
const APF_AUTH_PASSWORD = "password"
View Source
const APF_CHANNEL_CLOSE = 97
View Source
const APF_CHANNEL_DATA = 94
View Source
const APF_CHANNEL_OPEN = 90
View Source
const APF_CHANNEL_OPEN_CONFIRMATION = 91
View Source
const APF_CHANNEL_OPEN_FAILURE = 92
View Source
const APF_CHANNEL_WINDOW_ADJUST = 93
View Source
const APF_DISCONNECT = 1
message op codes
View Source
const APF_DISCONNECT_AUTH_CANCELLED_BY_USER = 13
View Source
const APF_DISCONNECT_BY_APPLICATION = 11
View Source
const APF_DISCONNECT_COMPRESSION_ERROR = 6
View Source
const APF_DISCONNECT_CONNECTION_LOST = 10
View Source
const APF_DISCONNECT_HOST_KEY_NOT_VERIFIABLE = 9
View Source
const APF_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1
disconnect reason codes
View Source
const APF_DISCONNECT_ILLEGAL_USER_NAME = 15
View Source
const APF_DISCONNECT_KEY_EXCHANGE_FAILED = 3
View Source
const APF_DISCONNECT_MAC_ERROR = 5
View Source
const APF_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14
View Source
const APF_DISCONNECT_PROTOCOL_ERROR = 2
View Source
const APF_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED = 8
View Source
const APF_DISCONNECT_RESERVED = 4
View Source
const APF_DISCONNECT_SERVICE_NOT_AVAILABLE = 7
View Source
const APF_DISCONNECT_TOO_MANY_CONNECTIONS = 12
View Source
const APF_GLOBAL_REQUEST = 80
View Source
const APF_GLOBAL_REQUEST_STR_TCP_FORWARD_CANCEL_REQUEST = "cancel-tcpip-forward"
View Source
const APF_GLOBAL_REQUEST_STR_TCP_FORWARD_REQUEST = "tcpip-forward"
strings used in global messages
View Source
const APF_GLOBAL_REQUEST_STR_UDP_SEND_TO = "udp-send-to@amt.intel.com"
View Source
const APF_OPEN_CHANNEL_REQUEST_DIRECT = "direct-tcpip"
View Source
const APF_OPEN_CHANNEL_REQUEST_FORWARDED = "forwarded-tcpip"
View Source
const APF_PROTOCOLVERSION = 192
View Source
const APF_REQUEST_FAILURE = 82
View Source
const APF_REQUEST_SUCCESS = 81
View Source
const APF_SERVICE_ACCEPT = 6
View Source
const APF_SERVICE_AUTH = "auth@amt.intel.com"
View Source
const APF_SERVICE_PFWD = "pfwd@amt.intel.com"
APF service names
View Source
const APF_SERVICE_REQUEST = 5
View Source
const APF_TRIGGER_REASON_ALERT_REQUEST = 2
View Source
const APF_TRIGGER_REASON_HIT_PROVISIONING_REQUEST = 3
View Source
const APF_TRIGGER_REASON_LME_REQUEST = 254
View Source
const APF_TRIGGER_REASON_PERIODIC_REQUEST = 4
View Source
const APF_TRIGGER_REASON_USER_INITIATED_REQUEST = 1
View Source
const APF_USERAUTH_FAILURE = 51
View Source
const APF_USERAUTH_REQUEST = 50
View Source
const APF_USERAUTH_SUCCESS = 52
View Source
const LME_RX_WINDOW_SIZE = 4096
View Source
const LMS_PROTOCOL_VERSION = 4
View Source
const OPEN_FAILURE_REASON_ADMINISTRATIVELY_PROHIBITED = 1
View Source
const OPEN_FAILURE_REASON_CONNECT_FAILED = 2
View Source
const OPEN_FAILURE_REASON_RESOURCE_SHORTAGE = 4
View Source
const OPEN_FAILURE_REASON_UNKNOWN_CHANNEL_TYPE = 3
Variables ¶
This section is empty.
Functions ¶
func ChannelOpen ¶
func ProcessChannelData ¶
func ProcessGlobalRequest ¶
func ProcessGlobalRequest(data []byte) interface{}
Types ¶
type APF_CHANNEL_CLOSE_MESSAGE ¶
*
- close channel message
- @MessageType - APF_CHANNEL_CLOSE
- @RecipientChannel - channel number given in the open request *
func ChannelClose ¶
func ChannelClose(recipientChannel uint32) APF_CHANNEL_CLOSE_MESSAGE
func ProcessChannelClose ¶
func ProcessChannelClose(data []byte, session *Session) APF_CHANNEL_CLOSE_MESSAGE
type APF_CHANNEL_DATA_MESSAGE ¶
type APF_CHANNEL_DATA_MESSAGE struct { MessageType byte RecipientChannel uint32 DataLength uint32 Data []byte }
*
- used to send/receive data.
- @MessageType - APF_CHANNEL_DATA
- @RecipientChannel - channel number given in the open request
- @Length - Length of the data in the message
- @Data - The data in the message *
func ChannelData ¶
func ChannelData(recipientChannel uint32, buffer []byte) APF_CHANNEL_DATA_MESSAGE
type APF_CHANNEL_OPEN_CONFIRMATION_MESSAGE ¶
type APF_CHANNEL_OPEN_CONFIRMATION_MESSAGE struct { MessageType byte RecipientChannel uint32 SenderChannel uint32 InitialWindowSize uint32 Reserved uint32 }
*
- response to ChannelOpen when channel open succeed
- @MessageType - APF_CHANNEL_OPEN_CONFIRMATION
- @RecipientChannel - channel number given in the open request
- @SenderChannel - channel number assigned by the sender
- @InitialWindowSize - Number of bytes in the window
- @Reserved - Reserved *
func ChannelOpenReplySuccess ¶
func ChannelOpenReplySuccess(recipientChannel uint32, senderChannel uint32) APF_CHANNEL_OPEN_CONFIRMATION_MESSAGE
type APF_CHANNEL_OPEN_FAILURE_MESSAGE ¶
type APF_CHANNEL_OPEN_FAILURE_MESSAGE struct { MessageType byte RecipientChannel uint32 ReasonCode uint32 Reserved uint32 Reserved2 uint32 }
*
- response to ChannelOpen when a channel open failed
- @MessageType - APF_CHANNEL_OPEN_FAILURE
- @RecipientChannel - channel number given in the open request
- @ReasonCode - code for the reason channel could not be open
- @Reserved - Reserved *
func ChannelOpenReplyFailure ¶
func ChannelOpenReplyFailure(recipientChannel uint32, reason uint32) APF_CHANNEL_OPEN_FAILURE_MESSAGE
type APF_CHANNEL_OPEN_MESSAGE ¶
type APF_CHANNEL_OPEN_MESSAGE struct { MessageType byte ChannelTypeLength uint32 ChannelType [15]uint8 SenderChannel uint32 InitialWindowSize uint32 Reserved uint32 ConnectedAddressLength uint32 ConnectedAddress [3]uint8 ConnectedPort uint32 OriginatorIPAddressLength uint32 OriginatorIPAddress [3]uint8 OriginatorPort uint32 }
type APF_CHANNEL_WINDOW_ADJUST_MESSAGE ¶
type APF_CHANNEL_WINDOW_ADJUST_MESSAGE struct { MessageType byte RecipientChannel uint32 BytesToAdd uint32 }
*
- used to adjust receive window size.
- @MessageType - APF_WINDOW_ADJUST
- @RecipientChannel - channel number given in the open request
- @BytesToAdd - number of bytes to add to current window size value *
func ChannelWindowAdjust ¶
func ChannelWindowAdjust(recipientChannel uint32, len uint32) APF_CHANNEL_WINDOW_ADJUST_MESSAGE
type APF_DISCONNECT_MESSAGE ¶
*
- This message causes immediate termination of the connection with AMT.
- @ReasonCode - A Reason code for the disconnection event
- @Reserved - Reserved must be set to 0 *
type APF_GENERIC_HEADER ¶
type APF_MESSAGE_HEADER ¶
type APF_MESSAGE_HEADER struct {
MessageType byte
}
type APF_PROTOCOL_VERSION_MESSAGE ¶
type APF_PROTOCOL_VERSION_MESSAGE struct { MessageType byte MajorVersion uint32 MinorVersion uint32 TriggerReason uint32 UUID [16]byte Reserved [64]byte }
*
- holds the protocol major and minor version implemented by AMT.
- @MajorVersion - Protocol's Major version
- @MinorVersion - Protocol's Minor version
- @Trigger - The open session reason
- @UUID - System Id *
func ProcessProtocolVersion ¶
func ProcessProtocolVersion(data []byte) APF_PROTOCOL_VERSION_MESSAGE
func ProtocolVersion ¶
func ProtocolVersion(majorversion uint32, minorversion uint32, triggerreason uint32) APF_PROTOCOL_VERSION_MESSAGE
type APF_SERVICE_ACCEPT_MESSAGE ¶
type APF_SERVICE_ACCEPT_MESSAGE struct { MessageType byte ServiceNameLength uint32 ServiceName [18]byte }
*
- Used to send a service accept identified by name
- @ServiceNameLength - The length of the service name string.
- @ServiceName - The name of the service being requested. *
func ProcessServiceRequest ¶
func ProcessServiceRequest(data []byte) APF_SERVICE_ACCEPT_MESSAGE
func ServiceAccept ¶
func ServiceAccept(serviceName string) APF_SERVICE_ACCEPT_MESSAGE
Send the AFP service accept message to the MEI
type APF_SERVICE_REQUEST_MESSAGE ¶
type APF_SERVICE_REQUEST_MESSAGE struct { MessageType byte ServiceNameLength uint32 ServiceName string }
*
- Used to request a service identified by name
- @ServiceNameLength - The length of the service name string.
- @ServiceName - The name of the service being requested. *
type APF_TCP_FORWARD_REPLY_MESSAGE ¶
*
- TCP forward reply message
- @MessageType - Protocol's Major version
- @PortBound - the TCP port was bound on the server *
func TcpForwardReplySuccess ¶
func TcpForwardReplySuccess(port uint32) APF_TCP_FORWARD_REPLY_MESSAGE
type APF_TCP_FORWARD_REQUEST ¶
type APF_USERAUTH_SUCCESS_MESSAGE ¶
type APF_USERAUTH_SUCCESS_MESSAGE struct {
MessageType byte
}
*
- holds the user authentication request success response. *
Click to show internal directories.
Click to hide internal directories.