diff options
Diffstat (limited to 'src/include/VppRuntime.hpp')
-rw-r--r-- | src/include/VppRuntime.hpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/include/VppRuntime.hpp b/src/include/VppRuntime.hpp new file mode 100644 index 0000000..0232591 --- /dev/null +++ b/src/include/VppRuntime.hpp @@ -0,0 +1,68 @@ +/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */ +/* + * Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +#ifndef __VPP_RUNTIME_H__ +#define __VPP_RUNTIME_H__ + +#include <opflexagent/Agent.h> + +#include "VppIdGen.hpp" +#include "VppUplink.hpp" +#include "VppVirtualRouter.hpp" + +namespace VPP +{ +struct Runtime +{ + Runtime(opflexagent::Agent &agent_, opflexagent::IdGenerator &idGen) + : agent(agent_) + , id_gen(idGen) + , uplink(agent) + { + } + + opflexagent::PolicyManager & + policy_manager() + { + return agent.getPolicyManager(); + } + + /** + * Referene to the uber-agent + */ + opflexagent::Agent &agent; + /** + * ID generator instance + */ + IdGen id_gen; + /** + * Uplink interface manager + */ + Uplink uplink; + /** + * Virtual Router Settings + */ + std::shared_ptr<VirtualRouter> vr; + + /** + * System Name + */ + std::string system_name; + + /** + * Transport or stitch mode + */ + bool is_transport_mode; + + private: + Runtime(const Runtime &); +}; +}; // namespace VPP + +#endif |