Struct cerbero_lib::KdcComm
source · pub struct KdcComm { /* private fields */ }Expand description
Struct to package the KDC’s and the protocol to communicate with them
Implementations§
source§impl KdcComm
impl KdcComm
sourcepub fn new(kdcs: Kdcs, protocol: TransportProtocol) -> Self
pub fn new(kdcs: Kdcs, protocol: TransportProtocol) -> Self
Create a new KdcComm struct
§Examples
let mut kdcs = Kdcs::new();
let kdc_ip = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
kdcs.insert("DOMAIN.COM".to_string(), kdc_ip);
let kdccomm = KdcComm::new(kdcs, TransportProtocol::TCP);sourcepub fn create_channel(&mut self, realm: &str) -> Result<Box<dyn KrbChannel>>
pub fn create_channel(&mut self, realm: &str) -> Result<Box<dyn KrbChannel>>
Create a KrbChannel for the KDC specified by it’s realm
§Examples
let mut kdcs = Kdcs::new();
let kdc_ip = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
kdcs.insert("DOMAIN.COM".to_string(), kdc_ip);
let kdccomm = KdcComm::new(kdcs, TransportProtocol::TCP);
let channel = kdccomm.create_channel("DOMAIN.COM")?;Auto Trait Implementations§
impl Freeze for KdcComm
impl RefUnwindSafe for KdcComm
impl Send for KdcComm
impl Sync for KdcComm
impl Unpin for KdcComm
impl UnwindSafe for KdcComm
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more