Skip to main content

OfpController

Trait OfpController 

Source
pub trait OfpController {
    type Message: OfpMessage;

    // Required methods
    fn send_message(_: u32, _: Self::Message, _: &mut TcpStream);
    fn handle_client_connected(_: &mut TcpStream);
}
Expand description

OpenFlow Controller

Version-agnostic API for implementing an OpenFlow controller.

Required Associated Types§

Source

type Message: OfpMessage

OpenFlow message type supporting the same protocol version as the controller.

Required Methods§

Source

fn send_message(_: u32, _: Self::Message, _: &mut TcpStream)

Send a message to the node associated with the given TcpStream.

Source

fn handle_client_connected(_: &mut TcpStream)

Perform handshake and begin loop reading incoming messages from client stream.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Controller: OF0x01Controller> OfpController for Controller