chewie.radius_attributes module
Radius Attributes
- class chewie.radius_attributes.AcctSessionId(data_type)
Bases:
Attribute
Acct-Session-id (RADIUS Accounting) https://tools.ietf.org/html/rfc2866#section-5.5
- DESCRIPTION = 'Acct-Session-Id'
- TYPE = 44
- class chewie.radius_attributes.Attribute(data_type)
Bases:
object
Parent class for the Attributes.
- DATA_TYPE = None
- DESCRIPTION = None
- HEADER_SIZE = 2
- TYPE = None
- property bytes_data
- classmethod create(data)
Factory method. Args:
data: object of python type (int, str, bytes, …)
- Returns:
Attribute subclass.
- data()
- full_length()
- Returns:
length (including header).
- pack()
- Returns:
packed attribute (including header) bytes
- classmethod parse(packed_value)
- Args:
packed_value (bytes): pre-packed value
- Returns:
Attribute subclass.
- Raises:
MessageParseError: if unable to parse the packed_value into the appropriate datatype.
- class chewie.radius_attributes.CalledStationId(data_type)
Bases:
Attribute
Called-Station-Id https://tools.ietf.org/html/rfc2865#section-5.30
- DESCRIPTION = 'Called-Station-Id'
- TYPE = 30
- class chewie.radius_attributes.CallingStationId(data_type)
Bases:
Attribute
Calling-Station-Id https://tools.ietf.org/html/rfc2865#section-5.31
- DESCRIPTION = 'Calling-Station-Id'
- TYPE = 31
- class chewie.radius_attributes.ConnectInfo(data_type)
Bases:
Attribute
ConnectInfo (RADIUS Extensions) https://tools.ietf.org/html/rfc2869#section-5.11
- DESCRIPTION = 'Connect-Info'
- TYPE = 77
- class chewie.radius_attributes.EAPMessage(data_type)
Bases:
Attribute
EAP-Message (RADIUS Extensions) https://tools.ietf.org/html/rfc2869#section-5.13
- DESCRIPTION = 'EAP-Message'
- TYPE = 79
- classmethod create(data)
Factory method. Args:
data: object of python type (int, str, bytes, …)
- Returns:
Attribute subclass.
- data()
- pack()
Concat types need to override AttributeType.pack(). as Concat.pack() may return multiple packed AVP (each with their own length)
- class chewie.radius_attributes.FilterId(data_type)
Bases:
Attribute
Framed-MTU https://tools.ietf.org/html/rfc2865#section-5.11
- DESCRIPTION = 'Filter-Id'
- TYPE = 11
- class chewie.radius_attributes.FramedMTU(data_type)
Bases:
Attribute
Framed-MTU https://tools.ietf.org/html/rfc2865#section-5.12
- DESCRIPTION = 'Framed-MTU'
- TYPE = 12
- class chewie.radius_attributes.MessageAuthenticator(data_type)
Bases:
Attribute
Message-Authenticator (RADIUS Extensions) https://tools.ietf.org/html/rfc2869#section-5.14
- DESCRIPTION = 'Message-Authenticator'
- TYPE = 80
- class chewie.radius_attributes.NASFilterRule(data_type)
Bases:
Attribute
NAS-Fitler-Rule https://freeradius.org/rfc/rfc4849.html
- DESCRIPTION = 'NAS-Filter-Rule'
- TYPE = 92
- class chewie.radius_attributes.NASIPAddress(data_type)
Bases:
Attribute
Service-Type https://tools.ietf.org/html/rfc2865#section-5.4
- DESCRIPTION = 'NAS-IP-Address'
- TYPE = 4
- class chewie.radius_attributes.NASIdentifier(data_type)
Bases:
Attribute
Calling-Station-Id https://tools.ietf.org/html/rfc2865#section-5.32
- DESCRIPTION = 'NAS-Identifier'
- TYPE = 32
- class chewie.radius_attributes.NASPort(data_type)
Bases:
Attribute
Service-Type https://tools.ietf.org/html/rfc2865#section-5.5
- DESCRIPTION = 'NAS-Port'
- TYPE = 5
- class chewie.radius_attributes.NASPortType(data_type)
Bases:
Attribute
NAS-Port-Type https://tools.ietf.org/html/rfc2865#section-5.41
- DESCRIPTION = 'NAS-Port-Type'
- TYPE = 61
- class chewie.radius_attributes.ReplyMessage(data_type)
Bases:
Attribute
Reply-Message https://tools.ietf.org/html/rfc2865#section-5.18
- DESCRIPTION = 'Reply-Message'
- TYPE = 18
- class chewie.radius_attributes.ServiceType(data_type)
Bases:
Attribute
Service-Type https://tools.ietf.org/html/rfc2865#section-5.6
- DESCRIPTION = 'Service-Type'
- TYPE = 6
- class chewie.radius_attributes.SessionTimeout(data_type)
Bases:
Attribute
Vendor-Specific https://tools.ietf.org/html/rfc2865#section-5.27
- DESCRIPTION = 'Session-Timeout'
- TYPE = 27
- class chewie.radius_attributes.State(data_type)
Bases:
Attribute
State https://tools.ietf.org/html/rfc2865#section-5.24
- DESCRIPTION = 'State'
- TYPE = 24
- class chewie.radius_attributes.TunnelMediumType(data_type)
Bases:
Attribute
NAS-Port-Type https://tools.ietf.org/html/rfc2868#section-3.2
- DESCRIPTION = 'Tunnel-Medium-Type'
- TYPE = 65
- class chewie.radius_attributes.TunnelPrivateGroupID(data_type)
Bases:
Attribute
NAS-Port-Type https://tools.ietf.org/html/rfc2868#section-3.6
- DESCRIPTION = 'Tunnel-Private-Group-ID'
- TYPE = 81
- class chewie.radius_attributes.TunnelType(data_type)
Bases:
Attribute
NAS-Port-Type https://tools.ietf.org/html/rfc2868#section-3.1
- DESCRIPTION = 'Tunnel-Type'
- TYPE = 64
- class chewie.radius_attributes.UserName(data_type)
Bases:
Attribute
User-Name https://tools.ietf.org/html/rfc2865#section-5.1
- DESCRIPTION = 'User-Name'
- TYPE = 1
- class chewie.radius_attributes.UserPassword(data_type)
Bases:
Attribute
User-Password https://tools.ietf.org/html/rfc2865#section-5.2
- DESCRIPTION = 'User-Password'
- TYPE = 2
- static decrypt(secret, req_authenticator, ciphertext)
- static encrypt(secret, req_authenticator, password)
- class chewie.radius_attributes.VendorSpecific(data_type)
Bases:
Attribute
Vendor-Specific https://tools.ietf.org/html/rfc2865#section-5.26
- DESCRIPTION = 'Vendor-Specific'
- TYPE = 26
- chewie.radius_attributes.register_attribute_type(cls)
Decoratot to register RADIUS attribute types