diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-09-20 12:17:54 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-09-20 12:17:54 +0000 |
commit | 0934aa0242f0d61f2b8f7311402cf009b88f1ca6 (patch) | |
tree | 6b28d7f1fd7407d88c17c5a34b068e72748d7dff /src/ipcpd/normal/pff.h | |
parent | 1f723a8a2a02b4657f1d286f98f714895e15a5d8 (diff) | |
parent | 2c7e3030edb84abae14042f7a1a22b44255324be (diff) | |
download | ouroboros-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/pff.h')
-rw-r--r-- | src/ipcpd/normal/pff.h | 39 |
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 */ |