summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* | lib: Exchange protocol info during CACEPdimitri staessens2017-02-212-0/+16
| | | | | | | | | | | | | | | | | | 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-202-13/+10
|/ | | | | | | | | 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.
* ipcpd: Move RIB configuration to common headerdimitri staessens2017-02-171-6/+0
| | | | | Moves the definitions of paths in the RIB for the normal IPCP to a header ribconfig.h to avoid repetition.
* lib: Revise endian header and SHA3Sander Vrijders2017-02-161-112/+52
| | | | | | | | This revises the endian header to let the build time checks of endianness be performed by the standard libraries. We just check for the OS that is being used and provide the endian functions from OpenBSD to everyone. It also updates the SHA3 sources to use this new header. The byte order header is removed.
* ipcpd: Fix build on FreeBSDdimitri staessens2017-02-131-1/+3
| | | | | Use labs for absolute value of a long, and defines bswap_64 as the FreeBSD function bswap64.
* ipcpd: Increase threadpool sizeSander Vrijders2017-02-131-1/+1
| | | | | | This increases the threadpool size for the IPCP main loop. Starvation was happening due to a lot of back and forth interactions between the normal IPCPd and the IRMd.
* include: Use width in endian naming conventiondimitri staessens2017-02-121-16/+8
| | | | | ntohll and ntohl have been renamed ntoh64 and ntoh32, htonll and htonl have been renamed hton64 and hton32.
* irmd: Allow time for AP to call flow_accept()dimitri staessens2017-02-121-0/+1
| | | | | | | | When there is a burst of successive flow allocations for a certain name, each such request will block a thread in the IRMD for IRMD_REQ_ARR_TIMEOUT ms to allow the application some time to respond. This refactors some parts of the IRMd.
* ipcpd: Compare timestamp upon enrollmentdimitri staessens2017-02-111-6/+4
| | | | | | The enrollment procedure will ask for a timestamp of the IPCP it is enrolling with. It will (taking into account the RTT of the request) issue a warning if the offset is larger than RIB_WARN_TIME_OFFSET ms.
* cdap: Take void * for send operationsdimitri staessens2017-02-101-3/+3
| | | | This facilitates sending arbitrary variables over CDAP.
* include: Add header for endiannessdimitri staessens2017-02-102-0/+155
| | | | | | | | | This adds a header for dealing with endianness in ouroboros. It is extracted from the byte_order header in the library (which now includes this header). It also exposes the functions ntohl, ntohll, htonl and htonll, necessary for converting 32 and 64 bit values for storage and retrieval from the RIB (which should store multi-byte values in network byte order).
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-097-39/+50
| | | | | | | | The IPCP will now respond with an ipcp_create_r message when it fails, informing the IRMd. Also adds some const qualifiers in the public headers and fixes some formatting in dev.c.
* lib, ipcpd: Comply to pedantic C99Sander Vrijders2017-02-081-28/+22
| | | | | | With the changes in this commit Ouroboros will compile with the pedantic flag on when the standard is C99. The main problem was the used of unnamed structs and unions, which is C11.
* lib: Log to the logging systemdimitri staessens2017-02-081-34/+22
| | | | | | | | | | This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
* ipcpd: Revise PCI manipulation in normaldimitri staessens2017-02-071-2/+2
| | | | | | | | | | | The pci function will store offsets to avoid having to recalculate them every time. TTL handling is removed from the fmgr, the TTL is automatically decreased when deserializing the PCI (or set to 1 if there is no TTL present so the PDU will be forwarded). The deserialisation function now takes a pointer to a struct pci as input to avoid memory allocation and release each time a PDU is processed. Some checks have been replaced with assert() and return values replaced with void where it makes sense.
* ipcpd, lib: Revise normal IPCPdimitri staessens2017-02-062-3/+12
| | | | | | | | | | This PR updates the normal IPCP to use the new RIB. The old ribmgr is removed and replaced by a stub that needs to be implemented. All components (dir, fmgr, frct) were adapted to the new RIB API. A lot of functionality was moved outside of the ribmgr, such as the addr_auth, which is now a component of the IPCP. The address is also stored to the ipcpi struct. The irm tool has an option to set the gam policy of the rib manager.
* lib: Add packing and unpacking RIBdimitri staessens2017-01-311-20/+34
| | | | | | | | | | | | | | | | | | | 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 RIBdimitri staessens2017-01-291-0/+3
| | | | | 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 Basedimitri staessens2017-01-213-0/+134
| | | | | | | | | | | | 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 move operation for listsdimitri staessens2017-01-201-0/+3
| | | | | Allows moving the elements of one linked list to another. Re-initializes the source list.
* lib: Fix return value and typo in fqueuedimitri staessens2017-01-201-1/+1
|
* lib: Move CRC32 implementation to librarydimitri staessens2017-01-141-0/+33
| | | | The CRC32 implementation will be used to ID objects in the RIB.
* Merged in sandervrijders/ouroboros/be-gam (pull request #345)dimitri staessens2017-01-125-16/+72
|\ | | | | | | Be gam
| * ipcpd: normal: Create policies for GAMSander Vrijders2017-01-123-19/+23
| | | | | | | | | | This allows the selection of a policy for the graph adjacency manager. Currently we only support constructing a complete graph.
| * lib: Fix Python wrappingSander Vrijders2017-01-112-0/+5
| | | | | | | | | | | | | | Since Python 3.6, the headers are no longer C89 compliant, since they introduced C++ style comments. This sets the compiler flag to std99 instead of std89 to allow wrapping of headers. It also adds a missing header to the wrapping file.
| * Merge remote-tracking branch 'upstream/be' into be-gamSander Vrijders2017-01-0926-290/+189
| |\
| * | lib: Add Common Application Connection Establishment PhaseSander Vrijders2017-01-091-0/+47
| | | | | | | | | | | | | | | | | | This adds CACEP to the library, which can be used for authenticating the other party after flow allocation and for obtaining other relevant information.
* | | logs: Comply with C99 standard for variadic macrosdimitri staessens2017-01-111-21/+24
| | |
* | | lib, include: Fix typo in list.c/hdimitri staessens2017-01-091-2/+2
| |/ |/|
* | include: Improve lockfile descriptiondimitri staessens2017-01-091-1/+1
| |
* | build: Update licenses and copyrightdimitri staessens2017-01-0926-144/+157
| | | | | | | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* | lib: Revise implementation of listdimitri staessens2017-01-091-145/+31
|/ | | | Adds LGPL license to the ouroboros lists.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-034-5/+9
| | | | | | | | | | Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
* include, lib: Report communication failure with the IRMddimitri staessens2016-12-281-0/+1
| | | | | | | An errno EIRMD has been added to errno.h to indicate failure to send a message tot the IRMd. The IRM tool will report such errors, which makes it easier for users to detect that the IRM was not started or has failed.
* ouroboros: Correct license statementsdimitri staessens2016-12-2426-162/+148
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* ipcpd, lib: Refactor normal ipcp and cdapdimitri staessens2016-12-244-29/+28
| | | | | Refactors the normal IPCP fmgr and ribmgr, and modifies the API for cdap so that no callbacks are needed.
* logs: Print process id's to stdoutdimitri staessens2016-12-241-2/+5
|
* lib, ipcpd: Add hashtable and PDU Forwarding FunctionSander Vrijders2016-12-212-0/+51
| | | | | | | 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.
* src, tools: Set/get timeout and get qos for flowsdimitri staessens2016-12-124-16/+24
| | | | | | | | | | | | | | | | Receiver timeouts can now be set on a flow using the flow_set_timeout function. Specifying NULL disables the timeout. The flow_get_timeout function gets the value for the timeout. This commit also deprecates fcntl in favor of flow_get_flags and flow_set_flags functions. struct qos_spec is typedef'd as a qosspec_t. The tools and cdap.c are updated to use the new API. Fixes a bug in operf client where the client's writer thread wouldn't cancel on SIGINT.
* lib: Deprecate shm_rbuff_resetdimitri staessens2016-11-251-2/+0
|
* lib: Remove dst_api field from rdrbuff blocksdimitri staessens2016-11-171-3/+1
| | | | | | Now that we have an rbuff per flow per AP, there is no more need to keep the dst_api in the rdrbuff. This also simplifies the sanitizer in the irmd.
* lib: Simplify CDAP APISander Vrijders2016-11-011-49/+23
| | | | | | This will simplify the CDAP API. Now the opcode has to be given when sending a CDAP request. Before a separate operation was provided since some of the function parameters are unused for certain commands.
* Merged in sandervrijders/ouroboros/be-addr-auth (pull request #296)dimitri staessens2016-11-011-0/+6
|\ | | | | | | ipcpd: normal: Add policy for obtaining a flat address
| * ipcpd: normal: Add policy for obtaining a flat addressSander Vrijders2016-11-011-0/+6
| | | | | | | | | | | | This adds a policy for obtaining a flat address, and thus also the infrastructure for policies in the IPCP. The IPCP should check if the address is available; this is currently not there yet.
* | lib, ipcpd: Improve flow allocationdimitri staessens2016-10-311-2/+1
|/ | | | | | | All calls for opening rbuffs are now concentrated on the dev side. This allows some simplifications in the np1 calls. The ipcp_fini call will not destroy the mutex associated with the state, since the final state needs to be checked before shutting down an IPCP.
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-262-1/+5
| | | | | | | | | | | The steps for flow deallocation have been further refined. An operation ipcp_flow_fini() which wait for all SDUs to be read from a flow has been added. The shim IPCPs and the local IPCP have been adapted to this new API. Deallocation messages have been removed from the shim IPCPs, since there is insufficient state synchronisation between them to make this work reliably.
* Merged in sandervrijders/ouroboros/be-ipcp-threads (pull request #283)dimitri staessens2016-10-261-0/+1
|\ | | | | | | ipcpd: Add threadpool for main loop
| * ipcpd: Add threadpool for main loopSander Vrijders2016-10-261-0/+1
| | | | | | | | | | | | | | This adds a threadpool for the main loop of the IPCPs. Before there was a single thread handling each request, which could result in starvation since performing name queries at the same time as enrolling a normal IPCP was impossible.
* | lib: API for accepting flows with QoSdimitri staessens2016-10-251-2/+3
|/
* lib: Stabilise flow allocationdimitri staessens2016-10-231-2/+0
| | | | | | | Deallocation was reverted to a synchronoous operation between the AP, IRMd and IPCP in order to avoid inconsistent states of the port_id. Fixes some memory leaks, particularly the shm_flow_set is now closed upon deallocation.