radius-0.6.1.0: Remote Authentication Dial In User Service (RADIUS)

Copyright(c) Erick Gonzalez 2017
LicenseBSD3
Maintainererick@codemonkeylabs.de
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.RADIUS.Encoding

Contents

Description

This module provides Binary instances for the RADIUS Packet type and attributes. So you basically decode a (lazy) ByteString and get a RADIUS Packet back or you can encode a RADIUS Packet to a ByteString, which you can then send on the wire as is, etc. Simple as that.

Synopsis

Documentation

radiusHeaderSize :: Num a => a Source #

Self explanatory. It can be useful when reading a RADIUS packet from a socket for example, so one can retrieve the packet header (containing the packet length) first and then use that to figure out how much data is left to read

authenticatorLength :: Int64 Source #

Fixed authenticator length as per RFC 2865

decodeHeader :: Get Header Source #

Allows decoding of a RADIUS header in the Get Monad

decodePacket :: Header -> Get Packet Source #

Given an already decoded header, this function can be used to decode the complete packet from the available data

encodeAttributes :: [PacketAttribute] -> ByteString Source #

Used internally to encode a list of RADIUS attributes. You probably don't need this.

decodeAttributes :: [PacketAttribute] -> Get [PacketAttribute] Source #

Used internally to decode a list of RADIUS attributes. You probably don't need this.

putAttributeStr :: Word8 -> ByteString -> Put Source #

For internal use

putAttribute :: Binary a => Word8 -> a -> Put Source #

For internal use

getAttributeStr :: Get ByteString Source #

For internal use.

getAttributeValue :: Binary a => Get a Source #

For internal use.

putEnum :: Enum a => a -> Put Source #

For internal use.

getEnum :: Enum a => Get a Source #

For internal use.

Orphan instances

Binary IPv4 Source # 
Instance details

Methods

put :: IPv4 -> Put #

get :: Get IPv4 #

putList :: [IPv4] -> Put #

Binary IPv6 Source # 
Instance details

Methods

put :: IPv6 -> Put #

get :: Get IPv6 #

putList :: [IPv6] -> Put #

Binary ARAPZoneAccess Source # 
Instance details

Binary NASPortType Source # 
Instance details

Binary TerminationAction Source # 
Instance details

Binary LoginService Source # 
Instance details

Binary FramedCompression Source # 
Instance details

Binary FramedRouting Source # 
Instance details

Binary FramedProtocol Source # 
Instance details

Binary ServiceType Source # 
Instance details

Binary TerminateCause Source # 
Instance details

Binary Authentic Source # 
Instance details

Binary StatusType Source # 
Instance details

Binary PacketAttribute Source # 
Instance details

Binary PacketType Source # 
Instance details

Binary Packet Source # 
Instance details

Methods

put :: Packet -> Put #

get :: Get Packet #

putList :: [Packet] -> Put #