Skip to content

AA Mobile Node

API reference for diameter.message.commands.aa_mobile_node.

This module contains AA Mobile Node Request and Answer messages, implementing AVPs documented in rfc4004.

AaMobileNode

AaMobileNode(header: MessageHeader = None, avps: list[Avp] = None)

Bases: DefinedMessage

An AA-Mobile-Node base message.

This message class lists message attributes based on the current rfc4004 as python properties, acessible as instance attributes. AVPs not listed in the base protocol can be retrieved using the AaMobileNode.find_avps search method.

Examples:

AVPs accessible either as instance attributes or by searching:

>>> msg = Message.from_bytes(b"...")
>>> msg.session_id
dra1.mvno.net;2323;546
>>> msg.find_avps((AVP_SESSION_ID, 0))
['dra1.mvno.net;2323;546']

When diameter message is decoded using Message.from_bytes, it returns either an instance of AaMobileNodeRequest or AaMobileNodeAnswer automatically:

>>> msg = Message.from_bytes(b"...")
>>> assert msg.header.is_request is True
>>> assert isinstance(msg, AaMobileNodeRequest)

When creating a new message, the AaMobileNodeRequest or AaMobileNodeAnswer class should be instantiated directly, and values for AVPs set as class attributes:

>>> msg = AaMobileNodeRequest()
>>> msg.session_id = "dra1.mvno.net;2323;546"

Other, custom AVPs can be appended to the message using the AaMobileNode.append_avp method, or by overwriting the avp attribute entirely. Regardless of the custom AVPs set, the mandatory values listed in rfc4004 must be set, however they can be set as None, if they are not to be used.

Warning

Every AVP documented for the subclasses of this command can be accessed as an instance attribute, even if the original network-received message did not contain that specific AVP. Such AVPs will be returned with the value None when accessed.

Every other AVP not mentioned here, and not present in a network-received message will raise an AttributeError when being accessed; their presence should be validated with hasattr before accessing.

AaMobileNodeAnswer

AaMobileNodeAnswer(
    header: MessageHeader = None, avps: list[Avp] = None
)

Bases: AaMobileNode

An AA-Mobile-Node-Answer message.

acct_multi_session_id instance-attribute

acct_multi_session_id: str

auth_application_id instance-attribute

auth_application_id: int

auth_session_state instance-attribute

auth_session_state: int

authorization_lifetime instance-attribute

authorization_lifetime: int

error_message instance-attribute

error_message: str

error_reporting_host instance-attribute

error_reporting_host: bytes

mip_fa_to_ha_msa instance-attribute

mip_fa_to_ha_msa: MipFaToHaMsa

mip_fa_to_mn_msa instance-attribute

mip_fa_to_mn_msa: MipFaToMnMsa

mip_feature_vector instance-attribute

mip_feature_vector: int

mip_filter_rule instance-attribute

mip_filter_rule: list[bytes]

mip_ha_to_mn_msa instance-attribute

mip_ha_to_mn_msa: MipHaToMnMsa

mip_home_agent_address instance-attribute

mip_home_agent_address: str

mip_mn_to_fa_msa instance-attribute

mip_mn_to_fa_msa: MipMnToFaMsa

mip_mn_to_ha_msa instance-attribute

mip_mn_to_ha_msa: MipMnToHaMsa

mip_mobile_node_address instance-attribute

mip_mobile_node_address: str

mip_msa_lifetime instance-attribute

mip_msa_lifetime: int

mip_reg_reply instance-attribute

mip_reg_reply: bytes

origin_host instance-attribute

origin_host: bytes

origin_realm instance-attribute

origin_realm: bytes

origin_state_id instance-attribute

origin_state_id: int

proxy_info instance-attribute

proxy_info: list[ProxyInfo]

re_auth_request_type instance-attribute

re_auth_request_type: int

result_code instance-attribute

result_code: int

session_id instance-attribute

session_id: str

user_name instance-attribute

user_name: str

AaMobileNodeRequest

AaMobileNodeRequest(
    header: MessageHeader = None, avps: list[Avp] = None
)

Bases: AaMobileNode

An AA-Mobile-Node-Request message.

acct_multi_session_id instance-attribute

acct_multi_session_id: str

auth_application_id instance-attribute

auth_application_id: int

auth_session_state instance-attribute

auth_session_state: int

authorization_lifetime instance-attribute

authorization_lifetime: int

destination_host instance-attribute

destination_host: bytes

destination_realm instance-attribute

destination_realm: bytes

mip_candidate_home_agent_host instance-attribute

mip_candidate_home_agent_host: bytes

mip_fa_challenge instance-attribute

mip_fa_challenge: bytes

mip_feature_vector instance-attribute

mip_feature_vector: int

mip_ha_to_fa_spi instance-attribute

mip_ha_to_fa_spi: int

mip_home_agent_address instance-attribute

mip_home_agent_address: str

mip_home_agent_host instance-attribute

mip_home_agent_host: MipHomeAgentHost

mip_mn_aaa_auth instance-attribute

mip_mn_aaa_auth: MipMnAaaAuth

mip_mobile_node_address instance-attribute

mip_mobile_node_address: str

mip_originating_foreign_aaa instance-attribute

mip_originating_foreign_aaa: MipOriginatingForeignAaa

mip_reg_request instance-attribute

mip_reg_request: bytes

origin_host instance-attribute

origin_host: bytes

origin_realm instance-attribute

origin_realm: bytes

origin_state_id instance-attribute

origin_state_id: int

proxy_info instance-attribute

proxy_info: list[ProxyInfo]

route_record instance-attribute

route_record: list[bytes]

session_id instance-attribute

session_id: str

user_name instance-attribute

user_name: str