Struct radius_rust::protocol::host::Host [−][src]
Generic struct that holds Server & Client common functions and attributes
Implementations
impl Host
[src]
pub fn initialise_host(
auth_port: u16,
acct_port: u16,
coa_port: u16,
dictionary: Dictionary
) -> Host
[src]
auth_port: u16,
acct_port: u16,
coa_port: u16,
dictionary: Dictionary
) -> Host
Initialises host instance
pub fn create_attribute_by_name(
&self,
attribute_name: &str,
value: Vec<u8>
) -> Result<RadiusAttribute, RadiusError>
[src]
&self,
attribute_name: &str,
value: Vec<u8>
) -> Result<RadiusAttribute, RadiusError>
Creates RadiusAttribute with given name (name is checked against Dictionary)
pub fn create_attribute_by_id(
&self,
attribute_id: u8,
value: Vec<u8>
) -> Result<RadiusAttribute, RadiusError>
[src]
&self,
attribute_id: u8,
value: Vec<u8>
) -> Result<RadiusAttribute, RadiusError>
Creates RadiusAttribute with given id (id is checked against Dictionary)
pub fn get_port(&self, code: &TypeCode) -> Option<u16>
[src]
Returns port of RADIUS server, that receives given type of RADIUS message/packet
pub fn get_dictionary(&self) -> &Dictionary
[src]
Returns host's dictionary instance
pub fn get_dictionary_value_by_attr_and_value_name(
&self,
attr_name: &str,
value_name: &str
) -> Option<&DictionaryValue>
[src]
&self,
attr_name: &str,
value_name: &str
) -> Option<&DictionaryValue>
Returns VALUE from dictionary with given attribute * value names
pub fn get_dictionary_attribute_by_id(
&self,
packet_attr_id: u8
) -> Option<&DictionaryAttribute>
[src]
&self,
packet_attr_id: u8
) -> Option<&DictionaryAttribute>
Returns ATTRIBUTE from dictionary with given id
pub fn get_dictionary_attribute_by_name(
&self,
packet_attr_name: &str
) -> Option<&DictionaryAttribute>
[src]
&self,
packet_attr_name: &str
) -> Option<&DictionaryAttribute>
Returns ATTRIBUTE from dictionary with given name
pub fn initialise_packet_from_bytes(
&self,
packet: &[u8]
) -> Result<RadiusPacket, RadiusError>
[src]
&self,
packet: &[u8]
) -> Result<RadiusPacket, RadiusError>
Initialises RadiusPacket from bytes
pub fn verify_packet_attributes(&self, packet: &[u8]) -> Result<(), RadiusError>
[src]
Verifies that RadiusPacket attributes have valid values
Note: doesn't verify Message-Authenticator attribute, because it is HMAC-MD5 hash, not an ASCII string
pub fn verify_message_authenticator(
&self,
secret: &str,
packet: &[u8]
) -> Result<(), RadiusError>
[src]
&self,
secret: &str,
packet: &[u8]
) -> Result<(), RadiusError>
Verifies Message-Authenticator value
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Host
[src]
impl Send for Host
[src]
impl Sync for Host
[src]
impl Unpin for Host
[src]
impl UnwindSafe for Host
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,