explicit ApplicationAgent(eos::sdk & sdk) :
          eos::agent_handler(sdk.get_agent_mgr()),
          eos::eth_lag_intf_handler(sdk.get_eth_lag_intf_mgr()),
          eos::eth_intf_handler(sdk.get_eth_intf_mgr()),
          eos::intf_handler(sdk.get_intf_mgr()),
          eth_lag_intf_mgr_(sdk.get_eth_lag_intf_mgr()),
          t("EthLagIntfExample") {
    watch_intf(eos::intf_id_t("Port-Channel23"), true);
    watch_eth_lag_intf(eos::intf_id_t("Port-Channel23"), true);
 }
Esempio n. 2
0
DirectFlowProgrammer::DirectFlowProgrammer(eos::sdk& sdk)
    : eos::intf_handler(sdk.get_intf_mgr())
    , eos::agent_handler(sdk.get_agent_mgr())
    , eos::timeout_handler(sdk.get_timeout_mgr())
    , m_sdk(sdk)
    , m_directFlowManager(sdk.get_directflow_mgr())
{
    auto ingress = eos::intf_id_t("Ethernet1");
    auto match = eos::flow_match_t();
    eos::flow_match_field_set_t fieldSet;
    fieldSet.input_intfs_is(true);
    match.match_field_set_is(fieldSet);
    match.input_intf_set(ingress);

    std::ostringstream ss;
    OpenFlow::Encode<OpenFlow::Release_1_0>(ss, match);
}