From 2c7e3030edb84abae14042f7a1a22b44255324be Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 20 Sep 2017 13:56:17 +0200 Subject: ipcpd: normal: Make PFF policy-based This turns the PDU Forwarding Function of the IPCP into a policy. For now only the simple PFF policy is available. --- src/ipcpd/normal/pff.h | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'src/ipcpd/normal/pff.h') 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 + #include +#include +#include -/* - * 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 */ -- cgit v1.2.3