summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd: Add broadcast IPCPDimitri Staessens2018-10-241-0/+1
| | | | | | | | | | This adds a broadcast IPCP that allows us to easily create multicast applications. The broadcast IPCP accepts flows for "<layer_name>.mc". A tool, obc (Ouroboros broadcast), is added that sends and reads a message to a broadcast layer. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* tools: Specify QoS cube for data transfer flows0.13.0Dimitri Staessens2018-10-191-1/+3
| | | | | | | | | The ipcp connect command can now set a specific qos cube for data transfer flows. For management flows, the tool ignores this and defaults to raw until data flows are stable enough. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* Merge branch 'testing' into beSander Vrijders2018-10-111-3/+1
|\
| * ipcpd: Remove stale QoS cubesDimitri Staessens2018-10-101-3/+1
| | | | | | | | | | | | | | | | There were QoS cubes defined for raw and data flows, which are now run on the best effort cube. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* | Merge branch 'testing' into beDimitri Staessens2018-10-091-6/+59
|\|
| * lib: Define QoS specs inside header file0.12.1Sander Vrijders2018-10-091-6/+59
| | | | | | | | | | | | | | | | | | The QoS specs were defined in the source file instead of in the header file, which resulted in uninitialized structs being used, which gave rise to weird behavior in the library. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* | Merge branch 'testing' into beDimitri Staessens2018-10-0610-35/+40
|\|
| * include: Fix QoS include filesDimitri Staessens2018-10-063-2/+2
| | | | | | | | | | | | | | A lot of files were unnecessarily including qoscube.h. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
| * lib: Split error checking from FRCTDimitri Staessens2018-10-051-1/+0
| | | | | | | | | | | | | | | | This splits off the CRC from FRCT so it can be set independently. Ouroboros now allows raw flows with error checking. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
| * doc: Fix fccntl man pageDimitri Staessens2018-10-051-2/+1
| | | | | | | | | | | | | | Patch for previous commit, which was broken. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
| * lib: Rename port_id to flow_idDimitri Staessens2018-10-053-9/+9
| | | | | | | | | | | | | | Renames port_id to flow_id according to updated nomenclature. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
| * doc: Update man page for fccntlDimitri Staessens2018-10-051-1/+0
| | | | | | | | | | | | | | The FLOWSFLAGS command was recently obsoleted with the removal of online reconfiguration of FRCT. Signed-off-by: Sander Vrijders <[email protected]>
| * ipcpd, lib, irmd, tools: Change SDU to packetSander Vrijders2018-10-052-2/+2
| | | | | | | | | | | | | | | | This will change SDU (Service Data Unit) to packet everywhere. SDU is OSI terminology, whereas packet is Ouroboros terminology. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
| * lib: Pass qosspec at flow allocationDimitri Staessens2018-10-054-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | The flow allocator now passes the full qos specification to the endpoint, instead of just a cube. This is a more flexible architecture, as it makes QoS cubes internal to the layers. Adds endianness transforms for the flow allocator protocol in the normal IPCP. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
| * tools: Fix memleaks and buffer overflows in irm toolSander Vrijders2018-09-271-2/+2
| | | | | | | | | | | | | | | | This fixes some memleaks and potential buffer overflows in the irm tool. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
| * include: Remove _DEFAULT_SOURCE in endian.hDimitri Staessens2018-09-271-1/+4
| | | | | | | | | | | | | | | | This removes the _DEFAULT_SOURCE definition in the endian header as it should not be there. This avoids double and conflicting definitions. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* | lib: Support for rudimentary retransmissionDimitri Staessens2018-07-272-47/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* Merge branch 'testing' into beSander Vrijders2018-06-131-17/+57
|\
| * lib: Use macros for all time utility functions0.11.9Dimitri Staessens2018-06-131-17/+57
| | | | | | | | | | | | | | | | | | This replaces the time utility functions with macros. This avoids using library functions in the tools and also slightly speeds up the implementation. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* | Merge branch 'testing' into beSander Vrijders2018-06-081-3/+0
|\|
| * irmd: Remove shm_sanitizer threadDimitri Staessens2018-06-081-3/+0
| | | | | | | | | | | | | | | | | | | | This removes the sanitizer thread in the IRMd to avoid the IRMd eating the CPU when the buffer is full. The processes will clean the head PDU if there is a broken lock in the rdrbuff. Chances for a lingering tail PDU are slim. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* | lib: Add a data qos cubeDimitri Staessens2018-06-082-0/+3
|/ | | | | | | | This adds a data qos cube that is reliable. Reliable qos can be selected by setting the loss parameter of the qosspec to 0. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Define default qosspecs in qos sourcesDimitri Staessens2018-06-051-0/+5
| | | | | | | | | This moves the definition of the predefined qosspecs to qos.h and qos.c. This allows applications to select them using qos_best_effort etc. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Add a QOS_RAW QoS cubeDimitri Staessens2018-06-052-1/+3
| | | | | | | | | This adds a QoS cube that allows sending packets directly over a raw flow, without an FRCT state machine. Flow allocation with a NULL qosspec will now default to such raw flows. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Simplify delta-t logicDimitri Staessens2018-06-051-2/+1
| | | | | | | | | | This revises the delta-t implementation to align with Watson's timer specifications. FRCT will never deliver out-of-order packets. A raw flow (without delta-t state machine) will be able to provide such a service. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Update default values0.11.7Sander Vrijders2018-05-291-1/+1
| | | | | | | | | | | This sets updated default values for the default build. A higher connect timeout until we have asynchronous local IPC. Disabled SWIG since the lastest gcc reports an error. IPCP flow stats enabled by default since their impact on the performance is very limited. Waiting for the directory to enroll before returning to increase stability. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* lib: Add event types to fqueueDimitri Staessens2018-05-142-16/+27
| | | | | | | | | | | The event type of the current event in the fqueue can now be requested using the fqueue_type() command. Currently events for packets (FLOW_PKT), flows (FLOW_UP, FLOW_DOWN) and allocation (FLOW_ALLOC, FLOW_DEALLOC) are specified. The implementation only tracks FLOW_PKT at this point. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Make UNIX socket buffer size configurable0.11.3Sander Vrijders2018-05-032-3/+8
| | | | | | | | | | This makes the buffer size used by the UNIX sockets configurable. In case of a lot of IPCPs in the system it might become too small with the default value, resulting in irm command failures. The user can now easily configure it with an adequate value. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
* irmd: Fix memleak when failing to list ipcpsDimitri Staessens2018-03-221-1/+2
| | | | | | | | | The list_ipcps call had a memleak in the failure case. Also fixes a compiler warning for a possible uninitialized variable and renumbers the gpb ipcpd message fields. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Simplify reg/unreg APIDimitri Staessens2018-03-222-12/+19
| | | | | | | | | | | | | | | | | | | | The reg/unreg API is simplified to registering and unregistering a single name with a single IPCP. The functionality associated with registering names was moved from the IRMd to the irm tool. The function to list IPCPs was simplified to return all IPCPs in the system with their basic properties needed for management. The above changes led to some needed changes in the irm tool and the management functions that were depending on the previous behaviour of list_ipcps. Command line functionality to list IPCPs in the system is also added to the irm tool. Some older code was refactored. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Allow disabling partial readDimitri Staessens2018-03-191-0/+1
| | | | | | | | | | | | | | This allows disabling partial reads. It adds a flag FLOWFRNOPART that disables partial reads. Partial read is different from partial delivery (FRCTFPARTIAL), which allows delivery of fragments of an incomplete packet and thus potentially corrupted data. FLOWFRNOPART will never deliver corrupted data (unless FRCTFPARTIAL is also set). If FLOWFRNOPART is set and the buffer provided to flow_read is too small for the SDU, that SDU will be discarded and -EMSGSIZE is returned; Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Implement timeout on blocking writeDimitri Staessens2018-03-121-5/+6
| | | | | | | | | | This completes the implementation of the SNDTIMEO for a blocking write. Fixes #6. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Add IPCP over DIX EthernetDimitri Staessens2018-03-101-2/+6
| | | | | | | | | | | | | | | | | | This adds an IPC Process that uses DIX Ethernet with an Ethertype that is configurable at bootstrap. This allows parallel DIX layers over the same Ethernet network with different Ethertypes (and one LLC layer). It allows jumbo frames in the future, and should avoid the problems we have with some routers not handling LLC traffic very well. The destination endpoint ID is sent as a 16 bit integer, so the maximum payload is 1498 bytes in standard Ethernet, and 8998 bytes when Jumbo frames are used. The implementation is very similar to the Ethernet LLC IPCP, so it is implemented using preprocessor macros in the single source instead of duplicating code. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Add fccntl operation to get queue lengthsDimitri Staessens2018-02-281-3/+7
| | | | | | | | | | This adds the FLOWGRXQLEN and FLOWGTXQLEN operations to fccntl to get the number of packets that are in the receive and transmit buffers respectively. The flow statistics are updated to show these queue lengths. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Get RIB attributes from componentDimitri Staessens2018-02-201-0/+5
| | | | | | | | | | | | This revises the RIB so it gets the complete file attribute list from the component instead of setting some attributes in the library. This will allow setting read/write access later on in the component itself. The time of last change of lsdb entries in the file system is now set to the time of the last received Link State Update for that entry. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Revise Data Transfer component0.10.0Dimitri Staessens2018-02-134-13/+13
| | | | | | | | | | | This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Use GNUInstallDirs instead of hardcoded values0.9.9Sander Vrijders2018-02-061-1/+1
| | | | | | | | This changes the build to use GNUInstallDirs instead of hardcoded values. Package maintainers can then override these defaults by passing the correct value to cmake on the command line. Signed-off-by: Sander Vrijders <[email protected]>
* build: Add option to disable SWIG supportDimitri Staessens2018-02-061-49/+54
| | | | | | | | This allows disabling swig support on systems where swig is installed but it fails building (e.g. some versions of Raspbian). Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* include: Improve definitions of fccntl flagsDimitri Staessens2018-01-181-2/+2
| | | | | | | | Defining FLOWFNONBLOCK in terms of FLOWFRNOBLOCK and FLOWFWNOBLOCK and FLOWFDEFAULT in terms of FLOWFRDWR clarifies their meaning. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* doc: Set CC-BY 4.0 license on the man pages0.9.1Dimitri Staessens2018-01-111-1/+1
| | | | | | | | This adds the Creative Commons Attribution License 4.0 to the man pages instead of the Copyright. Also fixes the data in version.h. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* include: Add version header0.9.0Dimitri Staessens2018-01-103-1/+38
| | | | | | | | This moves the version definition for Ouroboros into its own header file, which is generated by CMake and installed on the system. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-0938-38/+38
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Use the term "layer" and deprecate "shim"Dimitri Staessens2017-12-191-7/+7
| | | | | | | | | | | | | | This changes the terminology to use layer instead of DIF and deprecate the word "shim" for the IPCPs that attach to Ethernet LLC and UDP .The terminology has not yet been changed in the variable names etc. This reflects the design choices in Ouroboros to make IPCPs pure resource allocators instead of also providing an "IPC service". The Ouroboros IPCPs that attach to Ethernet and UDP implement the allocator and are thus not really shims. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* ipcpd: Integrate raptor into ouroboros 0.8Dimitri Staessens2017-12-151-0/+1
| | | | | | | | | | | The raptor code is refactored to completely remove reduntant code relating to addresses. The dependency on the google protocol buffers is removed. The build system will only build raptor if the relevant kernel module is found on the system. The irm tool and the relevant documentation are updated. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib, tools: Rename application process and instanceDimitri Staessens2017-12-026-27/+26
| | | | | | | | | | | This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* build: Fix detection of python for swig bindingsDimitri Staessens2017-11-101-3/+6
| | | | | | | | | | The cmake build only looked for the libraries but not the interpreter, which caused the build to fail if the library was present, but the interpreter was not installed and executable using the "python" command. The build now looks for the python interpreter as well. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Use packed struct for FRCT header accessDimitri Staessens2017-11-081-2/+2
| | | | | | | | | | | | | | | This replaces the variable FRCT header with a packed struct, which significantly simplifies the implementation. The shm_du_buff calls to release the head/tail are updated to return a pointer to the original head or the new tail (in symmetry to the alloc calls, which return a pointer to the new head and old tail), so that it immediately points to the structure that is needed. The frct_pci sources are removed and frct is now fully in the frct.c source file. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Refactor FRCT implementationDimitri Staessens2017-11-072-114/+0
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* dev: Split nonblocking read and writeDimitri Staessens2017-10-301-1/+4
| | | | | | | | | | The FLOWFNONBLOCK flag now has two subflags FLOWFRNOBLOCK and FLOWFWNOBLOCK which allows setting the behavior of read and write independently. The default behavior is unchanged (blocking read and write). Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
* lib: Deprecate ouroboros_init and ourboros_finidimitri staessens2017-10-143-7/+4
| | | | | | | | | | | | | | 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.