radius

package
v0.0.0-...-426d39e Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	Dispatch(*Packet) (*Packet, error)
}

type Handler

type Handler struct {
	Dispatcher
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(conf *RadiusConfig) *Handler

func (*Handler) Handle

func (h *Handler) Handle(conn net.Conn)
type Header struct {
	Code       uint8
	Identifier uint8
	Length     uint16
}

type Packet

type Packet struct {
	Header
	Data []byte
}

func NewPacket

func NewPacket(r io.Reader) (*Packet, error)

func (*Packet) Bytes

func (p *Packet) Bytes() ([]byte, error)

func (*Packet) IsAcct

func (p *Packet) IsAcct() bool

func (*Packet) WriteTo

func (p *Packet) WriteTo(w io.Writer) (int, error)

type RadiusConfig

type RadiusConfig struct {
	RadiusHost     string        `split_words:"true" default:"localhost"`
	RadiusPort     int           `split_words:"true" default:"1812"`
	RadiusAcctHost string        `split_words:"true" default:"localhost"`
	RadiusAcctPort int           `split_words:"true" default:"1813"`
	RadiusTimeout  time.Duration `split_words:"true" default:"10s"`
	IdleTimeout    time.Duration `split_words:"true" default:"60s"`
}

type UDPDispatcher

type UDPDispatcher struct {
	// contains filtered or unexported fields
}

func (*UDPDispatcher) Dispatch

func (d *UDPDispatcher) Dispatch(p *Packet) (*Packet, error)

Jump to

Keyboard shortcuts

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