mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-24 23:04:43 +01:00
Support rfc2867
This commit is contained in:
19
dicts/dictionary.rfc2867
Normal file
19
dicts/dictionary.rfc2867
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- 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 2867.
|
||||
# http://www.ietf.org/rfc/rfc2867.txt
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
ATTRIBUTE Acct-Tunnel-Connection 68 string
|
||||
ATTRIBUTE Acct-Tunnel-Packets-Lost 86 integer
|
||||
|
||||
VALUE Acct-Status-Type Tunnel-Start 9
|
||||
VALUE Acct-Status-Type Tunnel-Stop 10
|
||||
VALUE Acct-Status-Type Tunnel-Reject 11
|
||||
VALUE Acct-Status-Type Tunnel-Link-Start 12
|
||||
VALUE Acct-Status-Type Tunnel-Link-Stop 13
|
||||
VALUE Acct-Status-Type Tunnel-Link-Reject 14
|
||||
@@ -11,5 +11,6 @@ pub mod request;
|
||||
pub mod request_handler;
|
||||
pub mod rfc2865;
|
||||
pub mod rfc2866;
|
||||
pub mod rfc2867;
|
||||
pub mod secret_provider;
|
||||
pub mod server;
|
||||
|
||||
43
src/rfc2867.rs
Normal file
43
src/rfc2867.rs
Normal file
@@ -0,0 +1,43 @@
|
||||
// Code generated by machine generator; DO NOT EDIT.
|
||||
|
||||
use crate::attribute::Attribute;
|
||||
use crate::attributes::AVPType;
|
||||
use crate::packet::Packet;
|
||||
|
||||
pub type AcctStatusType = u32;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_START: AcctStatusType = 9;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_STOP: AcctStatusType = 10;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_REJECT: AcctStatusType = 11;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_LINK_START: AcctStatusType = 12;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_LINK_STOP: AcctStatusType = 13;
|
||||
pub const ACCT_STATUS_TYPE_TUNNEL_LINK_REJECT: AcctStatusType = 14;
|
||||
|
||||
pub const ACCT_TUNNEL_CONNECTION_TYPE: AVPType = 68;
|
||||
pub fn delete_acct_tunnel_connection(packet: &mut Packet) {
|
||||
packet.delete(ACCT_TUNNEL_CONNECTION_TYPE);
|
||||
}
|
||||
pub fn lookup_acct_tunnel_connection(packet: &Packet) -> Option<&Attribute> {
|
||||
packet.lookup(ACCT_TUNNEL_CONNECTION_TYPE)
|
||||
}
|
||||
pub fn lookup_all_acct_tunnel_connection(packet: &Packet) -> Vec<&Attribute> {
|
||||
packet.lookup_all(ACCT_TUNNEL_CONNECTION_TYPE)
|
||||
}
|
||||
pub fn add_acct_tunnel_connection(packet: &mut Packet, value: &str) {
|
||||
let attr = Attribute::from_string(value);
|
||||
packet.add(ACCT_TUNNEL_CONNECTION_TYPE, &attr);
|
||||
}
|
||||
|
||||
pub const ACCT_TUNNEL_PACKETS_LOST_TYPE: AVPType = 86;
|
||||
pub fn delete_acct_tunnel_packets_lost(packet: &mut Packet) {
|
||||
packet.delete(ACCT_TUNNEL_PACKETS_LOST_TYPE);
|
||||
}
|
||||
pub fn lookup_acct_tunnel_packets_lost(packet: &Packet) -> Option<&Attribute> {
|
||||
packet.lookup(ACCT_TUNNEL_PACKETS_LOST_TYPE)
|
||||
}
|
||||
pub fn lookup_all_acct_tunnel_packets_lost(packet: &Packet) -> Vec<&Attribute> {
|
||||
packet.lookup_all(ACCT_TUNNEL_PACKETS_LOST_TYPE)
|
||||
}
|
||||
pub fn add_acct_tunnel_packets_lost(packet: &mut Packet, value: u32) {
|
||||
let attr = Attribute::from_u32(value);
|
||||
packet.add(ACCT_TUNNEL_PACKETS_LOST_TYPE, &attr);
|
||||
}
|
||||
Reference in New Issue
Block a user