summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pff.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-09-21 14:58:07 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-09-21 14:58:07 +0000
commite2d3b18ab787ebe090cd958cc63be655be86f42c (patch)
treea51f0260c4445ddf35fb190e605704669e84bb94 /src/ipcpd/normal/pff.c
parente5336f1309c42da770ef7aa603b463ad4d24e2c9 (diff)
parentf6071ecf0cd3768eaed9a847f676433c120ea89e (diff)
downloadouroboros-e2d3b18ab787ebe090cd958cc63be655be86f42c.tar.gz
ouroboros-e2d3b18ab787ebe090cd958cc63be655be86f42c.zip
Merged in sandervrijders/ouroboros/be-lfa-pff (pull request #607)
ipcpd: normal: Add alternate hop PFF
Diffstat (limited to 'src/ipcpd/normal/pff.c')
-rw-r--r--src/ipcpd/normal/pff.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ipcpd/normal/pff.c b/src/ipcpd/normal/pff.c
index 27ff17f7..3d114aa1 100644
--- a/src/ipcpd/normal/pff.c
+++ b/src/ipcpd/normal/pff.c
@@ -24,6 +24,7 @@
#include "pff.h"
#include "pol-pff-ops.h"
+#include "pol/alternate_pff.h"
#include "pol/simple_pff.h"
struct pff {
@@ -40,16 +41,20 @@ struct pff * pff_create(enum pol_pff pol)
return NULL;
switch (pol) {
- case SIMPLE_PFF:
+ case PFF_ALTERNATE:
+ pff->ops = &alternate_pff_ops;
+ break;
+ case PFF_SIMPLE:
pff->ops = &simple_pff_ops;
- pff->pff_i = pff->ops->create();
- if (pff->pff_i == NULL)
- goto err;
break;
default:
goto err;
}
+ pff->pff_i = pff->ops->create();
+ if (pff->pff_i == NULL)
+ goto err;
+
return pff;
err:
free(pff);