summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/main.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Provide RIB API to export internals via fusedimitri staessens2017-09-181-6/+15
| | | | | | | This adds a virtual RIB that is accessible as a filesystem that is accessed through a fuse mountpoint (configurable , default is /tmp/ouroboros). Currently, each IPCP will export its link state database.
* ipcpd: Revise internals of normal IPCPdimitri staessens2017-09-121-30/+10
| | | | | | | | This removes the RIB as a datastructure and CDAP as the protocol between IPCPs. CDAP, the rib and related sources are deprecated. The link-state protocol policy is udpated to use its own protocol based on a simple broadcast strategy along a tree. The neighbors struct is deprecated and moved to the library as a generic notifier component.
* ipcpd: Fix double finalization after some failuresdimitri staessens2017-09-071-5/+4
| | | | | When enroll or bootstrap failed, finalize_components could be called twice, resulting in double frees or use-after-free.
* ipcpd: normal: Simplify enroll APISander Vrijders2017-09-011-2/+2
| | | | | | | This will remove the dst parameter from enroll_boot, since it was only being used in logging. It also turns some other debug logs into info logs, and makes the component names as they are used in logs all lowercase.
* ipcpd: Fix thread leaks in normal IPCPdimitri staessens2017-08-291-0/+2
|
* ipcpd: Address comments on 176698edimitri staessens2017-08-281-1/+1
|
* tools: Add tool to connect IPCP componentsdimitri staessens2017-08-281-1/+4
| | | | | | | | | | | | This enables user-written tools to instruct IPCPs to establish and tear down connections (a.k.a. adjacencies) between its internal components (Management and Data Transfer). For more info, do "irm ipcp connect" or "irm ipcp disconnect" on the command line. This commit exposes a deletion bug in the RIB where FSO's fail to unpack/parse. This will be fixed when the RIB is deprecated.
* ipcpd: Deprecate gam as autonomous componentdimitri staessens2017-08-281-203/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ipcpd: Improve locking in connmgrdimitri staessens2017-08-221-1/+1
|
* build: Revise the build systemdimitri staessens2017-08-211-1/+4
| | | | | | | | | | 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.
* ipcpd: Refactor normal IPCP failure handlingdimitri staessens2017-08-161-35/+24
|
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-131-1/+1
|
* ipcpd: Add DHT as directory in normal IPCPdimitri staessens2017-07-181-12/+16
| | | | | | | | | This implements a Distributed Hash Table (DHT) based on the Kademlia protocol, with default parameters set as used in the BitTorrent Mainline DHT. This initial implementation is almost feature complete, except for some things to be done after a testing period: caching and stale peer bumping, and setting the expiration timeout via the IRM tool.
* ipcpd: Start DT component before flow allocatordimitri staessens2017-05-241-15/+15
|
* ipcpd: normal: Make routing a policySander Vrijders2017-05-151-7/+10
| | | | | | This makes the routing component into a policy since different approaches may exist to do this, depending on how high the rank of the DIF is.
* ipcpd: Allow specifying fixed syntaxdimitri staessens2017-05-151-25/+9
| | | | | | This commits adds the functions and messages to specify a fixed protocol syntax during CACEP. It also revises the messages for specifying the DT protocol syntax from the irm tool.
* ipcpd: Remove FRCT from normal IPCPdimitri staessens2017-05-101-32/+23
| | | | | | | 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.
* Merged in sandervrijders/ouroboros/be-frct-api (pull request #497)Sander Vrijders2017-04-281-4/+0
|\ | | | | | | ipcpd: normal: Split connection establishment
| * ipcpd: normal: Split connection establishmentSander Vrijders2017-04-281-4/+0
| | | | | | | | | | | | Connection establishment was done at the same time as flow allocation. This splits it more cleanly, and allows to re-use the DT AE for other purposes.
* | ipcpd: Add capability reportingdimitri staessens2017-04-271-12/+17
|/ | | | | | | | The IPCP will now report the DIF name and the hash value to the IRMd as a dif_info struct. This can later be extended to add further capability reporting. Some bugfixes in normal. Fixes #24
* ipcpd: normal: Split flow manager into DT and FASander Vrijders2017-04-211-57/+65
| | | | | | This splits the flow manager into the Data Transfer AE, which is in charge of routing SDUs, and the Flow Allocator AE, which handles flow allocations.
* ipcpd: Allow specifying the hash algorithm to usedimitri staessens2017-04-161-12/+12
| | | | Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-131-93/+37
| | | | | | | | | 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.
* ipcpd: normal: Call shm_pci_init on fmgr initSander Vrijders2017-03-281-1/+12
| | | | | | The shm PCI was never initialized during flow manager init. This commit will do that, and initialize the pdu length correctly as well, since it was not being written into the RIB, nor read in shm_pci_init.
* ipcpd: Initial synchronisation of the RIBdimitri staessens2017-03-241-2/+2
|
* ipcpd: normal: Fix memory leaksSander Vrijders2017-03-221-0/+2
| | | | This fixes some memleaks as reported by valgrind.
* ipcpd: normal: Several bugfixesSander Vrijders2017-03-211-16/+15
| | | | These solve several bugfixes in the normal.
* ipcpd: normal: Split fmgr init into init and startSander Vrijders2017-03-211-10/+26
| | | | | | This split the initialization of the flow manager into an init part and a start part. This avoids the usage of data structures that have not been properly initialized yet.
* ipcpd: Fix cleanup of connmgrdimitri staessens2017-03-201-2/+2
| | | | Fixed trying to double lock and cleanup order in main.
* 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.
* ipcpd: normal: Refactor application entities and add neighbors structSander Vrijders2017-03-031-13/+41
| | | | | | | | | | | | | | | | | | | | This refactors the different Application Entities of the normal IPCP. They all listen to and use the connection manager to establish new application connections. This commit also adds a neighbors struct to the normal IPCP. It contains neighbor structs that contain application connection. Notifiers can be registered in case a neighbor changes (added, removed, QoS changed). The flow manager has an instance of this neighbors struct and listens to these events to update its flow set. The routing component also listens to these events so that it can update the FSDB if needed. The flow manager now also creates the PFF instances and the routing instances per QoS cube. The RIB manager also uses this an instance of the neighbors struct and listens to neighbor events as well.
* ipcpd: normal: Add connection managerSander Vrijders2017-03-021-67/+26
| | | | | | | This adds the connection manager which allows the different AEs of the normal IPCP to register with it. An AE can then use the connection manager to allocate a flow to a neighbor, or to wait for a new connection from a neighbor.
* lib: Split authentication from CACEPdimitri staessens2017-02-271-11/+0
| | | | | | | By removing authentication as part of CACEP, all policies disappear. CACEP becomes a policy-free connection establishment protocol between Application Entities. Authentication can later be added cleanly as a pure policy function when needed.
* lib: Remove application entity nameSander Vrijders2017-02-241-5/+4
| | | | | 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.
* Merge branch 'testing' into beSander Vrijders2017-02-231-4/+2
|\
| * irmd: Check IPCP type before bootstrapdimitri staessens2017-02-221-4/+2
| | | | | | | | | | This prevents assertion failures in the IPCP in some cases. IPCPs can now safely assert the type.
* | ipcpd: normal: Change address authority policySander Vrijders2017-02-211-11/+9
| | | | | | | | | | | | This changes the address authority to follow a similar approach to that of the other policies. No function pointers are passed to its user anymore.
* | lib: Revise CACEPdimitri staessens2017-02-201-1/+1
|/ | | | | | | | | Revises CACEP policies to stateless library calls. It provides two policies: an anonymous authentication policy that will generate random credentials for the peer, and a simple authentication policy that will return a name for the peer and an address. Changes the normal IPCP to use the updates API calls.
* ipcpd: Move RIB configuration to common headerdimitri staessens2017-02-171-5/+1
| | | | | Moves the definitions of paths in the RIB for the normal IPCP to a header ribconfig.h to avoid repetition.
* ipcpd: Silent shutdown of normaldimitri staessens2017-02-101-2/+3
| | | | | The acceptor will not log disconnects with IRMd. Unexpected disconnects will be reported and handled by management components.
* 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: Print size_t and uint64_t in portable waydimitri staessens2017-02-091-2/+3
| | | | | | On 32-bit systems size_t is different than on 64 bit systems. The correct way to print a size_t is with %z. uint64_t is printed portably with the PRIu64 macro.
* ipcpd, lib: Report IPCP creation failuredimitri staessens2017-02-091-1/+5
| | | | | | | | 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.
* ipcpd: Fix boot order of normaldimitri staessens2017-02-081-4/+10
| | | | | | irm_bind has to be called after ipcp_init() since it targets the AP-I and needs the pid to be registered with the IRMd. Also fixes missing unbinding of the AP-I.
* lib: Log to the logging systemdimitri staessens2017-02-081-75/+66
| | | | | | | | | | 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-2/+2
| | | | | | | | | 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, lib: Revise normal IPCPdimitri staessens2017-02-061-111/+241
| | | | | | | | | | This PR updates the normal IPCP to use the new RIB. The old ribmgr is removed and replaced by a stub that needs to be implemented. All components (dir, fmgr, frct) were adapted to the new RIB API. A lot of functionality was moved outside of the ribmgr, such as the addr_auth, which is now a component of the IPCP. The address is also stored to the ipcpi struct. The irm tool has an option to set the gam policy of the rib manager.
* ipcpd: Don't strdup() the dif_name in main loopdimitri staessens2017-01-291-2/+7
|
* ipcpd: normal: Add graph adjacency managerSander Vrijders2017-01-091-4/+7
| | | | | This commit adds the graph adjacency manager to the normal IPCP, which sets up N-1 flows to other members.
* ipcpd: Let IPCPs bind a nameSander Vrijders2017-01-091-9/+7
| | | | | | | 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.