summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/frct.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-07-27 16:46:23 +0200
committerSander Vrijders <[email protected]>2016-07-27 16:46:23 +0200
commit0c0508619959b5ac98b31b4389fcfadf5ee26d9b (patch)
tree08b53089bd819a215412041282776fb225b31395 /src/ipcpd/normal/frct.c
parentbee74baa8fa8ffa71dbb659496bc88df3e8ce6a5 (diff)
downloadouroboros-0c0508619959b5ac98b31b4389fcfadf5ee26d9b.tar.gz
ouroboros-0c0508619959b5ac98b31b4389fcfadf5ee26d9b.zip
ipcpd: normal: Provide initial steps for enrollment
This provides the normal IPCP with bootstrapping and the initial steps for enrollment. Next step is actually reacting to an enrollment request and sending the data transfer constants.
Diffstat (limited to 'src/ipcpd/normal/frct.c')
-rw-r--r--src/ipcpd/normal/frct.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c
index 22f8a9fc..49006276 100644
--- a/src/ipcpd/normal/frct.c
+++ b/src/ipcpd/normal/frct.c
@@ -22,6 +22,8 @@
#define OUROBOROS_PREFIX "flow-rtx-control"
+#include <stdlib.h>
+
#include <ouroboros/logs.h>
#include "frct.h"
@@ -30,16 +32,29 @@ struct frct_i {
};
-int frct_init(struct dt_const * dt_const)
+struct frct {
+ struct dt_const * dtc;
+
+} * frct = NULL;
+
+int frct_init(struct dt_const * dtc)
{
- LOG_MISSING;
+ if (dtc == NULL)
+ return -1;
+
+ frct = malloc(sizeof(*frct));
+ if (frct == NULL) {
+ return -1;
+ }
+
+ frct->dtc = dtc;
return 0;
}
int frct_fini()
{
- LOG_MISSING;
+ free(frct);
return 0;
}