summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/frct.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-08 13:37:30 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-08 14:33:31 +0200
commitd13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d (patch)
treeae9898536ee5767080b39e82806804fbf9911605 /src/ipcpd/normal/frct.c
parent3c80fae407f451691a4a4178617986e32d0c8162 (diff)
downloadouroboros-d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d.tar.gz
ouroboros-d13a6dfd0f7a8ebc98cdb59cf0a04a282fa1593d.zip
ipcpd: normal: Allow exchange of static DIF information
This adds the functionality of exchanging the static DIF information between 2 DIF members. After exchange the enrollment is stopped, and the IPCP that initiated enrollment transitions to the enrolled state.
Diffstat (limited to 'src/ipcpd/normal/frct.c')
-rw-r--r--src/ipcpd/normal/frct.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c
index ba465540..2de9422d 100644
--- a/src/ipcpd/normal/frct.c
+++ b/src/ipcpd/normal/frct.c
@@ -33,9 +33,10 @@ struct frct_i {
struct frct {
struct dt_const * dtc;
+ uint32_t address;
} * frct = NULL;
-int frct_init(struct dt_const * dtc)
+int frct_init(struct dt_const * dtc, uint32_t address)
{
if (dtc == NULL)
return -1;
@@ -45,13 +46,15 @@ int frct_init(struct dt_const * dtc)
return -1;
frct->dtc = dtc;
+ frct->address = address;
return 0;
}
int frct_fini()
{
- free(frct);
+ if (frct != NULL)
+ free(frct);
return 0;
}