aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/VppSecurityGroupManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/VppSecurityGroupManager.hpp')
-rw-r--r--src/include/VppSecurityGroupManager.hpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/include/VppSecurityGroupManager.hpp b/src/include/VppSecurityGroupManager.hpp
new file mode 100644
index 0000000..a9ce2c8
--- /dev/null
+++ b/src/include/VppSecurityGroupManager.hpp
@@ -0,0 +1,57 @@
+/* -*- 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_SECURITY_GROUP_MANAGER_H__
+#define __VPP_SECURITY_GROUP_MANAGER_H__
+
+#include <opflexagent/Agent.h>
+#include <opflexagent/EndpointManager.h>
+
+#include <vom/acl_ethertype.hpp>
+#include <vom/acl_l3_list.hpp>
+
+using namespace VOM;
+
+namespace VPP
+{
+class SecurityGroupManager
+{
+ public:
+ SecurityGroupManager(opflexagent::Agent &agent);
+
+ static void
+ build_update(opflexagent::Agent &agent,
+ const opflexagent::EndpointListener::uri_set_t &secGrps,
+ const std::string &secGrpId,
+ ACL::l3_list::rules_t &in_rules,
+ ACL::l3_list::rules_t &out_rules,
+ ACL::acl_ethertype::ethertype_rules_t &ethertype_rules);
+
+ static std::string
+ get_id(const opflexagent::EndpointListener::uri_set_t &secGrps);
+
+ void
+ handle_set_update(const opflexagent::EndpointListener::uri_set_t &secGrps);
+ void handle_update(const opflex::modb::URI &uri);
+
+ private:
+ /**
+ * Referene to the uber-agent
+ */
+ opflexagent::Agent &m_agent;
+};
+}; // namespace VPP
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "llvm.org")
+ * End:
+ */
+
+#endif