pub trait DatapathOps {
// Required method
fn send_msg(&mut self, msg: &[u8]);
// Provided method
fn log(&self, _level: c_uint, _msg: &str) { ... }
}Expand description
Datapath-wide functionality.
struct Dp(std::os::unix::net::UnixDatagram);
impl libccp::DatapathOps for Dp {
fn send_msg(&mut self, msg: &[u8]) {
self.0.send(msg).unwrap_or_else(|_| (0));
}
}