peap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ExtensionHeaderSize = 4
View Source
const TypePEAP protocol.Type = 25
View Source
const TypePEAPExtension protocol.Type = 33

Variables

View Source
var (
	ErrorReservedBitSet = errors.New("PEAP-Extension: Reserved bit is not 0")
)

Functions

func Protocol

func Protocol() protocol.Payload

Types

type AVPType

type AVPType uint16
const (
	AVPAckResult AVPType = 3
)

type ExtensionAVP

type ExtensionAVP struct {
	Mandatory bool
	Type      AVPType // 14-bit field
	Length    uint16
	Value     []byte
}

func (*ExtensionAVP) Decode

func (eavp *ExtensionAVP) Decode(raw []byte) error

func (ExtensionAVP) Encode

func (eavp ExtensionAVP) Encode() []byte

type ExtensionPayload

type ExtensionPayload struct {
	AVPs []ExtensionAVP
}

func (*ExtensionPayload) Decode

func (ep *ExtensionPayload) Decode(raw []byte) error

func (*ExtensionPayload) Encode

func (ep *ExtensionPayload) Encode() ([]byte, error)

func (*ExtensionPayload) Handle

func (*ExtensionPayload) Offerable

func (ep *ExtensionPayload) Offerable() bool

func (*ExtensionPayload) String

func (ep *ExtensionPayload) String() string

func (*ExtensionPayload) Type

func (ep *ExtensionPayload) Type() protocol.Type

type Payload

type Payload struct {
	Inner protocol.Payload
	// contains filtered or unexported fields
}

func (*Payload) Decode

func (p *Payload) Decode(raw []byte) error

func (*Payload) Encode

func (p *Payload) Encode() ([]byte, error)

Inner EAP packets in PEAP may not include the header, hence we need a custom decoder https://datatracker.ietf.org/doc/html/draft-kamath-pppext-peapv0-00.txt#section-1.1

func (*Payload) GetEAPSettings

func (p *Payload) GetEAPSettings() protocol.Settings

func (*Payload) GetEAPState

func (p *Payload) GetEAPState(key string) *protocol.State

func (*Payload) Handle

func (p *Payload) Handle(ctx protocol.Context) protocol.Payload

func (*Payload) HasInner

func (p *Payload) HasInner() protocol.Payload

func (*Payload) Offerable

func (p *Payload) Offerable() bool

func (*Payload) SetEAPState

func (p *Payload) SetEAPState(key string, st *protocol.State)

func (*Payload) String

func (p *Payload) String() string

func (*Payload) Type

func (p *Payload) Type() protocol.Type

type Settings

type Settings struct {
	Config         *tls.Config
	InnerProtocols protocol.Settings
}

func (Settings) TLSConfig

func (s Settings) TLSConfig() *tls.Config

type State

type State struct {
	SubState map[string]*protocol.State
}

Jump to

Keyboard shortcuts

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