ikev2

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT, Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Notify message types
	IKE_NOTIFY_NO_PROPOSAL_CHOSEN = 14
	IKE_NOTIFY_USE_TRANSPORT_MODE = 16391

	IKE_VERSION_2 = 0x20

	// Exchange Type
	IKE_EXCHANGE_SA_INIT         = 34
	IKE_EXCHANGE_AUTH            = 35
	IKE_EXCHANGE_CREATE_CHILD_SA = 36
	IKE_EXCHANGE_INFORMATIONAL   = 37

	// Flags
	IKE_FLAGS_InitiatorBitCheck = 0x08
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IKEMessage

type IKEMessage struct {
	InitiatorSPI uint64
	Version      uint8
	ExchangeType uint8
	Flags        uint8
	Payloads     []IKEPayload
}

IKEMessage is the IKEv2 message

IKEv2 implements a limited subset of IKEv2 Protocol, specifically the IKE_NOTIFY and IKE_NONCE payloads and the IKE_SA_INIT exchange.

func (*IKEMessage) AppendPayload

func (m *IKEMessage) AppendPayload(payload IKEPayload)

AppendPayload appends a payload to the IKE message

func (*IKEMessage) Encode

func (m *IKEMessage) Encode() ([]byte, error)

Encode encodes the final IKE message

type IKENonce

type IKENonce struct {
	NonceData []byte
}

IKENonce is the IKEv2 Nonce payload

type IKENotification

type IKENotification struct {
	NotifyMessageType uint16
	NotificationData  []byte
}

IKEv2Notify is the IKEv2 Notification payload

type IKEPayload

type IKEPayload interface {
	// contains filtered or unexported methods
}

IKEPayload is the IKEv2 payload interface

All the payloads like IKENotification, IKENonce, etc. implement this interface.

Jump to

Keyboard shortcuts

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