summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ro.h
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-11-16 17:46:41 +0100
committerSander Vrijders <[email protected]>2016-11-19 17:18:59 +0100
commitf8632a11faed3402e8255f368b8eff58f3b2eadb (patch)
treef257dcb876b3258456593a5dda3b1b806acddd01 /src/ipcpd/normal/ro.h
parentdf172e82d2a5058bd0af8d49b6a0854f6a2ada6a (diff)
downloadouroboros-f8632a11faed3402e8255f368b8eff58f3b2eadb.tar.gz
ouroboros-f8632a11faed3402e8255f368b8eff58f3b2eadb.zip
ipcpd: normal: Add syncing of RIB objects
This adds the remote syncing of RIB objects. Subscribers are notified upon receipt of new/deleted/updated RIB objects.
Diffstat (limited to 'src/ipcpd/normal/ro.h')
-rw-r--r--src/ipcpd/normal/ro.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/ipcpd/normal/ro.h b/src/ipcpd/normal/ro.h
index 0dfa7e8a..6fa1db2a 100644
--- a/src/ipcpd/normal/ro.h
+++ b/src/ipcpd/normal/ro.h
@@ -24,38 +24,33 @@
#define OUROBOROS_IPCP_RO_H
enum ro_recv_set {
- ALL_MEMBERS = 0,
- NEIGHBORS
+ NO_SYNC = 0,
+ NEIGHBORS,
+ ALL_MEMBERS
};
struct ro_props {
- bool enrol_sync;
- enum ro_recv_set recv_set;
- struct timespec * expiry;
+ bool enrol_sync;
+ enum ro_recv_set recv_set;
+ struct timespec expiry;
};
/* All RIB-objects have a pathname, separated by a slash. */
-/* Takes ownership of the data */
-int ro_create(const char * name,
- uint8_t * data,
- size_t len);
+/* Takes ownership of the data and props */
+int ro_create(const char * name,
+ struct ro_props * props,
+ uint8_t * data,
+ size_t len);
int ro_delete(const char * name);
-/* Reader takes ownership of data */
-ssize_t ro_read(const char * name,
- uint8_t ** data);
-
int ro_write(const char * name,
uint8_t * data,
size_t len);
-/* Takes ownership of the props */
-int ro_props(const char * name,
- struct ro_props * props);
-
-/* Sync changes with other members in the DIF */
-int ro_sync(const char * name);
+/* Reader takes ownership of data */
+ssize_t ro_read(const char * name,
+ uint8_t ** data);
/* Callback passes ownership of the data */
struct ro_sub_ops {