diff options
author | Dimitri Staessens <[email protected]> | 2021-06-28 21:47:09 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-06-29 08:56:03 +0200 |
commit | d5c7ea1f1470e5a0cd1e2818034f248f6b5dbd02 (patch) | |
tree | fd97e0b4b84e80f2429727e8882158647c0f563f /include | |
parent | 16675c72764c59644c1822bf481482fcbd6e850c (diff) | |
download | ouroboros-d5c7ea1f1470e5a0cd1e2818034f248f6b5dbd02.tar.gz ouroboros-d5c7ea1f1470e5a0cd1e2818034f248f6b5dbd02.zip |
lib: Pass full path for RIB entries
The read functions for the RIB will now receive the full path, instead
of only the entry name. For IPCPs, we organized the RIB in an
/<ipcp>/<component>/entries
structure with a directory per component, so we don't need the full
path at this point. For process flow information, it's a lot more
convenient to organize it the following way
/<pid>/<fd>/stat
We can then register/unregister the flow descriptor when the frct
instance is created, and for getting the stats, we'd know the flow
descriptor from the fuse file path. If we would create a file per flow
instead of a directory per flow, something like
/<pid>/flows/<fd>
we'd need to do additional bookkeeping to list the contents of that
directory (we would need to track all flows with an active FRCT
instance), that fuse knows because it tracks the directories.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/rib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ouroboros/rib.h b/include/ouroboros/rib.h index 3a74bee3..9eab6334 100644 --- a/include/ouroboros/rib.h +++ b/include/ouroboros/rib.h @@ -23,7 +23,8 @@ #ifndef OUROBOROS_LIB_RIB_H #define OUROBOROS_LIB_RIB_H -#define RIB_PATH_LEN 128 +#define RIB_PATH_LEN 128 +#define RIB_SEPARATOR "/" #include <sys/types.h> |