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")?;Trait Implementations§
Auto Trait Implementations§
impl Freeze for KdcComm
impl RefUnwindSafe for KdcComm
impl Send for KdcComm
impl Sync for KdcComm
impl Unpin for KdcComm
impl UnsafeUnpin 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