Documentation ¶
Index ¶
- func AcctStatusTypeParser(b []byte, r *RadiusPacket) interface{}
- func FallbackParser(content []byte, r *RadiusPacket) interface{}
- func HelperParseUint16(content []byte) int
- func IPParser(content []byte, r *RadiusPacket) interface{}
- func ParseString(content []byte, r *RadiusPacket) interface{}
- func ParseUint16(content []byte, r *RadiusPacket) interface{}
- func ParseUint32(content []byte, r *RadiusPacket) interface{}
- func ParseUserPassword(content []byte, r *RadiusPacket) interface{}
- func ParseUvarint(buf []byte, r *RadiusPacket) interface{}
- func RegisterParser(name string, parser ContentParser) error
- func StringMarshaller(a AttributeValuePair, p *RadiusPacket) []byte
- func Uvarint(buf []byte) (x uint64)
- func VendorParser(avpContent []byte, rp *RadiusPacket) interface{}
- type AttributeValuePair
- type ContentParser
- type GoRadius
- func (r *GoRadius) ParseRadiusPacket(source *net.UDPAddr, data []byte) *RadiusPacket
- func (r *GoRadius) SendPacket(p *RadiusPacket) error
- func (r *GoRadius) SendRawPacket(data []byte, dest *net.UDPAddr) error
- func (r *GoRadius) StartUDPServer(port int, ssp SharedSecretProvider) (chan *RadiusPacket, error)
- type MarshalHelper
- type RadiusDictionary
- type RadiusPacket
- type SharedSecretProvider
- type TLV
- type VSA
- type VendorDictionary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcctStatusTypeParser ¶
func AcctStatusTypeParser(b []byte, r *RadiusPacket) interface{}
Accounting Status Parser
func FallbackParser ¶
func FallbackParser(content []byte, r *RadiusPacket) interface{}
func HelperParseUint16 ¶
func ParseUserPassword ¶
func ParseUserPassword(content []byte, r *RadiusPacket) interface{}
func ParseUvarint ¶
func ParseUvarint(buf []byte, r *RadiusPacket) interface{}
func RegisterParser ¶
func RegisterParser(name string, parser ContentParser) error
Registers a new AVP Parser
func StringMarshaller ¶
func StringMarshaller(a AttributeValuePair, p *RadiusPacket) []byte
func VendorParser ¶
func VendorParser(avpContent []byte, rp *RadiusPacket) interface{}
Parses vendor-specific attribute (VSA)
Types ¶
type AttributeValuePair ¶
Attribute-Value Pair structure
type ContentParser ¶
type ContentParser func([]byte, *RadiusPacket) interface{}
Radius Content Parser Function Signature
type GoRadius ¶
type GoRadius struct { // contains filtered or unexported fields }
func NewGoRadius ¶
* Create a new RADIUS parser, providing the RADIUS & Vendor-Specific TLV Dictionary JSON files. * Option to enable debug & verbose output to aid in troubleshooting
func (*GoRadius) ParseRadiusPacket ¶
func (r *GoRadius) ParseRadiusPacket(source *net.UDPAddr, data []byte) *RadiusPacket
RADIUS Packet Parser Returns an array of parsed Attribute-Value Pairs
func (*GoRadius) SendPacket ¶
func (r *GoRadius) SendPacket(p *RadiusPacket) error
func (*GoRadius) SendRawPacket ¶
func (*GoRadius) StartUDPServer ¶
func (r *GoRadius) StartUDPServer(port int, ssp SharedSecretProvider) (chan *RadiusPacket, error)
type MarshalHelper ¶
type MarshalHelper func(AttributeValuePair, *RadiusPacket) []byte
Marshaller signature
type RadiusDictionary ¶
RADIUS Dictionary (RFC2865 + RFC2866)
type RadiusPacket ¶
type RadiusPacket struct { Originator *net.UDPAddr // The origin IP address of the packet Code uint // Packet Code PacketType string // Packet Type, based on Code PacketId uint // Packet Identifier Authenticator []byte // Authenticator Signature AVPS []AttributeValuePair // A list of Attribute-value Pairs Raw []byte // A buffer with the original raw data }
func (*RadiusPacket) Marshal ¶
func (p *RadiusPacket) Marshal() []byte
func (*RadiusPacket) String ¶
func (p *RadiusPacket) String() string
func (*RadiusPacket) VerifyAuthenticator ¶
func (p *RadiusPacket) VerifyAuthenticator() bool
Verifies the Authenticator Field if it matches our shared-secret
type SharedSecretProvider ¶
Radius Shared-Secret Provider Signature
Click to show internal directories.
Click to hide internal directories.