summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd, lib: Add flow down eventsSander Vrijders2017-09-191-27/+59
| | | | | | | | This adds the flow down event to Ouroboros. In the shim-eth-llc, a netlink socket is opened which listens to device up/down events. For each event the flow is then adjusted with fccntl to notify the user the flow is down or back up again. In the normal IPCP an event is thrown if a write reports that the flow is down.
* lib: Add reordering queue to FRCTSander Vrijders2017-09-151-13/+57
| | | | | This adds a reordering queue to FRCT so that SDUs can be delivered in-order when requested.
* lib: Add per instance FRCT lockSander Vrijders2017-09-011-21/+35
| | | | | This adds a per instance FRCT lock, since it was taking a write lock, thereby severely impacting parallelism in dev.c
* lib: Add fccntl configuration commanddimitri staessens2017-08-311-148/+132
| | | | | | | This replaces the flow_set_* commands with a single fccntl command that can configure flows and the FRCT instance. For more details, see "man 3 fccntl".
* dev: Revise fqueue API and add man pagesdimitri staessens2017-08-291-23/+23
|
* Merged in dstaesse/ouroboros/be-deprecate-gam (pull request #572)dimitri staessens2017-08-281-2/+1
|\ | | | | | | Be deprecate gam
| * ipcpd: Deprecate gam as autonomous componentdimitri staessens2017-08-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The graph adjacency manager has been deprecated in favor of providing an external interface into the connectivity manager so that adjacencies can be controlled from the command line, user scripts or user applications. The gam and its associated policies were removed from the normal IPCP and the IRM configuration tools. The "/members" part of the RIB was deprecated. Removal of the gam means that initial connectivity based on changes in the RIB can't be provided, so some changes were required throughout the normal IPCP. The enrollment procedure was revised to establish its own connectivity. First, it gets boot information from a peer by establishing a connection to the remote enrollment component and downloading the IPCP configuratoin. This is now done using its own protocol buffers message in anticipation of deprecation of the RIB and CDAP for communication within a DIF. After the boot information is downloaded, it establishes a data transfer flow for enrolling the directory (DHT). After the DHT has enrolled, it signals the peer to that enrollment is done, and the data transfer connection is torn down. Signaling connections is done via the nbs struct, which is now passed to the connmgr, which enables control of the connectivity graph from external sources.
* | lib: Add configuration message to FRCTSander Vrijders2017-08-261-78/+128
|/ | | | | This adds the configuration message to FRCT, which allows for configuring the connection.
* lib: Fix bad locking in frcti_readSander Vrijders2017-08-251-1/+1
| | | | A read lock was taken when a write lock was needed.
* lib, ipcpd, irmd: Fix several memleaksSander Vrijders2017-08-231-0/+1
| | | | | This fixes several memleaks as reported by valgrind. It also fixes some calls to close() with -1.
* lib: Make sender and receiver inactivity simple checksSander Vrijders2017-08-231-153/+68
| | | | | | This makes the sender and receiver inactivity timers into simple checks that compare when the last SDU was sent to the current time to set the receiver or sender inactivity.
* lib: Remove bad assertionSander Vrijders2017-08-231-1/+0
| | | | | Timeout was asserted not to be NULL, but sometimes timeout can be NULL and is a valid parameter when NULL.
* lib: Fix timeout value of flow_event_waitSander Vrijders2017-08-221-4/+6
| | | | | shm_flow_set_wait was called with a timeout even though flow_event_wait was called with timeout NULL.
* lib: Fix calling frct_clear in wrong functionSander Vrijders2017-08-221-2/+2
| | | | frct_clear was called in ouroboros_fini instead of ouroboros_init.
* lib: Fix CRC check and add frct_clearSander Vrijders2017-08-221-13/+30
| | | | | | This adds the CRC check by default on outgoing SDUs. It fixes some errors in the serialization and deserialization of the SDU. frct_clear was added to avoid bad initialization of the array of FRCT instances.
* lib: Make timerwheel a passive componentSander Vrijders2017-08-221-8/+13
| | | | | | 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.
* build: Revise the build systemdimitri staessens2017-08-211-6/+9
| | | | | | | | | | 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.
* lib: Add basic FRCT mechanismsSander Vrijders2017-08-171-70/+370
| | | | | | | | | | 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.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-2/+1
|
* lib: Fix data race on fqueues bitmapdimitri staessens2017-08-131-126/+143
| | | | | | This locks the process when allocating and destroying flow_sets. The flows_lock has been renamed to lock. Refactors and fixes a memleak in ouroboros_init.
* lib: Simplify initializing flowsSander Vrijders2017-08-011-291/+80
| | | | | This refactors dev.c to have a common function called init_flow that is called whenever a flow is allocated in dev.c
* lib: Fix memleak in FRCT enrollmentdimitri staessens2017-07-031-0/+3
|
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-211-32/+84
| | | | | | | This adds more Quality of Service support to Ouroboros. One part is the network specific characteristics such as bandwidth, delay, ... The other part is end-to-end QoS like reliability, window based flow control, ...
* lib: include missing headers in dev.cdimitri staessens2017-06-211-8/+8
| | | | | The dev.c source file had some missing include headers. This PR fixes inconsistencies between the definitions and declarations in ipcp-dev.h
* lib: Fix some bugs in dev.cdimitri staessens2017-05-231-45/+55
| | | | | | | Fixed releasing an allocated fd on failure. As the sending of dealloc messages has been deprecated, dealloc was simplified by removing a stale block of code (replaced with an assertion). Fixed reading some variables without a necessary lock.
* ipcpd: Remove FRCT from normal IPCPdimitri staessens2017-05-101-1/+1
| | | | | | | In order to ensure 100% reliable transfer, the protocol state machine that takes care of retransmission and SDU ordering has to be in the application. Flow allocation in the normal now uses fds. The PDU_type field was deprecated and AE's within the DIF can use reserved fds.
* lib: Remove obsolete lock in dev.cdimitri staessens2017-04-281-135/+5
|
* lib: Add call to reserve blocks in rdrbuffdimitri staessens2017-04-261-1/+27
| | | | | | | This adds a call ipcp_sdb_reserve to reserve memory in the rdrbuff without directly writing to a flow. The ipcp_flow_del function was renamed to ipcp_sdb_release. The functions operating on sdbs are moved to their own header.
* include, lib: Rename ap_init/ap_finidimitri staessens2017-04-131-2/+2
| | | | Fixes #35
* Merged in dstaesse/ouroboros/be-hashes (pull request #479)dimitri staessens2017-04-131-3/+6
|\ | | | | | | lib, ipcpd, irmd: Register hash instead of name
| * lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-3/+6
| | | | | | | | | | | | | | | | | | 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.
* | lib: Fix return values in ap_init()dimitri staessens2017-04-111-4/+4
|/
* dev: Return descriptive errors for flow_allocdimitri staessens2017-04-101-10/+10
|
* lib: Make timeout for flow allocation constdimitri staessens2017-04-101-5/+5
|
* lib, irmd: Implement flow allocation timeoutdimitri staessens2017-04-061-7/+24
| | | | | | Setting the timeouts on flow_alloc and flow_accept will now work. This makes some changes to the UNIX sockets used for management communication between the APs, IRMd and IPCPs.
* lib, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-041-28/+51
|
* lib: Fix missing assignment in flow_allocdimitri staessens2017-03-311-5/+13
|
* lib: Revise flow allocation APIdimitri staessens2017-03-311-135/+58
| | | | | | The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument.
* lib: Fix locks in dev.cdimitri staessens2017-03-291-7/+5
|
* lib: Add queued SDUs when adding fd to flow_setdimitri staessens2017-03-211-0/+6
| | | | | This solves some race conditions where packets arrive on a flow before it is added to a flow_set.
* Change email addresses to ugent.beSander Vrijders2017-03-031-2/+2
| | | | | | | 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.
* lib: Remove application entity nameSander Vrijders2017-02-241-22/+2
| | | | | The AE name should not be passed over the layer boundaries. If an application has more than one AE it should exchange this in CACEP.
* ipcpd: Silent shutdown of normaldimitri staessens2017-02-101-0/+5
| | | | | The acceptor will not log disconnects with IRMd. Unexpected disconnects will be reported and handled by management components.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-33/+82
| | | | | | | | 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: Fix reading from non-blocking flowsdimitri staessens2017-01-241-4/+3
| | | | | The -EAGAIN from a failed non-blocking flow read would trigger the assertion. This snuck in somehow (we need some unit tests for dev.c).
* lib: Fix return value and typo in fqueuedimitri staessens2017-01-201-1/+1
|
* build: Update licenses and copyrightdimitri staessens2017-01-091-10/+11
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-031-18/+42
| | | | | | | | | | 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-31/+11
| | | | | | | 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.
* lib: Fix shutdown in multithreaded programsdimitri staessens2016-12-241-6/+6
| | | | | If a thread with a pending flow terminates, ap_fini would wait for the condvar to destroy the flow indefinitely.