summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp
Commit message (Collapse)AuthorAgeFilesLines
* ipcpd: Refactor ipcpi structdimitri staessens2017-02-071-12/+18
| | | | | | | | | 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/+9
|
* ipcpd: Don't strdup() the dif_name in main loopdimitri staessens2017-01-291-3/+0
|
* Merge remote-tracking branch 'upstream/be' into be-gamSander Vrijders2017-01-093-3/+3
|\
| * build: Update licenses and copyrightdimitri staessens2017-01-093-3/+3
| | | | | | | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* | ipcpd: Let IPCPs bind a nameSander Vrijders2017-01-091-7/+1
|/ | | | | | | 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-2/+13
| | | | | | | 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.
* Merged in dstaesse/ouroboros/be-normal-refactor (pull request #331)Sander Vrijders2017-01-041-2/+1
|\ | | | | | | ipcpd: Refactor normal ipcp, initial commit
| * ipcpd: Refactor of normal IPCPdimitri staessens2017-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganizes the normal IPCP a bit to make sure internal components do not need to access the state of the IPCP. The IPCP has now a thread calling accept and delegating it to the correct component based on the AE name (this used to be in the fmgr). Internal components are initialized upon enrollment or bootstrap of the IPCP. If a step fails, the IPCP goes back to the INIT state, if all components boot correctly, it goes to the operational state. RIB synchronization is still done by sending a CDAP start/stop and syncing with a ribmgr state, but needs revision later on.
* | lib, ipcpd, irmd: Proof of concept QoSdimitri staessens2017-01-032-20/+29
|/ | | | | | | | | | 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-244-12/+8
| | | | | 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-7/+7
| | | | Changes a state of the IPCP to a more correct terminology.
* ipcpd: Split IPCP state PENDING_ENROLSander Vrijders2016-11-301-7/+7
| | | | | | | | 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.
* ipcpd, lib: Add syntax version to protobuf filesSander Vrijders2016-11-221-0/+25
| | | | | | This adds a syntax version to the protobuf files. The latest version of protobuf otherwise complains that it is missing. The GPL license is also added on files where it was missing.
* lib, ipcpd: Improve flow allocationdimitri staessens2016-10-311-22/+36
| | | | | | | 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-1/+0
|
* ipcpd: Clean shutdown when bootstrap failsdimitri staessens2016-10-311-10/+16
| | | | | Fixes a double free (conf->dif_name) and the handling of non-created threads when the bootstrap of an IPCP fails
* ipcpd: Fix bad lock in shim-udpdimitri staessens2016-10-261-11/+10
|
* lib, ipcpd: Further stabilization of flowsdimitri staessens2016-10-262-82/+4
| | | | | | | | | | | 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.
* ipcpd: shim-udp: Add check for directory entrySander Vrijders2016-10-261-0/+5
| | | | | | A check was missing in the shim UDP if the destination was already present in the directory, in which case no further queries were needed.
* Merged in sandervrijders/ouroboros/be-directory (pull request #280)dimitri staessens2016-10-261-46/+84
|\ | | | | | | lib, irmd, ipcpd: Add name querying to IPCPs
| * lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-261-46/+84
| | | | | | | | | | | | | | | | | | 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 memory leaksdimitri staessens2016-10-251-17/+16
|/ | | | | Fixes memory leaks associated with the dif_name (which doesn't need to be maintained in shim DIFs) and the fqueue for the N + 1 flows.
* build: Remove the gethostbyname checkdimitri staessens2016-10-231-17/+0
| | | | | gethostbyname is included in POSIX 2001. Ouroboros requires at least POSIX 2001 and recommends POSIX 2008 for stable builds.
* build: Fix missing includedimitri staessens2016-10-221-0/+1
| | | | | | CheckLibraryExists was not included. Apparently the CHECK_FUNCTION_EXISTS call fails with the strict prototyping flag turned on.
* build: Compile with strict conversiondimitri staessens2016-10-222-14/+17
| | | | | 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/+4
| | | | | 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-23/+61
| | | | | | | | 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: 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: Add non-copy reading from fd for IPCPsdimitri staessens2016-10-071-1/+1
|
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-673/+307
| | | | | | | | | | | | 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
* Merged in dstaesse/ouroboros/be-split-fp (pull request #238)Sander Vrijders2016-09-021-3/+3
|\ | | | | | | lib: Add northbound ringbuffers
| * lib: Add northbound ringbuffersdimitri staessens2016-09-021-3/+3
| | | | | | | | Fast path is split in north and southbound paths.
* | lib: ipcp: Decouple flow_deallocdimitri staessens2016-09-021-1/+1
|/ | | | Sending a dealloc to the irmd moved to its own call.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-12/+17
| | | | | | | | | | 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-179/+113
| | | | | | 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: shim-udp: Change nsupdate and nslookup checkSander Vrijders2016-08-161-28/+17
| | | | | | | Previously it was up to the admin to choose whether or not to enable DDNS. Now the build just checks if the executables can be found, and if they are available DDNS functionality is enabled, else it is disabled.
* ipcpd: Add condition variable to IPCP stateSander Vrijders2016-08-111-70/+70
| | | | | | | 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.
* 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 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-1/+1
| | | | ipcp-data was not correctly destroyed.
* build: Fix wrong inclusionSander Vrijders2016-07-261-2/+0
| | | | | | The protobuf include directory was not being correctly handed to the compiler when building. Now the include directory is added project-wide. And the protobuf package is searched for only once.
* ipcpd: Deprecate ipcp_reg/ipcp_unregdimitri staessens2016-07-081-2/+0
|
* irmd, ipcps: Close logfile on exitdimitri staessens2016-07-071-5/+10
| | | | | | | IRMd and ipcps will now close the logfile upon exit. Also corrects exit(1) to exit(EXIT_FAILURE) and exit(0) to exit(EXIT_SUCCESS).
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-clean-exitdimitri staessens2016-07-061-3/+3
|\
| * lib, irmd, ipcpd: Provide the feature to write to logsSander Vrijders2016-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | Writing output to log files is now enabled by default. Logs are written to <INSTALL_PREFIX>/var/log/ouroboros, which is created on install. There is a log file for the irmd and one per IPCP. To still get (colored) output on stdout, provide the --stdout switch when starting the irmd. Fixes #17
* | lib: shm_du_map: Clean sdus upon exitdimitri staessens2016-07-061-1/+1
|/ | | | | | | | When an application closes the shm_du_map, it will clean all remaining sdu's for that application. Adds a function to clean the shm_du_map on close. Fixes #20.
* lib: Change invalid pid to -1dimitri staessens2016-07-051-2/+2
| | | | | | | | The stack used pid 0 (the scheduler) to indicate an invalid process instance, probably as a leftover from the deprecated application process instance id. Using -1 is a better solution. Fixes #16.