mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 12:48:45 +01:00
Support RFC4372
This commit is contained in:
@@ -12,6 +12,7 @@ pub mod rfc3162;
|
||||
pub mod rfc3576;
|
||||
pub mod rfc3580;
|
||||
pub mod rfc4072;
|
||||
pub mod rfc4372;
|
||||
pub mod rfc5090;
|
||||
pub mod rfc5607;
|
||||
pub mod rfc6519;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by machine generator; DO NOT EDIT.
|
||||
|
||||
use crate::avp::{AVPType, AVP};
|
||||
use crate::packet::Packet;
|
||||
|
||||
pub const CHARGEABLE_USER_IDENTITY_TYPE: AVPType = 89;
|
||||
pub fn delete_chargeable_user_identity(packet: &mut Packet) {
|
||||
packet.delete(CHARGEABLE_USER_IDENTITY_TYPE);
|
||||
}
|
||||
pub fn add_chargeable_user_identity(packet: &mut Packet, value: &[u8]) {
|
||||
packet.add(AVP::from_bytes(CHARGEABLE_USER_IDENTITY_TYPE, value));
|
||||
}
|
||||
pub fn lookup_chargeable_user_identity(packet: &Packet) -> Option<Vec<u8>> {
|
||||
packet
|
||||
.lookup(CHARGEABLE_USER_IDENTITY_TYPE)
|
||||
.map(|v| v.encode_bytes())
|
||||
}
|
||||
pub fn lookup_all_chargeable_user_identity(packet: &Packet) -> Vec<Vec<u8>> {
|
||||
let mut vec = Vec::new();
|
||||
for avp in packet.lookup_all(CHARGEABLE_USER_IDENTITY_TYPE) {
|
||||
vec.push(avp.encode_bytes())
|
||||
}
|
||||
vec
|
||||
}
|
||||
Reference in New Issue
Block a user