summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/addr_auth.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-09-20 13:56:17 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-20 14:16:34 +0200
commit2c7e3030edb84abae14042f7a1a22b44255324be (patch)
treedb0bb53b7627066ba44cc1f9f429e11d1fa7bf65 /src/ipcpd/normal/addr_auth.c
parentf9fd352f38c3c3d9e7824b8cf84b8f86e2a6d392 (diff)
downloadouroboros-2c7e3030edb84abae14042f7a1a22b44255324be.tar.gz
ouroboros-2c7e3030edb84abae14042f7a1a22b44255324be.zip
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.
Diffstat (limited to 'src/ipcpd/normal/addr_auth.c')
-rw-r--r--src/ipcpd/normal/addr_auth.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ipcpd/normal/addr_auth.c b/src/ipcpd/normal/addr_auth.c
index e4aacccd..c7c744c7 100644
--- a/src/ipcpd/normal/addr_auth.c
+++ b/src/ipcpd/normal/addr_auth.c
@@ -29,33 +29,30 @@
#include "pol/flat.h"
#include <stdlib.h>
-#include <assert.h>
-struct addr_auth {
- struct pol_addr_auth_ops * ops;
-} addr_auth;
+struct pol_addr_auth_ops * ops;
int addr_auth_init(enum pol_addr_auth type,
const void * info)
{
switch (type) {
case FLAT_RANDOM:
- addr_auth.ops = &flat_ops;
+ ops = &flat_ops;
break;
default:
log_err("Unknown address authority type.");
return -1;
}
- return addr_auth.ops->init(info);
+ return ops->init(info);
}
uint64_t addr_auth_address(void)
{
- return addr_auth.ops->address();
+ return ops->address();
}
int addr_auth_fini(void)
{
- return addr_auth.ops->fini();
+ return ops->fini();
}