summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pff.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/normal/pff.h')
-rw-r--r--src/ipcpd/normal/pff.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/ipcpd/normal/pff.h b/src/ipcpd/normal/pff.h
index 0a33d884..f44cd0e9 100644
--- a/src/ipcpd/normal/pff.h
+++ b/src/ipcpd/normal/pff.h
@@ -23,36 +23,41 @@
#ifndef OUROBOROS_IPCPD_NORMAL_PFF_H
#define OUROBOROS_IPCPD_NORMAL_PFF_H
+#include <ouroboros/ipcp.h>
+
#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
-/*
- * PFF will take a type in the future,
- * to allow different policies.
- * Only 1 fd per next hop for now.
- */
-struct pff * pff_create(void);
+struct pff * pff_create(enum pol_pff pol);
-void pff_destroy(struct pff * instance);
+void pff_destroy(struct pff * pff);
-void pff_lock(struct pff * instance);
+void pff_lock(struct pff * pff);
-void pff_unlock(struct pff * instance);
+void pff_unlock(struct pff * pff);
-int pff_add(struct pff * instance,
+int pff_add(struct pff * pff,
uint64_t addr,
- int fd);
+ int * fd,
+ size_t len);
-int pff_update(struct pff * instance,
+int pff_update(struct pff * pff,
uint64_t addr,
- int fd);
+ int * fd,
+ size_t len);
-int pff_remove(struct pff * instance,
- uint64_t addr);
+int pff_del(struct pff * pff,
+ uint64_t addr);
-void pff_flush(struct pff * instance);
+void pff_flush(struct pff * pff);
/* Returns fd towards next hop */
-int pff_nhop(struct pff * instance,
+int pff_nhop(struct pff * pff,
uint64_t addr);
+int pff_flow_state_change(struct pff * pff,
+ int fd,
+ bool up);
+
#endif /* OUROBOROS_IPCPD_NORMAL_PFF_H */