summaryrefslogtreecommitdiff
path: root/src/ipcpd/local
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd: Remove unnecessary locks in localdimitri staessens2017-04-041-32/+3
|
* ipcpd: Fix lock order in local sdu_loopdimitri staessens2017-04-041-1/+1
|
* lib, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-041-29/+49
|
* ipcpd: Fix some bad lockingdimitri staessens2017-04-031-8/+6
|
* Merge branch 'testing' into beSander Vrijders2017-03-211-1/+7
|\
| * ipcpd: local: Handle failed flow allocationSander Vrijders2017-03-211-1/+7
| | | | | | | | | | | | When the flow_req_arr returned a negative error, it was not handled correctly in the local IPCP, and an access was made into a table with a negative integer. This handles it correctly.
* | Change email addresses to ugent.beSander Vrijders2017-03-031-1/+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.
* | build: Format CMakeLists.txt filesSander Vrijders2017-03-031-5/+5
| | | | | | | | The CMakeLists files are now properly indented.
* | lib: Remove application entity nameSander Vrijders2017-02-241-3/+1
|/ | | | | 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: Remove logging if not initialized yetSander Vrijders2017-02-101-1/+0
| | | | | | This removes the logs that would print to stdout if the IPCP fails to initialize. If the user had asked that logs would be printed to the syslog this would be unwanted behaviour.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-1/+4
| | | | | | | | 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: Log to the logging systemdimitri staessens2017-02-081-42/+30
| | | | | | | | | | 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: Refactor ipcpi structdimitri staessens2017-02-071-6/+10
| | | | | | | | | The ipcp-ops header was removed and merged into ipcp.h. The common components dif_name and ipcp_type have been moved to the main ipcp struct. After this move, ipcp_data only contained shim information, so it was renamed to shim_data. The ipcp_init() function checks the type and will only include the shim_data if the type is not an IPCP_NORMAL. All ipcps have been adapted to this change in API.
* ipcpd: Remove strdup() from ipcp main loopdimitri staessens2017-02-031-1/+8
|
* ipcpd: Fix unused parameter in local IPCPdimitri staessens2017-01-291-0/+2
|
* ipcpd: Don't strdup() the dif_name in main loopdimitri staessens2017-01-291-3/+0
|
* ipcpd: Let IPCPs bind a nameSander Vrijders2017-01-091-8/+2
| | | | | | | This allows IPCPs to bind a name, so that they can announce their name to neighbors which can then allocate a flow to them. Registering of the name happens by an administrator. It also moves the irmd_api to common ground, since it is used by all IPCPs.
* ipcpd: Add boot and shutdown operationsdimitri staessens2017-01-041-5/+11
| | | | | | | These operations separe the starting and joining of the main ipcp threads into ipcp_boot() and ipcp_shutdown() operations. This allows the proper cleanup of user data and user threads after the IPCP is requested to shut down.
* lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-031-5/+2
| | | | | | | | | | 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.
* ouroboros: Correct license statementsdimitri staessens2016-12-241-3/+2
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* ipcpd, lib, irmd: Update to use qoscube_tdimitri staessens2016-12-241-4/+4
|
* ipcpd: Change IPCP_RUNNING to IPCP_OPERATIONALSander Vrijders2016-12-061-5/+5
| | | | Changes a state of the IPCP to a more correct terminology.
* ipcpd: Split IPCP state PENDING_ENROLSander Vrijders2016-11-301-5/+5
| | | | | | | | This will split the IPCP state PENDING_ENROL into IPCP_CONFIG and IPCP_BOOTING. IPCP_CONFIG is concerned only with configuring the IPCP with the bare essence. When in IPCP_BOOTING, the IPCP will complete its configuration by starting its policies, and thus making the IPCP completely functioning.
* lib, ipcpd: Improve flow allocationdimitri staessens2016-10-311-8/+12
| | | | | | | 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.
* ipcpd: Remove unnecessary include of fcntldimitri staessens2016-10-311-2/+0
|
* ipcpd: Clean shutdown when bootstrap failsdimitri staessens2016-10-311-6/+12
| | | | | Fixes a double free (conf->dif_name) and the handling of non-created threads when the bootstrap of an IPCP fails
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-261-10/+8
| | | | | | | | | | | 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-directory (pull request #280)dimitri staessens2016-10-261-5/+20
|\ | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-261-5/+20
| | | | | | | | | | | | | | | | | | This adds the ability to query IPCPs if a name can be reached through them, e.g. if a name is available in a DIF. This means that in the shim-udp a DNS query is performed, in the shim-eth-llc an ARP-like query has been added, in the local a check is done to see if the name is registered, and in the normal currently no application is reachable through it.
* | ipcpd: Fix memleaks in local IPCPdimitri staessens2016-10-241-11/+14
|/
* lib: Stabilise flow allocationdimitri staessens2016-10-231-0/+1
| | | | | | | 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.
* ipcpd: Fix unused variabledimitri staessens2016-10-231-1/+4
|
* build: Compile with strict conversiondimitri staessens2016-10-221-17/+10
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-0/+7
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* lib: Demultiplex the fast pathdimitri staessens2016-10-211-17/+51
| | | | | | | | 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, dev: Implement read/write options for flowsdimitri staessens2016-10-161-0/+2
| | | | | | | Added the missing implementation of setting read/write options for flows. This allows applications to block the fast path for remotes. IPCPs can use this to block the fast path for the N + 1 flow when receiving remote deallocation requests.
* lib: Stabilize fast flow deallocation over local IPCPdimitri staessens2016-10-151-16/+19
|
* lib: Fix flow deallocation logicdimitri staessens2016-10-131-0/+2
| | | | | Both the N and N-1 entity must now call flow_dealloc for the port_id to be released.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-395/+99
| | | | | | | | | | | | 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: Add northbound ringbuffersdimitri staessens2016-09-021-3/+3
| | | | Fast path is split in north and southbound paths.
* lib: Change rdrbuff API to use correct typesSander Vrijders2016-09-011-1/+1
| | | | | | The head and tail alloc and release operations were taking an int to identify the idx instead of a ssize_t. The size was a ssize_t instead of a size_t.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-7/+12
| | | | | | | | | | 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.
* ipcpd: Report pid on shutdowndimitri staessens2016-08-261-2/+2
| | | | IPCPs will report their pid on shutdown for faster debugging.
* ipcpd: Revised lockingdimitri staessens2016-08-241-60/+41
| | | | | | The state lock was reverted to an rwlock to avoid interference of management functions with the fast path. IPCPs now close without calling unsafe functions in the signal handler.
* ipcpd: Add condition variable to IPCP stateSander Vrijders2016-08-111-36/+36
| | | | | | | This adds a condition variable to the IPCP state, so that upon state changes any listeners to state changes can be notified. It also replaces the read/write lock with a mutex in order to be able to do so.
* Merged in sandervrijders/ouroboros/be-create-ipcp (pull request #200)dimitri staessens2016-08-101-0/+6
|\ | | | | | | ipcp, irmd, lib: Notify IRMd upon IPCP initialization
| * ipcp, irmd, lib: Notify IRMd upon IPCP initializationSander Vrijders2016-08-101-0/+6
| | | | | | | | | | | | This will notify the IRMd when the IPCP is initialized and ready to receive messages. Previously a bootstrap could fail since the IPCP was not listening to the socket yet.
* | ipcpd: Fix locking problem in local IPCPSander Vrijders2016-08-101-2/+2
|/ | | | | A lock was not being taken to check the state, but then it was released if the state was not IPCP_NULL, resulting in a segfault.
* ipcpd: Fix memleakdimitri staessens2016-08-051-0/+2
| | | | The entry from the ringbuffer was never freed, causing memleak per SDU.
* ipcpd: Fix memory leaksdimitri staessens2016-08-041-5/+2
| | | | ipcp-data was not correctly destroyed.