#[non_exhaustive]pub struct RadiusMessage {
pub code: RadiusCodeKind,
pub identifier: u8,
pub authenticator_len: usize,
pub username: Option<String>,
pub calling_station_id: Option<String>,
pub called_station_id: Option<String>,
pub nas_ip_address: Option<Ipv4Addr>,
pub framed_ip_address: Option<Ipv4Addr>,
pub has_user_password: bool,
}radius only.Expand description
One parsed RADIUS message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: RadiusCodeKindDecoded RFC 2865 §3 code.
identifier: u8The 1-byte identifier — matches requests with their responses.
authenticator_len: usizeAuthenticator length (always 16 octets — included for round-trip completeness).
username: Option<String>User-Name attribute (RFC 2865 §5.1). Cleartext.
calling_station_id: Option<String>Calling-Station-Id (RFC 2865 §5.31) — typically a MAC address for wireless, or a calling phone number for dial-up. Cleartext.
called_station_id: Option<String>Called-Station-Id (RFC 2865 §5.30) — typically NAS MAC + SSID for wireless.
nas_ip_address: Option<Ipv4Addr>NAS-IP-Address (RFC 2865 §5.4) — the network-access-server’s IP.
framed_ip_address: Option<Ipv4Addr>Framed-IP-Address (RFC 2865 §5.8) — the IP assigned to the user after authentication.
has_user_password: booltrue when a User-Password attribute (RFC 2865
§5.2) was present. The bytes are not surfaced —
they’re MD5(shared_secret || authenticator)-XOR’d
per the RFC; cleartext recovery requires the
shared secret which a passive observer doesn’t
have.
Trait Implementations§
Source§impl Clone for RadiusMessage
impl Clone for RadiusMessage
Source§impl Debug for RadiusMessage
impl Debug for RadiusMessage
Source§impl<'de> Deserialize<'de> for RadiusMessage
Available on crate feature serde only.
impl<'de> Deserialize<'de> for RadiusMessage
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RadiusMessage
Source§impl PartialEq for RadiusMessage
impl PartialEq for RadiusMessage
Source§impl Serialize for RadiusMessage
Available on crate feature serde only.
impl Serialize for RadiusMessage
serde only.