Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | lib: Add packing and unpacking RIB | dimitri staessens | 2017-01-31 | 1 | -0/+39 |
| | | | | | | | | | | | | | | | | | | | 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. | ||||
* | lib: Add function to get children of node in RIB | dimitri staessens | 2017-01-29 | 1 | -0/+24 |
| | | | | | Returns the names of the nodes (not the full paths). The function allocates memory to the children pointer that should be freed. | ||||
* | lib: Add new version of Resource Information Base | dimitri staessens | 2017-01-21 | 1 | -0/+222 |
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. |