summaryrefslogtreecommitdiff
path: root/src/lib/irm.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* include, lib: Report communication failure with the IRMddimitri staessens2016-12-281-13/+12
| | | | | | | 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 memleak in irm.cdimitri staessens2016-12-271-1/+3
|
* 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: normal: Add policy for obtaining a flat addressSander Vrijders2016-11-011-0/+2
| | | | | | This adds a policy for obtaining a flat address, and thus also the infrastructure for policies in the IPCP. The IPCP should check if the address is available; this is currently not there yet.
* build: Compile with strict conversiondimitri staessens2016-10-221-2/+2
| | | | | This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-1/+1
| | | | | | | | | | | | 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
* ipcpd: normal: Add operations to get and set the PCISander Vrijders2016-09-071-4/+4
| | | | | | | | | This adds the operations needed in the normal IPCP to get and set the Protocol Control Information. It allows to allocate or release space in the current DU. The struct pci can be serialized into newly allocate space. Vice versa, a struct pci can be deserialized given a DU. It allows for decreasing the TTL in the DU and for calculating the CRC32. The TTL and CRC32 can now be selected when creating a new DIF.
* irmd, lib: Rebuild the IRMd data modeldimitri staessens2016-08-211-16/+69
| | | | | | | | | | | | | | | | | | | | | | The complete data model inside the IRMd has been restructured. The bind operation was revised to allow binding of AP and AP instances and register those names with different DIFs (see "irm bind" for details). Server applications require to call ap_init with a server name argument, client application that do not the be reachable over any DIF can call ap_init(NULL). Calling ap_init for a client with a specified name will not have adverse consequences for the application, but will consume unnecessary resources in the IRMd. Application servers can now be started at any point after the IRMd has been started. Starting servers, binding AP names and registering names in DIFs can be performed in any order that does not defy temporal logic. Supports naming instances by their pid. In case of IPCP Instances created with the IRM tool, the name assigned during "irm ipcp create" can be used. All the changes required updates in the tools.
* lib: Change invalid pid to -1dimitri staessens2016-07-051-3/+3
| | | | | | | | 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.
* Merged in sandervrijders/ouroboros/be (pull request #154)dimitri staessens2016-07-051-0/+1
|\ | | | | | | lib: Provide first implementation of revised CDAP
| * Merge remote-tracking branch 'upstream/be' into beSander Vrijders2016-07-051-6/+90
| |\
| * | lib: Provide first implementation of revised CDAPSander Vrijders2016-07-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a first version of the revised CDAP specification. CACEP (for authentication purposes) has been separated from CDAP. Application developers may use CDAP if they find it useful. Within Ouroboros CDAP will be used to perform operations on the RIB of an IPCP.
* | | lib:irm: fix ap check when full path is given.dimitri staessens2016-07-051-1/+3
| |/ |/| | | | | | | The check_ap_path function didn't return correctly when the first check was successful.
* | lib: utils: deprecate strdupdimitri staessens2016-07-051-1/+1
| | | | | | | | | | | | | | | | When introducing robust mutexes, ouroboros moved to POSIX 200809L which includes the strdup function in <string.h>. Including <ouroboros/config.h> will give access to strdup. Fixes #15.
* | lib: irm: search for ap using PATH variabledimitri staessens2016-07-041-6/+90
|/ | | | | | | | | The bind function will search all directories specified in the PATH variable for the ap fed to the irm bind command and check if it is executable by the uid executing irm bind command. Adds missing info logs for the bind/unbind and unreg operations in the irmd.
* tools, irm: move binary check to librarydimitri staessens2016-07-031-0/+8
| | | | | | | This will make the library check if the user has permissions to execute the binary when auto is set. This prevents writing malicious software that would use the irmd to execute other applications to which the user has no access.
* lib, irmd, ipcpd: Change pid to apiSander Vrijders2016-06-281-3/+3
| | | | Changes the variable name as well to API instead of PID.
* lib, irmd, ipcpd: Change of IRM APISander Vrijders2016-06-281-61/+140
| | | | | | | | | | | | | | This changes the IRM API after discussions with Dimitri. The register operation is now split into a bind and register operation. The same for unregister; unbind and unregister. PIDs are now used as the application instance name. A name for a PID is only provided for scriptability in bash. It is therefore also no longer passed down to the IPCP. Every operation on an IPCP through the IRM API has to use the PID. Quering of the PIDs by name is possible. The IRM tool has been updated to use this new API as well. A subcommand 'ipcp' has been added for operations that take effect on IPCPs only. Fixes #12
* lib: Remove implementation specific errnosSander Vrijders2016-06-221-6/+6
| | | | | This removes any implementation specific error numbers. Only errors that are implementation independent should be returned.
* lib: Add errnos specific for OuroborosSander Vrijders2016-06-221-8/+9
| | | | | | | This adds error numbers specificly for Ouroboros. It also refactors some of the header files that are installed. Fixes #2
* Merge remote-tracking branch 'upstream/be' into be-llcSander Vrijders2016-06-141-26/+46
|\
| * lib, irmd, tools, ipcpd: updates to dev API.dimitri staessens2016-06-131-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registration function has been moved to the irm tool, applications now need to be registered by an administrator. Currently only supports one instance per registered name, and an AP can be registered under only one name. The irmd can now start a registered server application on demand. For the full functionality of the tool, execute "irm register". AP name removed from flow allocation. Flow allocation does not send the source ap name as it is quite useless. The accept() call now only returns the AE name.
* | ipcpd: Adds a shim over IEEE 802.2 over IEEE 802.3Sander Vrijders2016-06-141-0/+3
|/ | | | | This adds a shim over LLC over Ethernet. It uses the raw socket API to send messages directly over an interface.
* lib: fixed empty line in irm.cdimitri staessens2016-05-281-1/+0
|
* ipcpd: IPCP over local memorydimitri staessens2016-05-281-0/+3
| | | | | | | | | | | | | This introduces an IPC process that relays data between two local AP's over the shm_du_map. Only configuration it has is a DIF name. It required small modification elsewhere: lib: added support for the IPCP_LOCAL type irm: added support for the IPCP_LOCAL type dif_config: added the IPCP_LOCAL type tools: added support for the IPCP_LOCAL type
* lib: irm.h create_ipcp now returns pid_tdimitri staessens2016-04-261-2/+2
| | | | | ipcp_create now returns the pid of the created process to allow for more efficient scripting.
* lib: instance ID's are now set to the process PIDdimitri staessens2016-04-261-6/+4
| | | | | | | | All instance-id's in ouroboros will be set by the system to the pid of the process associated with this application process instance. This means that the user has no way to choose the instance id's. Function calls that assumed manually defined instance id's have been replaced throughout the system.
* ipcpd: initial IPC processesdimitri staessens2016-04-181-4/+6
| | | | | | | | | | | Basic functions for implementation of IPC processes, and implementation of core functions of the shim IPCP over UDP. Updates to the build system to compile these IPC processes, as well as some fixes in the irmd (rudimentary capturing exit signals) and some fixes in the library, mainly relating to the messaging. Basic implementation of creation / bootstrapping / deletion of the shim UDP. Placeholders for other functions.
* lib: Change ipcp typesSander Vrijders2016-04-111-2/+2
| | | | | This changes the name of the IPCP types after discussions with Dimitri.
* lib, irmd, irm: Add dif_configSander Vrijders2016-04-081-3/+40
| | | | | | | | | This adds dif_config to the prototype, in which one is able to specify the parameters a DIF should have. The bootstrap operation of an IPCP takes this as parameter and is oblivious to whether it is a shim or a normal IPCP. The dif_config struct is also correctly serialized and deserialized and passed opaquely to the correct IPCP. This IPCP is in charge of deserializing it correctly.
* lib, irmd: Update communication with IRMdSander Vrijders2016-03-301-19/+73
| | | | | All messages sent to the IRMd now also get a reply back with the result of the operation.
* lib: fixes for instance_namedimitri staessens2016-03-301-21/+6
| | | | | fixes wrong check, checks now use lazy evaluation changed the order of instance_name_cpy to (dst, src)
* lib: renamed rina_name_t to instance_name_tdimitri staessens2016-03-301-38/+46
| | | | | all functions taking a char * ap_name and uint id now take either a instance_name_t or instance_name_t *
* lib: Update irm.h APISander Vrijders2016-03-281-59/+82
| | | | | | Removes rina_name_t from that API. Passing ap_name and api_id as params instead. The IRM tool has been updated accordingly. Some errors in the build related to protobuf-c have also been resolved.
* lib: Adds IRMd messages for the dev.h API callsSander Vrijders2016-03-241-35/+6
| | | | | | 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.
* lib: Add communication with IPCP daemonSander Vrijders2016-03-171-0/+2
| | | | | This adds the messages required for the IRMd to communicate with an IPC Process through the library.
* lib: Add helpers for RINA namesSander Vrijders2016-03-111-0/+30
| | | | This adds helper functions for RINA names, to aid with handling them.
* irmd, lib: Replace stubs in irmdSander Vrijders2016-03-091-1/+1
| | | | | | This replaces the stubs in the irmd and calls the actual IPCP operations from the library. It also calls the DIF Allocator API in one of the operations.
* include: Fixed missing 'struct', renamed dif_infoDimitri Staessens2016-03-031-2/+2
| | | | | common.h: dif_info renamed to dif_config missing struct fixed
* lib, irmd: Fix memleaksSander Vrijders2016-03-031-2/+6
| | | | Fixes a couple of memleaks found while executing with valgrind.
* lib, irmd, tools: Provide more IRM messagesSander Vrijders2016-03-011-32/+84
| | | | | | | This provides the other messages that are used to communicate between the library and the IRM Daemon. The IRM tool just calls the library right now to see if it works. A full fledged program will be provided in a next commit.
* lib: Fix two errorsSander Vrijders2016-02-261-3/+7
| | | | | | Fixes two errors in the library. The return code of a write to a socket was ignored. A non literal string was passed to sprintf as a literal one.
* lib, irmd: Address Dimitri's commentsSander Vrijders2016-02-261-2/+2
| | | | This addresses several comments Dimitri had on the sockets layer code.
* lib, irmd, tools: Support to create IPCPsSander Vrijders2016-02-251-4/+10
| | | | | | | Provides the initial support to create IPCPs via a command-line tool. It extends the socket layer with a message that is sent over a socket to the irmd when the irm_create_ipcp library function is called from a program.
* lib: Initial messages for the IRMSander Vrijders2016-02-231-0/+97
This provides the initial messages to be passed between the irmd and libouroboros-irm.