| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The code was a bit convoluted to print hashes as hex strings. Renamed
to HASH_FMT32 and HASH_VAL32 to make clear we are printing the first
32 bits only, and added options to print 64 up to 512 bits as well.
This doesn't depend on endianness anymore. Adds a small test for the
hash (printing) functions.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
| |
There was a missing bmp_destroy, refactored exiting after a failure.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
| |
2022 was a rather slow year...
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
| |
Growing pains.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
| |
The ugent email addresses are shut down, updated to Ouroboros mail
addresses.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
| |
Happy New Year, Ouroboros!
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
|
| |
The rbuff_destroy function asserts that we do not try to destroy an
rbuff that still contains packets. The test now empties the rbuff
before destroying it.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
|
|
| |
The hashtable is only used for forwarding tables in the unicast
IPCP. This moves the generic hashtable out of the library into the
unicast IPCP to prepare a more tailored implementation specific to
routing tables containing address lists.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
| |
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
|
|
| |
This adds some tests for the shm_rbuff after some reports that the
queue length would be erroneously reported as 0 when the rbuff was
full. The test passes for the reported case.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
|
|
|
|
|
|
|
| |
Updates the copyright notice in all sources to 2019.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds rudimentary support for sending and processing
acknowledgments and doing retransmission.
It replaces the generic timerwheel with a specific one for
retransmission. This is currently a fixed wheel allowing
retransmissions to be scheduled up to about 32 seconds into the
future. It currently has an 8ms resolution. This could be made
configurable in the future. Failures of the flow (i.e. rtx not
working) are indicated by the rxmwheel_move() function returning a fd.
This is currently not yet handled (maybe just setting the state of the
flow to FLOWDOWN is a better solution).
The shm_rdrbuff tracks the number of users of a du_buff. One user is
the full stack, each retransmission will increment the refs counter
(which effectively acts as a semaphore). The refs counter is
decremented when a packet is acked. The du_buff is only allowed to be
removed if there is only one user left (the "stack").
When a packet is retransmitted, it is copied in the rdrbuff. This is
to ensure integrity of the packet when multiple layers do
retransmission and it is passed down the stack again.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The rq was removed in a previous commit.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
The element was not freed if insertion failed.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
| |
Happy New Year, Ouroboros.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The frct_pci and rq headers are moved from include/ouroboros to
src/lib since they are only needed in the library. FRCT is moved to
its own source file.
FRCT takes the application PDUs, encapsulates and processes them and
hands them back. This makes it easier to disable FRCT should the
application want to write to a "raw" flow. An FRCT instance is now
allocated upon alloc and released upon dealloc.
The FRCT data structure is split into a sender and receiver connection
record. Setting a new configuration will now be done upon sending the
next data PDU, which will flag the DRF for a new run and use that
configuration. This avoids some issues should packets arrive
out-of-order, and simplifies setting a configuration.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit deprecates ouroboros_init and ouroboros_fini and adds them
as a constructor or destructor, causing these function to be run
automatically when a program that links to the library calls and exits
main(). For this to fully work, the library had to be split so that we
can avoid the irmd calling these functions (the IRMd has to create the
shm structures on which these calls depend).
The library is split in 3 parts: libouroboros-dev, libouroboros-irm
and libouroboros-common. The latter is linked to the other two so that
including libouroboros-dev or libouroboros-irm will also link
libouroboros-common.
|
|
|
|
|
| |
This adds a PFF that returns an alternate hop as next hop in case the
hop that would have been returned is down.
|
|
|
|
|
| |
This adds a reordering queue to FRCT so that SDUs can be delivered
in-order when requested.
|
|
|
|
|
|
|
|
| |
This removes the RIB as a datastructure and CDAP as the protocol
between IPCPs. CDAP, the rib and related sources are deprecated. The
link-state protocol policy is udpated to use its own protocol based on
a simple broadcast strategy along a tree. The neighbors struct is
deprecated and moved to the library as a generic notifier component.
|
|
|
|
|
|
| |
This turns the timerwheel into a passive component since it is used by
application using the library. The user of the timerwheel now has to
call timerwheel_move to advance the timerwheel.
|
|
|
|
|
|
|
|
|
|
| |
This revises the build system to have configuration per system
component. System settings can now be set using cmake.
The standard compliance defines were removed from configuration header
and are set in the sources where needed. Also some small code
refactors, such as moving the data for shims out of the ipcp structure
to the respective shims were performed.
|
|
|
|
|
|
|
|
|
|
| |
This adds the basic FRCT mechanisms to the library. Upon flow alloc or
accept an FRCT instance is now created and used when reading or
writing to the flow. The timerwheel has been refactored to allow
recharging timers and removing them and is now part of the
library. The first SDU sent over the connection has the DRF set and
this initializes the connection. Sender and receiver inactivity timers
are added.
|
| |
|
| |
|
|
|
|
|
|
| |
This adds a check for robust mutexes. The constant HAVE_ROBUST_MUTEX
is set accordingly in config.h. It also adds some other fixes to make
the prototype compile on the Hurd.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
All information passed over the IRMd/IPCP boundary for using IPC
services (flow allocation, registration) is now hashed. This
effectively fixes the shared namespace between DIFs and the IRMDs.
This PR also fixes some API issues (adding const identifiers),
shuffles the include headers a bit and some small bugs.
|
| |
|
|
|
|
|
| |
This fixes some bugs in the B-tree implementation. The test has also
been rewritten to be more thorough.
|
|
|
|
|
|
| |
The routing now takes the results of the routing table to fill in the
forwarding table, by going through the neighbors and filling in the
right fd.
|
|
|
|
|
|
|
| |
Our mailserver was migrated from intec.ugent.be to the central
ugent.be emailserver. This PR updates the header files to reflect this
change as well. Some header files were also homogenized if the
parameters within the functions were badly aligned.
|
|
|
|
| |
The CMakeLists files are now properly indented.
|
|
|
|
|
| |
Moves the definitions of paths in the RIB for the normal IPCP to a
header ribconfig.h to avoid repetition.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rib_pack function allows packing a subtree of the RIB for
dissemination. The options PACK_HASH_ROOT and PACK_HASH_ALL will add
the hashes for the root object of the packed subtree or every object
to the packed message respectively. Checking of the hashes is
currently only performed at the top level object, verifying the
complete operation.
The rib_unpack function unpacks a packed message and inserts its
contents in the RIB. The option UNPACK_CREATE flags that the unpack
operation is allowed to create new objects, else it will only update
existing objects. More advanced options could be added in the future.
The packed message structure uses Google Protocol Buffers, as defined
in ro.proto.
It adds tests for these functions to the rib_test.
|
|
|
|
|
| |
Returns the names of the nodes (not the full paths). The function
allocates memory to the children pointer that should be freed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new RIB is implemented as a tree with doubly linked nodes (parents
keep a link to each child, each child keeps a link to its parent). An
index is kept in a btree using CRC32 hashes of the path name in the
RIB. Nodes keep an SHA3-256 hash value that is unique for the entire
subtree. This allows quick checks to see if two RIB subtrees are in
sync. The event system for the RIB is based on the event system for
flows (fqueue), but implemented completely in dynamic memory using
linked lists. An initial test is performed for the RIB. This PR does
not modify existing code to use the new RIB.
|
|
|
|
|
| |
Adds an implementation of B-trees of order k (k children, min fill is
k/2, max fill k - 1). Useful to implement indexes for faster lookups.
|
| |
|
|
|
|
| |
Test the SHA3 function with known hashes.
|
|
|
|
|
| |
Copyright is set to 2016 - 2017. License text on includes and sources
in the library are changed to indicate the LGPLv2.1 license.
|
|
|
|
|
| |
This corrects the license statements on all files. Installed headers
are LGPLv2.1, the rest of the code is GPLv2.
|
|
|
|
|
|
|
| |
This adds a hash table that takes 64-bit integers as key and uses
separate chaining on collision. It also adds the PDU Forwarding
Function, which the Flow Manager can use to lookup the fd towards the
next hop. Routing policies will add/update/remove entries in the PFF.
|
|
|
|
|
| |
This reduces the risk for some bugs, for instance due to
signed/unsigned mismatches and unused variables.
|
|
|
|
| |
Fixes #3
|
|
|
|
|
|
|
| |
The test had a synchronisation issue. Due to rebuild of the shm_du_map
for random access, there was also a hack in the shm_du_map
specifically to run this test. Because of this hack, the decision was
made to drop this test.
|