Versions in this module Expand all Collapse all v0 v0.1.0 Nov 23, 2016 Changes in this version + var AccountingOff = Attribute + var AccountingOn = Attribute + var AccountingStart = Attribute + var AccountingStop = Attribute + var AdminReboot = Attribute + var AdminReset = Attribute + var Callback = Attribute + var HostRequest = Attribute + var IdleTimeout = Attribute + var InterimUpdate = Attribute + var LostCarrier = Attribute + var LostService = Attribute + var NASError = Attribute + var NASReboot = Attribute + var NASRequest = Attribute + var PortError = Attribute + var PortPreempted = Attribute + var PortSuspended = Attribute + var PortUnneeded = Attribute + var ServiceUnavailable = Attribute + var SessionTimeout = Attribute + var UserError = Attribute + var UserRequest = Attribute + type Attribute struct + Length int8 + Type AttributeType + Values []Writer + func StringAttribute(t AttributeType, str string) Attribute + func (attr *Attribute) Write(w io.Writer) error + type AttributeType int64 + const AccessUserName + const AccountingAuthentic + const AccountingDelayTime + const AccountingInputOctets + const AccountingInputPackets + const AccountingMultiLinkCount + const AccountingMultiSessionID + const AccountingOutputOctets + const AccountingOutputPackets + const AccountingSessionID + const AccountingSessionTime + const AccountingStatusType + const AccountingTerminateCause + func (a AttributeType) Write(w io.Writer) error + type AttributeValue Writer + type Authenticator interface + Calculate func(p *Packet) ([]byte, error) + func AccountingRequestAuthenticator(sharedSecret string) Authenticator + type Client struct + func NewClient(o *Options) *Client + func (cl *Client) Close() + func (cl *Client) NewSession(ID string, attrs ...Attribute) *Session + func (cl *Client) Send(p *Packet) (*Packet, error) + type Identifier uint8 + func (id *Identifier) Read(r io.Reader) error + func (id Identifier) Write(w io.Writer) error + type Options struct + Host string + SharedSecret string + type Packet struct + Attributes []Attribute + Code PacketCode + ID Identifier + func (p *Packet) Length() int16 + func (p *Packet) Read(rx io.Reader) error + func (p *Packet) Write(wx io.Writer) error + type PacketCode int64 + const AccountingRequest + const AccountingResponse + func (code *PacketCode) Read(r io.Reader) error + func (code PacketCode) Write(w io.Writer) error + type Reader interface + Read func(r io.Reader) error + type Session struct + ID string + func (s *Session) AddInputOctets(i int32) + func (s *Session) AddOutputOctets(i int32) + func (s *Session) InterimUpdate(attrs ...Attribute) error + func (s *Session) Start(attrs ...Attribute) error + func (s *Session) Stop(attrs ...Attribute) (err error) + type Writer interface + Write func(w io.Writer) error + type WriterFunc func(w io.Writer) error + func (f WriterFunc) Write(w io.Writer) error