summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Add missing modulo calculationSander Vrijders2016-05-161-1/+1
| | | | | | Adds a missing modulo calculation that would result in index -1 being returned instead of zero when the ringbuffer skipped back to the beginning.
* lib: dev: small locking improvementsdimitri staessens2016-05-161-28/+33
| | | | | | This avoids holding the long locks during accept() and alloc_res() calls. Small reduction of time of other locks held. No changes in locking logic.
* lib: dev.c: Revised lockingdimitri staessens2016-05-151-69/+65
| | | | | fd and flows are now all protected by the flows_lock while the overall state of the AP is protected by the data_lock.
* lib: allow accepting any flowsdimitri staessens2016-05-151-7/+7
| | | | The application can call accept(fd, NULL, NULL);
* lib: cleanup file descriptors for shared memorydimitri staessens2016-05-151-2/+9
| | | | | cleanup of file descriptors for the shared memory. also adds a missing NULL check and some invalidation in dev.c
* lib: irmd: fixed flow deallocationdimitri staessens2016-05-151-7/+10
| | | | | Port_id's weren't correctly released. Also removes remaining debug logs from the library.
* lib: dev.c: added lockingdimitri staessens2016-05-141-36/+176
| | | | | Locking is required for multi-threaded applications. Flows are locked separately. Read/Write locks are used for concurrent reads.
* dev: fixed wrong bracket placementdimitri staessens2016-05-121-2/+1
|
* lib: dev: implementation of flow_cntldimitri staessens2016-05-121-9/+34
| | | | | allows setting the oflags to make flow_read and flow_write blocking or non-blocking (FLOW_O_NONBLOCK).
* ipcpd: Allow disabling of DNSSander Vrijders2016-05-101-12/+2
| | | | | | This allows someone to disable the use of DNS in the shim UDP. It also adds a config file specific for the shim UDP (which holds the nsupdate location). Certain defines were also moved to the global config file.
* irmd: introduced lockingdimitri staessens2016-05-101-0/+5
| | | | | This commit adds locking to the IRMd with a single global lock. It also fixes some issues in cleaning up the daemon.
* lib: changed port_id to intdimitri staessens2016-05-081-2/+2
| | | | | returning -1 as uint32_t leads to bugs. also changed types in GPB to sint to use zigzag encoding.
* lib/irmd/ipcpd/tools: fixes comments on eb9f443dimitri staessens2016-05-081-3/+17
|
* irmd: flow allocation and fast pathdimitri staessens2016-05-071-98/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: client-side flow allocationdimitri staessens2016-04-271-2/+4
| | | | | flow allocation now propagates on the client side up to the IPCP. added UNKNOWN_AP and UNKNOWN_AE definitions to dev.h
* irmd: reg/unreg whatevercast namesdimitri staessens2016-04-221-32/+46
| | | | | | | | | | | | Unregistering ap's now works. An AP now registers/unregisters its AP-I by sending its AP name and its pid to the IRMd. The IPCPs register whatevercast names. An AP name is currently mapped on a whatevercast name represented by the same string literal. The IRMd allows registration of only one AP-I per AP. A Name Space Management system is needed in the processing system so we can resolve this completely. Changing the stack to register whatevercast names required some changes all over the ipcpd implemented and in the library.
* lib, irmd: Update communication with IRMdSander Vrijders2016-03-301-21/+57
| | | | | All messages sent to the IRMd now also get a reply back with the result of the operation.
* lib, irmd: Use GPB for dev.c and IRMdSander Vrijders2016-03-281-58/+67
| | | | | IRMd and dev.c now also use GPB instead of our own ser/des. irm_msg struct has been dropped as well as the methods associated with it.
* lib: Adds IRMd messages for the dev.h API callsSander Vrijders2016-03-241-29/+169
| | | | | | This adds several messages for the dev.h API calls to communicate with the IRM daemon. The deserializing of these messages is still missing and the irmd hasn't been updated with them either.
* tools: Simple echo applicationSander Vrijders2016-03-211-0/+104
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.