summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol-pff-ops.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-09-20 12:17:54 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-09-20 12:17:54 +0000
commit0934aa0242f0d61f2b8f7311402cf009b88f1ca6 (patch)
tree6b28d7f1fd7407d88c17c5a34b068e72748d7dff /src/ipcpd/normal/pol-pff-ops.h
parent1f723a8a2a02b4657f1d286f98f714895e15a5d8 (diff)
parent2c7e3030edb84abae14042f7a1a22b44255324be (diff)
downloadouroboros-0934aa0242f0d61f2b8f7311402cf009b88f1ca6.tar.gz
ouroboros-0934aa0242f0d61f2b8f7311402cf009b88f1ca6.zip
Merged in sandervrijders/ouroboros/be-pff (pull request #604)
ipcpd: normal: Make PFF policy-based
Diffstat (limited to 'src/ipcpd/normal/pol-pff-ops.h')
-rw-r--r--src/ipcpd/normal/pol-pff-ops.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/ipcpd/normal/pol-pff-ops.h b/src/ipcpd/normal/pol-pff-ops.h
new file mode 100644
index 00000000..b8105f6f
--- /dev/null
+++ b/src/ipcpd/normal/pol-pff-ops.h
@@ -0,0 +1,63 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2017
+ *
+ * Pff policy ops
+ *
+ * Dimitri Staessens <dimitri.staessens@ugent.be>
+ * Sander Vrijders <sander.vrijders@ugent.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+#ifndef OUROBOROS_IPCPD_NORMAL_POL_PFF_OPS_H
+#define OUROBOROS_IPCPD_NORMAL_POL_PFF_OPS_H
+
+#include <stdbool.h>
+
+struct pff_i;
+
+struct pol_pff_ops {
+ struct pff_i * (* create)(void);
+
+ void (* destroy)(struct pff_i * pff_i);
+
+ void (* lock)(struct pff_i * pff_i);
+
+ void (* unlock)(struct pff_i * pff_i);
+
+ int (* add)(struct pff_i * pff_i,
+ uint64_t addr,
+ int * fd,
+ size_t len);
+
+ int (* update)(struct pff_i * pff_i,
+ uint64_t addr,
+ int * fd,
+ size_t len);
+
+ int (* del)(struct pff_i * pff_i,
+ uint64_t addr);
+
+ void (* flush)(struct pff_i * pff_i);
+
+ int (* nhop)(struct pff_i * pff_i,
+ uint64_t addr);
+
+ /* Optional operation. */
+ int (* flow_state_change)(struct pff_i * pff_i,
+ int fd,
+ bool up);
+};
+
+#endif /* OUROBOROS_IPCPD_NORMAL_POL_PFF_OPS_H */