mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 17:08:45 +01:00
Support RFC6519
This commit is contained in:
@@ -15,6 +15,7 @@ This supports the following RFC dictionaries at the moment:
|
||||
- [RFC2867](https://tools.ietf.org/html/rfc2867)
|
||||
- [RFC2868](https://tools.ietf.org/html/rfc2868)
|
||||
- [RFC3576](https://tools.ietf.org/html/rfc3576)
|
||||
- [RFC6519](https://tools.ietf.org/html/rfc6519)
|
||||
- [RFC6677](https://tools.ietf.org/html/rfc6677)
|
||||
|
||||
## Usage
|
||||
@@ -45,7 +46,6 @@ Simple example implementations are here:
|
||||
- rfc5580
|
||||
- rfc5607
|
||||
- rfc5904
|
||||
- rfc6519
|
||||
- rfc6572
|
||||
- rfc6911
|
||||
- rfc6929
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- 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 6519.
|
||||
# http://www.ietf.org/rfc/rfc6519.txt
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ATTRIBUTE DS-Lite-Tunnel-Name 144 string
|
||||
@@ -8,5 +8,6 @@ pub mod rfc2866;
|
||||
pub mod rfc2867;
|
||||
pub mod rfc2868;
|
||||
pub mod rfc3576;
|
||||
pub mod rfc6519;
|
||||
pub mod rfc6677;
|
||||
pub mod tag;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by machine generator; DO NOT EDIT.
|
||||
|
||||
use crate::avp::{AVPError, AVPType, AVP};
|
||||
use crate::packet::Packet;
|
||||
|
||||
pub const DS_LITE_TUNNEL_NAME_TYPE: AVPType = 144;
|
||||
pub fn delete_ds_lite_tunnel_name(packet: &mut Packet) {
|
||||
packet.delete(DS_LITE_TUNNEL_NAME_TYPE);
|
||||
}
|
||||
pub fn add_ds_lite_tunnel_name(packet: &mut Packet, value: &str) {
|
||||
packet.add(AVP::from_string(DS_LITE_TUNNEL_NAME_TYPE, value));
|
||||
}
|
||||
pub fn lookup_ds_lite_tunnel_name(packet: &Packet) -> Option<Result<String, AVPError>> {
|
||||
packet
|
||||
.lookup(DS_LITE_TUNNEL_NAME_TYPE)
|
||||
.map(|v| v.encode_string())
|
||||
}
|
||||
pub fn lookup_all_ds_lite_tunnel_name(packet: &Packet) -> Result<Vec<String>, AVPError> {
|
||||
let mut vec = Vec::new();
|
||||
for avp in packet.lookup_all(DS_LITE_TUNNEL_NAME_TYPE) {
|
||||
vec.push(avp.encode_string()?)
|
||||
}
|
||||
Ok(vec)
|
||||
}
|
||||
Reference in New Issue
Block a user