Module radius::core::rfc2865[][src]

Expand description

Utility for rfc2865 packet.

This module handles the packet according to the following definition:

//! # -*- text -*-
# Copyright (C) 2020 The FreeRADIUS Server project and contributors
# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0
# Version $Id$
#
#    Attributes and values defined in RFC 2865.
#    http://www.ietf.org/rfc/rfc2865.txt
#
#    $Id$
#
ATTRIBUTE    User-Name                1    string
ATTRIBUTE    User-Password                2    string    encrypt=1
ATTRIBUTE    CHAP-Password                3    octets
ATTRIBUTE    NAS-IP-Address                4    ipaddr
ATTRIBUTE    NAS-Port                5    integer
ATTRIBUTE    Service-Type                6    integer
ATTRIBUTE    Framed-Protocol                7    integer
ATTRIBUTE    Framed-IP-Address            8    ipaddr
ATTRIBUTE    Framed-IP-Netmask            9    ipaddr
ATTRIBUTE    Framed-Routing                10    integer
ATTRIBUTE    Filter-Id                11    string
ATTRIBUTE    Framed-MTU                12    integer
ATTRIBUTE    Framed-Compression            13    integer
ATTRIBUTE    Login-IP-Host                14    ipaddr
ATTRIBUTE    Login-Service                15    integer
ATTRIBUTE    Login-TCP-Port                16    integer
# Attribute 17 is undefined
ATTRIBUTE    Reply-Message                18    string
ATTRIBUTE    Callback-Number                19    string
ATTRIBUTE    Callback-Id                20    string
# Attribute 21 is undefined
ATTRIBUTE    Framed-Route                22    string
ATTRIBUTE    Framed-IPX-Network            23    ipaddr
ATTRIBUTE    State                    24    octets
ATTRIBUTE    Class                    25    octets
ATTRIBUTE    Vendor-Specific                26    vsa
ATTRIBUTE    Session-Timeout                27    integer
ATTRIBUTE    Idle-Timeout                28    integer
ATTRIBUTE    Termination-Action            29    integer
ATTRIBUTE    Called-Station-Id            30    string
ATTRIBUTE    Calling-Station-Id            31    string
ATTRIBUTE    NAS-Identifier                32    string
ATTRIBUTE    Proxy-State                33    octets
ATTRIBUTE    Login-LAT-Service            34    string
ATTRIBUTE    Login-LAT-Node                35    string
ATTRIBUTE    Login-LAT-Group                36    octets
ATTRIBUTE    Framed-AppleTalk-Link            37    integer
ATTRIBUTE    Framed-AppleTalk-Network        38    integer
ATTRIBUTE    Framed-AppleTalk-Zone            39    string

ATTRIBUTE    CHAP-Challenge                60    octets
ATTRIBUTE    NAS-Port-Type                61    integer
ATTRIBUTE    Port-Limit                62    integer
ATTRIBUTE    Login-LAT-Port                63    string

#
#    Integer Translations
#

#    Service types

VALUE    Service-Type            Login-User        1
VALUE    Service-Type            Framed-User        2
VALUE    Service-Type            Callback-Login-User    3
VALUE    Service-Type            Callback-Framed-User    4
VALUE    Service-Type            Outbound-User        5
VALUE    Service-Type            Administrative-User    6
VALUE    Service-Type            NAS-Prompt-User        7
VALUE    Service-Type            Authenticate-Only    8
VALUE    Service-Type            Callback-NAS-Prompt    9
VALUE    Service-Type            Call-Check        10
VALUE    Service-Type            Callback-Administrative    11

#    Framed Protocols

VALUE    Framed-Protocol            PPP            1
VALUE    Framed-Protocol            SLIP            2
VALUE    Framed-Protocol            ARAP            3
VALUE    Framed-Protocol            Gandalf-SLML        4
VALUE    Framed-Protocol            Xylogics-IPX-SLIP    5
VALUE    Framed-Protocol            X.75-Synchronous    6

#    Framed Routing Values

VALUE    Framed-Routing            None            0
VALUE    Framed-Routing            Broadcast        1
VALUE    Framed-Routing            Listen            2
VALUE    Framed-Routing            Broadcast-Listen    3

#    Framed Compression Types

VALUE    Framed-Compression        None            0
VALUE    Framed-Compression        Van-Jacobson-TCP-IP    1
VALUE    Framed-Compression        IPX-Header-Compression    2
VALUE    Framed-Compression        Stac-LZS        3

#    Login Services

VALUE    Login-Service            Telnet            0
VALUE    Login-Service            Rlogin            1
VALUE    Login-Service            TCP-Clear        2
VALUE    Login-Service            PortMaster        3
VALUE    Login-Service            LAT            4
VALUE    Login-Service            X25-PAD            5
VALUE    Login-Service            X25-T3POS        6
VALUE    Login-Service            TCP-Clear-Quiet        8

#    Login-TCP-Port        (see /etc/services for more examples)

VALUE    Login-TCP-Port            Telnet            23
VALUE    Login-TCP-Port            Rlogin            513
VALUE    Login-TCP-Port            Rsh            514

#    Termination Options

VALUE    Termination-Action        Default            0
VALUE    Termination-Action        RADIUS-Request        1

#    NAS Port Types

VALUE    NAS-Port-Type            Async            0
VALUE    NAS-Port-Type            Sync            1
VALUE    NAS-Port-Type            ISDN            2
VALUE    NAS-Port-Type            ISDN-V120        3
VALUE    NAS-Port-Type            ISDN-V110        4
VALUE    NAS-Port-Type            Virtual            5
VALUE    NAS-Port-Type            PIAFS            6
VALUE    NAS-Port-Type            HDLC-Clear-Channel    7
VALUE    NAS-Port-Type            X.25            8
VALUE    NAS-Port-Type            X.75            9
VALUE    NAS-Port-Type            G.3-Fax            10
VALUE    NAS-Port-Type            SDSL            11
VALUE    NAS-Port-Type            ADSL-CAP        12
VALUE    NAS-Port-Type            ADSL-DMT        13
VALUE    NAS-Port-Type            IDSL            14
VALUE    NAS-Port-Type            Ethernet        15
VALUE    NAS-Port-Type            xDSL            16
VALUE    NAS-Port-Type            Cable            17
VALUE    NAS-Port-Type            Wireless-Other        18
VALUE    NAS-Port-Type            Wireless-802.11        19

Constants

CALLBACK_ID_TYPE
CALLBACK_NUMBER_TYPE
CALLED_STATION_ID_TYPE
CALLING_STATION_ID_TYPE
CHAP_CHALLENGE_TYPE
CHAP_PASSWORD_TYPE
CLASS_TYPE
FILTER_ID_TYPE
FRAMED_APPLE_TALK_LINK_TYPE
FRAMED_APPLE_TALK_NETWORK_TYPE
FRAMED_APPLE_TALK_ZONE_TYPE
FRAMED_COMPRESSION_IPX_HEADER_COMPRESSION
FRAMED_COMPRESSION_NONE
FRAMED_COMPRESSION_STAC_LZS
FRAMED_COMPRESSION_TYPE
FRAMED_COMPRESSION_VAN_JACOBSON_TCP_IP
FRAMED_IPX_NETWORK_TYPE
FRAMED_IP_ADDRESS_TYPE
FRAMED_IP_NETMASK_TYPE
FRAMED_MTU_TYPE
FRAMED_PROTOCOL_ARAP
FRAMED_PROTOCOL_GANDALF_SLML
FRAMED_PROTOCOL_PPP
FRAMED_PROTOCOL_SLIP
FRAMED_PROTOCOL_TYPE
FRAMED_PROTOCOL_XYLOGICS_IPX_SLIP
FRAMED_PROTOCOL_X_75_SYNCHRONOUS
FRAMED_ROUTE_TYPE
FRAMED_ROUTING_BROADCAST
FRAMED_ROUTING_BROADCAST_LISTEN
FRAMED_ROUTING_LISTEN
FRAMED_ROUTING_NONE
FRAMED_ROUTING_TYPE
IDLE_TIMEOUT_TYPE
LOGIN_IP_HOST_TYPE
LOGIN_LAT_GROUP_TYPE
LOGIN_LAT_NODE_TYPE
LOGIN_LAT_PORT_TYPE
LOGIN_LAT_SERVICE_TYPE
LOGIN_SERVICE_LAT
LOGIN_SERVICE_PORT_MASTER
LOGIN_SERVICE_RLOGIN
LOGIN_SERVICE_TCP_CLEAR
LOGIN_SERVICE_TCP_CLEAR_QUIET
LOGIN_SERVICE_TELNET
LOGIN_SERVICE_TYPE
LOGIN_SERVICE_X25_PAD
LOGIN_SERVICE_X25_T3POS
LOGIN_TCP_PORT_RLOGIN
LOGIN_TCP_PORT_RSH
LOGIN_TCP_PORT_TELNET
LOGIN_TCP_PORT_TYPE
NAS_IDENTIFIER_TYPE
NAS_IP_ADDRESS_TYPE
NAS_PORT_TYPE
NAS_PORT_TYPE_ADSL_CAP
NAS_PORT_TYPE_ADSL_DMT
NAS_PORT_TYPE_ASYNC
NAS_PORT_TYPE_CABLE
NAS_PORT_TYPE_ETHERNET
NAS_PORT_TYPE_G_3_FAX
NAS_PORT_TYPE_HDLC_CLEAR_CHANNEL
NAS_PORT_TYPE_IDSL
NAS_PORT_TYPE_ISDN
NAS_PORT_TYPE_ISDN_V110
NAS_PORT_TYPE_ISDN_V120
NAS_PORT_TYPE_PIAFS
NAS_PORT_TYPE_SDSL
NAS_PORT_TYPE_SYNC
NAS_PORT_TYPE_TYPE
NAS_PORT_TYPE_VIRTUAL
NAS_PORT_TYPE_WIRELESS_802_11
NAS_PORT_TYPE_WIRELESS_OTHER
NAS_PORT_TYPE_X_25
NAS_PORT_TYPE_X_75
NAS_PORT_TYPE_X_DSL
PORT_LIMIT_TYPE
PROXY_STATE_TYPE
REPLY_MESSAGE_TYPE
SERVICE_TYPE_ADMINISTRATIVE_USER
SERVICE_TYPE_AUTHENTICATE_ONLY
SERVICE_TYPE_CALLBACK_ADMINISTRATIVE
SERVICE_TYPE_CALLBACK_FRAMED_USER
SERVICE_TYPE_CALLBACK_LOGIN_USER
SERVICE_TYPE_CALLBACK_NAS_PROMPT
SERVICE_TYPE_CALL_CHECK
SERVICE_TYPE_FRAMED_USER
SERVICE_TYPE_LOGIN_USER
SERVICE_TYPE_NAS_PROMPT_USER
SERVICE_TYPE_OUTBOUND_USER
SERVICE_TYPE_TYPE
SESSION_TIMEOUT_TYPE
STATE_TYPE
TERMINATION_ACTION_DEFAULT
TERMINATION_ACTION_RADIUS_REQUEST
TERMINATION_ACTION_TYPE
USER_NAME_TYPE
USER_PASSWORD_TYPE
VENDOR_SPECIFIC_TYPE

Functions

add_callback_id

Add callback_id string value to a packet.

add_callback_number

Add callback_number string value to a packet.

add_called_station_id

Add called_station_id string value to a packet.

add_calling_station_id

Add calling_station_id string value to a packet.

add_chap_challenge

Add chap_challenge octets value to a packet.

add_chap_password

Add chap_password octets value to a packet.

add_class

Add class octets value to a packet.

add_filter_id

Add filter_id string value to a packet.

add_framed_apple_talk_link

Add framed_apple_talk_link integer value to a packet.

add_framed_apple_talk_network

Add framed_apple_talk_network integer value to a packet.

add_framed_apple_talk_zone

Add framed_apple_talk_zone string value to a packet.

add_framed_compression

Add framed_compression value-defined integer value to a packet.

add_framed_ip_address

Add framed_ip_address ipaddr value to a packet.

add_framed_ip_netmask

Add framed_ip_netmask ipaddr value to a packet.

add_framed_ipx_network

Add framed_ipx_network ipaddr value to a packet.

add_framed_mtu

Add framed_mtu integer value to a packet.

add_framed_protocol

Add framed_protocol value-defined integer value to a packet.

add_framed_route

Add framed_route string value to a packet.

add_framed_routing

Add framed_routing value-defined integer value to a packet.

add_idle_timeout

Add idle_timeout integer value to a packet.

add_login_ip_host

Add login_ip_host ipaddr value to a packet.

add_login_lat_group

Add login_lat_group octets value to a packet.

add_login_lat_node

Add login_lat_node string value to a packet.

add_login_lat_port

Add login_lat_port string value to a packet.

add_login_lat_service

Add login_lat_service string value to a packet.

add_login_service

Add login_service value-defined integer value to a packet.

add_login_tcp_port

Add login_tcp_port value-defined integer value to a packet.

add_nas_identifier

Add nas_identifier string value to a packet.

add_nas_ip_address

Add nas_ip_address ipaddr value to a packet.

add_nas_port

Add nas_port integer value to a packet.

add_nas_port_type

Add nas_port_type value-defined integer value to a packet.

add_port_limit

Add port_limit integer value to a packet.

add_proxy_state

Add proxy_state octets value to a packet.

add_reply_message

Add reply_message string value to a packet.

add_service_type

Add service_type value-defined integer value to a packet.

add_session_timeout

Add session_timeout integer value to a packet.

add_state

Add state octets value to a packet.

add_termination_action

Add termination_action value-defined integer value to a packet.

add_user_name

Add user_name string value to a packet.

add_user_password

Add user_password user-password value to a packet.

delete_callback_id

Delete all of callback_id values from a packet.

delete_callback_number

Delete all of callback_number values from a packet.

delete_called_station_id

Delete all of called_station_id values from a packet.

delete_calling_station_id

Delete all of calling_station_id values from a packet.

delete_chap_challenge

Delete all of chap_challenge values from a packet.

delete_chap_password

Delete all of chap_password values from a packet.

delete_class

Delete all of class values from a packet.

delete_filter_id

Delete all of filter_id values from a packet.

delete_framed_apple_talk_link

Delete all of framed_apple_talk_link values from a packet.

delete_framed_apple_talk_network

Delete all of framed_apple_talk_network values from a packet.

delete_framed_apple_talk_zone

Delete all of framed_apple_talk_zone values from a packet.

delete_framed_compression

Delete all of framed_compression values from a packet.

delete_framed_ip_address

Delete all of framed_ip_address values from a packet.

delete_framed_ip_netmask

Delete all of framed_ip_netmask values from a packet.

delete_framed_ipx_network

Delete all of framed_ipx_network values from a packet.

delete_framed_mtu

Delete all of framed_mtu values from a packet.

delete_framed_protocol

Delete all of framed_protocol values from a packet.

delete_framed_route

Delete all of framed_route values from a packet.

delete_framed_routing

Delete all of framed_routing values from a packet.

delete_idle_timeout

Delete all of idle_timeout values from a packet.

delete_login_ip_host

Delete all of login_ip_host values from a packet.

delete_login_lat_group

Delete all of login_lat_group values from a packet.

delete_login_lat_node

Delete all of login_lat_node values from a packet.

delete_login_lat_port

Delete all of login_lat_port values from a packet.

delete_login_lat_service

Delete all of login_lat_service values from a packet.

delete_login_service

Delete all of login_service values from a packet.

delete_login_tcp_port

Delete all of login_tcp_port values from a packet.

delete_nas_identifier

Delete all of nas_identifier values from a packet.

delete_nas_ip_address

Delete all of nas_ip_address values from a packet.

delete_nas_port

Delete all of nas_port values from a packet.

delete_nas_port_type

Delete all of nas_port_type values from a packet.

delete_port_limit

Delete all of port_limit values from a packet.

delete_proxy_state

Delete all of proxy_state values from a packet.

delete_reply_message

Delete all of reply_message values from a packet.

delete_service_type

Delete all of service_type values from a packet.

delete_session_timeout

Delete all of session_timeout values from a packet.

delete_state

Delete all of state values from a packet.

delete_termination_action

Delete all of termination_action values from a packet.

delete_user_name

Delete all of user_name values from a packet.

delete_user_password

Delete all of user_password values from a packet.

delete_vendor_specific

Delete all of vendor_specific values from a packet.

lookup_all_callback_id

Lookup all of the callback_id string value from a packet.

lookup_all_callback_number

Lookup all of the callback_number string value from a packet.

lookup_all_called_station_id

Lookup all of the called_station_id string value from a packet.

lookup_all_calling_station_id

Lookup all of the calling_station_id string value from a packet.

lookup_all_chap_challenge

Lookup all of the chap_challenge octets value from a packet.

lookup_all_chap_password

Lookup all of the chap_password octets value from a packet.

lookup_all_class

Lookup all of the class octets value from a packet.

lookup_all_filter_id

Lookup all of the filter_id string value from a packet.

lookup_all_framed_apple_talk_link

Lookup all of the framed_apple_talk_link integer value from a packet.

lookup_all_framed_apple_talk_network

Lookup all of the framed_apple_talk_network integer value from a packet.

lookup_all_framed_apple_talk_zone

Lookup all of the framed_apple_talk_zone string value from a packet.

lookup_all_framed_compression

Lookup all of the framed_compression value-defined integer value from a packet.

lookup_all_framed_ip_address

Lookup all of the framed_ip_address ipaddr value from a packet.

lookup_all_framed_ip_netmask

Lookup all of the framed_ip_netmask ipaddr value from a packet.

lookup_all_framed_ipx_network

Lookup all of the framed_ipx_network ipaddr value from a packet.

lookup_all_framed_mtu

Lookup all of the framed_mtu integer value from a packet.

lookup_all_framed_protocol

Lookup all of the framed_protocol value-defined integer value from a packet.

lookup_all_framed_route

Lookup all of the framed_route string value from a packet.

lookup_all_framed_routing

Lookup all of the framed_routing value-defined integer value from a packet.

lookup_all_idle_timeout

Lookup all of the idle_timeout integer value from a packet.

lookup_all_login_ip_host

Lookup all of the login_ip_host ipaddr value from a packet.

lookup_all_login_lat_group

Lookup all of the login_lat_group octets value from a packet.

lookup_all_login_lat_node

Lookup all of the login_lat_node string value from a packet.

lookup_all_login_lat_port

Lookup all of the login_lat_port string value from a packet.

lookup_all_login_lat_service

Lookup all of the login_lat_service string value from a packet.

lookup_all_login_service

Lookup all of the login_service value-defined integer value from a packet.

lookup_all_login_tcp_port

Lookup all of the login_tcp_port value-defined integer value from a packet.

lookup_all_nas_identifier

Lookup all of the nas_identifier string value from a packet.

lookup_all_nas_ip_address

Lookup all of the nas_ip_address ipaddr value from a packet.

lookup_all_nas_port

Lookup all of the nas_port integer value from a packet.

lookup_all_nas_port_type

Lookup all of the nas_port_type value-defined integer value from a packet.

lookup_all_port_limit

Lookup all of the port_limit integer value from a packet.

lookup_all_proxy_state

Lookup all of the proxy_state octets value from a packet.

lookup_all_reply_message

Lookup all of the reply_message string value from a packet.

lookup_all_service_type

Lookup all of the service_type value-defined integer value from a packet.

lookup_all_session_timeout

Lookup all of the session_timeout integer value from a packet.

lookup_all_state

Lookup all of the state octets value from a packet.

lookup_all_termination_action

Lookup all of the termination_action value-defined integer value from a packet.

lookup_all_user_name

Lookup all of the user_name string value from a packet.

lookup_all_user_password

Lookup all of the user_password user-password value from a packet.

lookup_callback_id

Lookup a callback_id string value from a packet.

lookup_callback_number

Lookup a callback_number string value from a packet.

lookup_called_station_id

Lookup a called_station_id string value from a packet.

lookup_calling_station_id

Lookup a calling_station_id string value from a packet.

lookup_chap_challenge

Lookup a chap_challenge octets value from a packet.

lookup_chap_password

Lookup a chap_password octets value from a packet.

lookup_class

Lookup a class octets value from a packet.

lookup_filter_id

Lookup a filter_id string value from a packet.

lookup_framed_apple_talk_link

Lookup a framed_apple_talk_link integer value from a packet.

lookup_framed_apple_talk_network

Lookup a framed_apple_talk_network integer value from a packet.

lookup_framed_apple_talk_zone

Lookup a framed_apple_talk_zone string value from a packet.

lookup_framed_compression

Lookup a framed_compression value-defined integer value from a packet.

lookup_framed_ip_address

Lookup a framed_ip_address ipaddr value from a packet.

lookup_framed_ip_netmask

Lookup a framed_ip_netmask ipaddr value from a packet.

lookup_framed_ipx_network

Lookup a framed_ipx_network ipaddr value from a packet.

lookup_framed_mtu

Lookup a framed_mtu integer value from a packet.

lookup_framed_protocol

Lookup a framed_protocol value-defined integer value from a packet.

lookup_framed_route

Lookup a framed_route string value from a packet.

lookup_framed_routing

Lookup a framed_routing value-defined integer value from a packet.

lookup_idle_timeout

Lookup a idle_timeout integer value from a packet.

lookup_login_ip_host

Lookup a login_ip_host ipaddr value from a packet.

lookup_login_lat_group

Lookup a login_lat_group octets value from a packet.

lookup_login_lat_node

Lookup a login_lat_node string value from a packet.

lookup_login_lat_port

Lookup a login_lat_port string value from a packet.

lookup_login_lat_service

Lookup a login_lat_service string value from a packet.

lookup_login_service

Lookup a login_service value-defined integer value from a packet.

lookup_login_tcp_port

Lookup a login_tcp_port value-defined integer value from a packet.

lookup_nas_identifier

Lookup a nas_identifier string value from a packet.

lookup_nas_ip_address

Lookup a nas_ip_address ipaddr value from a packet.

lookup_nas_port

Lookup a nas_port integer value from a packet.

lookup_nas_port_type

Lookup a nas_port_type value-defined integer value from a packet.

lookup_port_limit

Lookup a port_limit integer value from a packet.

lookup_proxy_state

Lookup a proxy_state octets value from a packet.

lookup_reply_message

Lookup a reply_message string value from a packet.

lookup_service_type

Lookup a service_type value-defined integer value from a packet.

lookup_session_timeout

Lookup a session_timeout integer value from a packet.

lookup_state

Lookup a state octets value from a packet.

lookup_termination_action

Lookup a termination_action value-defined integer value from a packet.

lookup_user_name

Lookup a user_name string value from a packet.

lookup_user_password

Lookup a user_password user-password value from a packet.

Type Definitions

FramedCompression
FramedProtocol
FramedRouting
LoginService
LoginTCPPort
NasPortType
ServiceType
TerminationAction