Documentation
¶
Overview ¶
Diameter data types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AF_INET = []byte{0, 1}
AF_INET represents IPv4 address family.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { // Address Family (e.g. AF_INET=1) // http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml Family []byte // Parsed IP address IP net.IP // Padding to 4 octets Padding int }
Address Diameter Type.
type DiameterIdentity ¶
type DiameterIdentity struct {
OctetString
}
DiameterIdentity Diameter Type.
func (*DiameterIdentity) String ¶
func (p *DiameterIdentity) String() string
String returns a human readable version of the AVP.
type DiameterURI ¶
type DiameterURI struct {
Value string
}
DiameterURI Diameter Type.
func (*DiameterURI) Bytes ¶
func (du *DiameterURI) Bytes() []byte
Bytes implement the Codec interface.
func (*DiameterURI) Data ¶
func (du *DiameterURI) Data() Generic
Data implements the Generic interface.
func (*DiameterURI) Length ¶
func (du *DiameterURI) Length() uint32
Length implements the Codec interface.
func (*DiameterURI) String ¶
func (du *DiameterURI) String() string
String returns a human readable version of the AVP.
type Enumerated ¶
type Enumerated struct {
Integer32
}
Enumerated Diameter Type
func (*Enumerated) String ¶
func (p *Enumerated) String() string
String returns a human readable version of the AVP.
type Float32 ¶
type Float32 struct {
Value float32
}
Float32 Diameter Type
func (*Float32) Bytes ¶
Bytes implement the Codec interface. Bytes are always rewritten from the internal Float32 and stored on Buffer.
type Float64 ¶
type Float64 struct {
Value float64
}
Float64 Diameter Type
func (*Float64) Bytes ¶
Bytes implement the Codec interface. Bytes are always rewritten from the internal Float64 and stored on Buffer.
type IPFilterRule ¶
type IPFilterRule struct {
OctetString
}
IPFilterRule Diameter Type.
func (*IPFilterRule) String ¶
func (p *IPFilterRule) String() string
String returns a human readable version of the AVP.
type IPv4 ¶
IPv4 Type for Framed-IP-Address and alike.
type Integer32 ¶
type Integer32 struct {
Value int32
}
Integer32 Diameter Type
func (*Integer32) Bytes ¶
Bytes implement the Codec interface. Bytes are always rewritten from the internal Int32 and stored on Buffer.
type Integer64 ¶
type Integer64 struct {
Value int64
}
Integer64 Diameter Type
func (*Integer64) Bytes ¶
Bytes implement the Codec interface. Bytes are always rewritten from the internal Int64 and stored on Buffer.
type OctetString ¶
type OctetString struct { Value string Padding uint32 // Extra bytes to make the Value a multiple of 4 octets }
OctetString Diameter Type.
func (*OctetString) Bytes ¶
func (os *OctetString) Bytes() []byte
Bytes implement the Codec interface. Padding is always recalculated from the internal Value.
func (*OctetString) Data ¶
func (os *OctetString) Data() Generic
Data implements the Generic interface.
func (*OctetString) Length ¶
func (os *OctetString) Length() uint32
Length implements the Codec interface. Returns length without padding.
func (*OctetString) Put ¶
func (os *OctetString) Put(b []byte)
Put implements the Codec interface. It updates internal Value and Padding.
func (*OctetString) String ¶
func (os *OctetString) String() string
String returns a human readable version of the AVP.
type Time ¶
Time Diameter Type.
type UTF8String ¶
type UTF8String struct {
OctetString
}
UTF8String Diameter Type.
func (*UTF8String) String ¶
func (p *UTF8String) String() string
String returns a human readable version of the AVP.
type Unsigned32 ¶
type Unsigned32 struct {
Value uint32
}
Unsigned32 Diameter Type
func (*Unsigned32) Bytes ¶
func (n *Unsigned32) Bytes() []byte
Bytes implement the Codec interface. Bytes are always rewritten from the internal Uint32 and stored on Buffer.
func (*Unsigned32) Data ¶
func (n *Unsigned32) Data() Generic
Data implements the Generic interface.
func (*Unsigned32) Length ¶
func (n *Unsigned32) Length() uint32
Length implements the Codec interface.
func (*Unsigned32) Put ¶
func (n *Unsigned32) Put(b []byte)
Put implements the Codec interface. It updates internal Buffer and Uint32.
func (*Unsigned32) String ¶
func (n *Unsigned32) String() string
String returns a human readable version of the AVP.
type Unsigned64 ¶
type Unsigned64 struct {
Value uint64
}
Unsigned64 Diameter Type
func (*Unsigned64) Bytes ¶
func (n *Unsigned64) Bytes() []byte
Bytes implement the Codec interface. Bytes are always rewritten from the internal Uint64 and stored on Buffer.
func (*Unsigned64) Data ¶
func (n *Unsigned64) Data() Generic
Data implements the Generic interface.
func (*Unsigned64) Length ¶
func (n *Unsigned64) Length() uint32
Length implements the Codec interface.
func (*Unsigned64) Put ¶
func (n *Unsigned64) Put(b []byte)
Put implements the Codec interface. It updates internal Buffer and Uint64.
func (*Unsigned64) String ¶
func (n *Unsigned64) String() string
String returns a human readable version of the AVP.