summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* build: Format CMakeLists.txt filesSander Vrijders2017-03-031-9/+9
| | | | The CMakeLists files are now properly indented.
* lib: Split authentication from CACEPdimitri staessens2017-02-271-12/+2
| | | | | | | By removing authentication as part of CACEP, all policies disappear. CACEP becomes a policy-free connection establishment protocol between Application Entities. Authentication can later be added cleanly as a pure policy function when needed.
* lib: Exchange protocol info during CACEPdimitri staessens2017-02-211-0/+6
| | | | | | | | | This exchanges a protocol name, a protocol version and concrete syntax for the protocol upon CACEP. For CDAP, only version 1 and GPB are supported. No lists for other supported versions or syntaxes are exchanged (but the proto file supports it). CACEP fails if there is a mismatch between the protocol names, version and syntax specified by the communicating parties.
* lib: Revise CACEPdimitri staessens2017-02-201-3/+7
| | | | | | | | | Revises CACEP policies to stateless library calls. It provides two policies: an anonymous authentication policy that will generate random credentials for the peer, and a simple authentication policy that will return a name for the peer and an address. Changes the normal IPCP to use the updates API calls.
* lib: Add packing and unpacking RIBdimitri staessens2017-01-311-1/+2
| | | | | | | | | | | | | | | | | | | 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 new version of Resource Information Basedimitri staessens2017-01-211-0/+1
| | | | | | | | | | | | 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.
* lib: Add B-tree implementationdimitri staessens2017-01-161-0/+1
| | | | | 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.
* lib: Move CRC32 implementation to librarydimitri staessens2017-01-141-0/+1
| | | | The CRC32 implementation will be used to ID objects in the RIB.
* Merged in sandervrijders/ouroboros/be-gam (pull request #345)dimitri staessens2017-01-121-5/+6
|\ | | | | | | Be gam
| * lib: Add Common Application Connection Establishment PhaseSander Vrijders2017-01-091-5/+6
| | | | | | | | | | | | This adds CACEP to the library, which can be used for authenticating the other party after flow allocation and for obtaining other relevant information.
* | lib: Add SHA3 hash functiondimitri staessens2017-01-111-0/+1
|/ | | | | | Adds an SHA-3 hash implementation that will be used in the rib, adapted and redistributed from the RHASH project (https://github.com/rhash/RHash)
* ipcpd, lib: Refactor normal ipcp and cdapdimitri staessens2016-12-241-0/+1
| | | | | Refactors the normal IPCP fmgr and ribmgr, and modifies the API for cdap so that no callbacks are needed.
* lib, ipcpd: Add hashtable and PDU Forwarding FunctionSander Vrijders2016-12-211-0/+1
| | | | | | | 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.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-1/+2
| | | | | | | | The fast path will now use an incoming ring buffer per flow per process. This necessitated the development of a new method for the asynchronous io call, which is now based on an event queue system for scalability (fqueue). The ipcpd's and tools have been updated to this API.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-1/+0
| | | | | | | | | | | | IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5
* lib, ipcp: Compile on Apple junkdimitri staessens2016-08-301-3/+7
| | | | | | Disables robust mutexes and clock attributes for condition variables for compatibility with OSX (SUSv2). Implements clock_gettime and adds some defines for OSX compatibility in time_utils.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-1/+1
| | | | | | | | | | The shm_du_map is renamed to shm_rdrbuff to reflect the Random Deletion Ringbuffer used in the implementation. The close_on_exit call is removed and SDUs are cleaned up by the application in the ap_fini() call. This required a non-blocking peek() operation in the shm_ap_rbuff. Some initial implementation for future support of qos cubes has been added to the shm_rdrbuff.
* build: Fix wrong inclusionSander Vrijders2016-07-261-2/+0
| | | | | | The protobuf include directory was not being correctly handed to the compiler when building. Now the include directory is added project-wide. And the protobuf package is searched for only once.
* lib: Add lockfiledimitri staessens2016-07-071-0/+1
| | | | | | | | | | | | The pid of the IRMd is stored in a lockfile in shared memory. This makes checking if the IRMd is running independent of the configuration, as previously the IRMd pid was stored at the end of the shm_du_map, which could not be read by an IRMd that would be compiled with different configuration options. Also corrects some unnecessary includes Fixes #21.
* lib, irmd, ipcpd: Provide the feature to write to logsSander Vrijders2016-07-061-0/+1
| | | | | | | | | | Writing output to log files is now enabled by default. Logs are written to <INSTALL_PREFIX>/var/log/ouroboros, which is created on install. There is a log file for the irmd and one per IPCP. To still get (colored) output on stdout, provide the --stdout switch when starting the irmd. Fixes #17
* lib: Provide first implementation of revised CDAPSander Vrijders2016-07-051-2/+5
| | | | | | | | This commit introduces a first version of the revised CDAP specification. CACEP (for authentication purposes) has been separated from CDAP. Application developers may use CDAP if they find it useful. Within Ouroboros CDAP will be used to perform operations on the RIB of an IPCP.
* lib, ipcpd: removed du_buff and pcidimitri staessens2016-06-291-1/+0
| | | | Fixes #3
* lib, irmd, ipcpd: Change of IRM APISander Vrijders2016-06-281-1/+0
| | | | | | | | | | | | | | This changes the IRM API after discussions with Dimitri. The register operation is now split into a bind and register operation. The same for unregister; unbind and unregister. PIDs are now used as the application instance name. A name for a PID is only provided for scriptability in bash. It is therefore also no longer passed down to the IPCP. Every operation on an IPCP through the IRM API has to use the PID. Quering of the PIDs by name is possible. The IRM tool has been updated to use this new API as well. A subcommand 'ipcp' has been added for operations that take effect on IPCPs only. Fixes #12
* build: correct sandboxingdimitri staessens2016-06-271-1/+1
| | | | | paths cannot start with "/" or PREFIX will be omitted. PREFIX must be set before the project() call.
* build: Fix installation prefixSander Vrijders2016-06-271-1/+1
| | | | | | The installation prefix was taking a trailing backslash, while it is common not to do so. Fixed it so that any trailing backslash is removed by the compilation and installation scripts.
* lib: Change DA header to NSMSander Vrijders2016-06-221-1/+1
| | | | | | Functionality that was previously thought to be part of the DIF Allocator is actually namespace management. Hence the file has been renamed and the API updated.
* lib, irmd, ipcp: robust mutexesdimitri staessens2016-06-211-1/+0
| | | | | | | | Update to POSIX 200112L to allow use of robust mutexes in the shm_du_map. Removed the implementation of the rw_lock in favor of pthread_rwlock_t. Placeholder for the shm_du_map_sanitize function.
* build: Change install directories and set correct permissionsSander Vrijders2016-06-201-1/+1
| | | | | | | | | This sets the correct install directories for all the binaries, library and header files. It also sets the right permissions on the sockets and shared memory so that regular users can also use the ouroboros library. Root privileges are required to run the irmd. Fixes #7
* tools, lib: cbr tool for bandwidth testingdimitri staessens2016-05-241-0/+1
| | | | | | | | The tool sends constant bandwidth traffic between a client and a server. cbr --help for more info. Adds time_utils.h to the library containing useful functions for arithmetic with timespec and timeval structures.
* Merge remote-tracking branch 'upstream/be' into beSander Vrijders2016-05-141-0/+1
|\
| * lib: implementation of read/write locksdimitri staessens2016-05-131-0/+1
| | | | | | | | | | This adds read/write locks, allowing for concurrent reads on the locked datastructure. This is needed for the fast path.
* | lib, ipcpd, irmd: Add QoS cube definitionSander Vrijders2016-05-141-3/+0
|/ | | | | | | | | | This adds the QoS cube definition, which is an enum to select which QoS is needed in the IPCP. An application has to use the qos_spec in qos.h to define what it needs. The IRMd will map this unto a qos cube definition. Some headers are now also no longer installed on the system, since they are only to be used within the irmd and ipcps.
* irmd: flow allocation and fast pathdimitri staessens2016-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit has a first implementation of flow allocation (the "slow path") and read/write (the "fast path") for ouroboros. It provides basic but unstable communications over the shared memory. It required a lot of changes all over the stack, and fixes a number of previously undetected issues. This PR still need heavy revision regarding data model, locking and cleanup. lib/dev: modifications to the API. It now uses an ap_init() call to set the AP name and sets the Instance ID to the pid of the process. It also binds the AP to the shared memory and creates tables for mappings in the fast path. A call to ap_fini() releases the resources. lib/shm_ap_rbuff: added ring buffer for data exchange between processes in the fast path. It passes an index in the shm_du_map. lib/shm_du_map: rewrote API to work with calls from dev.c. Garbage collector added. Tests updated to new API. ipcpd/ipcp-data: removed everything related to flows, as these are universal for all ap's and kept in ap_data (dev.c), or similar structs for shim ipcps. shim-udp: added flow allocator and read/write functions and shm elements. irmd: revised data model and structures necessary for flow allocation. tools: echo updated to new dev.h API. messaging system was updated to comply with new flow allocation messages. All exchanges use pid and port_id to bootstrap the fast path.
* lib: moved flow header and source to ipcpddimitri staessens2016-04-191-1/+0
|
* lib, irmd, irm: Add dif_configSander Vrijders2016-04-081-2/+4
| | | | | | | | | This adds dif_config to the prototype, in which one is able to specify the parameters a DIF should have. The bootstrap operation of an IPCP takes this as parameter and is oblivious to whether it is a shim or a normal IPCP. The dif_config struct is also correctly serialized and deserialized and passed opaquely to the correct IPCP. This IPCP is in charge of deserializing it correctly.
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-flowdimitri staessens2016-03-301-1/+1
|\
| * lib: renamed rina_name_t to instance_name_tdimitri staessens2016-03-301-1/+1
| | | | | | | | | | all functions taking a char * ap_name and uint id now take either a instance_name_t or instance_name_t *
* | Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into HEADdimitri staessens2016-03-301-21/+34
|\|
| * Merge remote-tracking branch 'upstream/be' into be-gpbSander Vrijders2016-03-281-1/+3
| |\
| * | lib: Add ipcp_messages proto fileSander Vrijders2016-03-281-26/+26
| | | | | | | | | | | | | | | This removes the custom ser/des methods for communicating with the IPCP daemon and also uses GPB instead.
| * | lib: Update irm.h APISander Vrijders2016-03-281-3/+8
| | | | | | | | | | | | | | | | | | Removes rina_name_t from that API. Passing ap_name and api_id as params instead. The IRM tool has been updated accordingly. Some errors in the build related to protobuf-c have also been resolved.
| * | build: Add protobuf-c commands for cmakeSander Vrijders2016-03-251-2/+8
| | | | | | | | | | | | | | | | | | This adds a cmake file so that the build can ask to generate protobuf-c files from .proto files. The messages between the IRM and the library are compiled into the library.
* | | lib: api for handling flowsdimitri staessens2016-03-301-0/+1
| |/ |/| | | | | | | moved the flow definition to the library and made it public. thread-safety implemented without compiler checks.
* | build: lib/CMakelist now uses variablesdimitri staessens2016-03-261-1/+1
|/
* lib: Shared Memorydimitri staessens2016-03-241-0/+12
| | | | | | | | Updated tests. Added code to drop a corner case (packet where the tail PCI would cross the edge of the ring buffer) because solving this very rare case is not worth the performance hit on the ringbuffer the extra code would incur. This means the ringbuffer might drop a very small percentage of packets.
* tools: Simple echo applicationSander Vrijders2016-03-211-0/+1
| | | | | | This adds a simple echo application written to show application how to use the API. It also updates the dev.h header file with the insights gained from performing this excercise.
* irmd, lib: Create and destroy IPC ProcessesSander Vrijders2016-03-151-0/+1
| | | | | | This adds the functionality to create and destroy IPCPs. Upon creation a new process is forked and execve'd. Upon destruction the IPCP is destroyed by killing it with SIGTERM.
* lib: Move list function definitions into a source fileSander Vrijders2016-03-141-0/+1
| | | | | | This moves the function definitions of list.h into a separate source file to avod linker errors when including the file in more than one source file.
* lib: Add helpers for RINA namesSander Vrijders2016-03-111-0/+1
| | | | This adds helper functions for RINA names, to aid with handling them.
* irmd, lib: Replace stubs in irmdSander Vrijders2016-03-091-0/+2
| | | | | | This replaces the stubs in the irmd and calls the actual IPCP operations from the library. It also calls the DIF Allocator API in one of the operations.