summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/main.c
Commit message (Collapse)AuthorAgeFilesLines
* lib, irmd, ipcpd: Add name querying to IPCPsSander Vrijders2016-10-261-7/+23
| | | | | | | | | 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.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-0/+2
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* ipcpd: normal: Improve upon the internal designSander Vrijders2016-10-121-4/+4
| | | | | | | | This commit will remove the RMT component from the normal IPCP, as some of its functionality would else be duplicated in the FMGR. Now all reading from flows, either N-1 or N+1 is done in the FMGR, then either passed to the FRCT or a lookup is performed in the PFF (not there yet) and the PDU is forwarded.
* lib, ipcp: Revise fast path and flow interfacesdimitri staessens2016-10-041-136/+36
| | | | | | | | | | | | 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-1/+1
| | | | Fast path is split in north and southbound paths.
* lib: Refactor shm_du_map to shm_rdrbuffdimitri staessens2016-08-291-7/+13
| | | | | | | | | | 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, normal: Safe handling of CDAP requestsdimitri staessens2016-08-251-11/+11
| | | | Destruction of the object in the reply stage was unsafe.
* ipcpd, normal: Fix bad lockdimitri staessens2016-08-251-3/+4
|
* ipcpd: Revised lockingdimitri staessens2016-08-241-49/+34
| | | | | | 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: normal: Handle enrollment repliesSander Vrijders2016-08-191-2/+16
| | | | | | | | This adds a condition variable with a timeout to the CDAP request so that we can respond correctly to the answer from the remote. It also adds a timeout to the condition variable waiting on completion of enrollment. Furthermore, for every CDAP callback a new thread is now spawned, to avoid deadlocking in case a callback is stuck.
* ipcpd: Fix bootstrap with api_binddimitri staessens2016-08-121-9/+6
| | | | | Calling api_bind during bootstrap caused the IRMd to lock up. api_bind is now called after the normal completes bootstrapping.
* ipcpd: Add condition variable to IPCP stateSander Vrijders2016-08-111-31/+28
| | | | | | | 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.
* ipcpd: Fix deep copy of dif_configdimitri staessens2016-08-111-3/+5
| | | | | conf->dif_name was not copied from the dif_config gpb message. Fixes some logs.
* ipcpd: normal: Fix log messagedimitri staessens2016-08-111-1/+1
|
* lib, irmd: Bind AP instances to AP_subsetsdimitri staessens2016-08-101-0/+5
| | | | | | | This call will allow grouping AP instances of a certain AP together which are configured identically. Adds the bind operation to dev and updates the applications to make use of this call. Flow_alloc is now only called with the pid and doesn't send the apn anymore.
* ipcp, irmd, lib: Notify IRMd upon IPCP initializationSander Vrijders2016-08-101-0/+10
| | | | | | 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: normal: Allow exchange of static DIF informationSander Vrijders2016-08-081-1/+8
| | | | | | This adds the functionality of exchanging the static DIF information between 2 DIF members. After exchange the enrollment is stopped, and the IPCP that initiated enrollment transitions to the enrolled state.
* ipcpd: normal: Allow initiating enrollmentSander Vrijders2016-08-011-6/+6
| | | | | | | This will add more functionality for enrolling two normal IPCPs with each other. Some bugs were fixed in CDAP. Now on enrolling, an IPCP will send a START message to the other IPCP. Next step is syncing the RIBs.
* ipcpd: normal: Provide initial steps for enrollmentSander Vrijders2016-07-271-4/+58
| | | | | | This provides the normal IPCP with bootstrapping and the initial steps for enrollment. Next step is actually reacting to an enrollment request and sending the data transfer constants.
* ipcpd: normal: Add main loop to normal IPCPSander Vrijders2016-07-151-6/+257
| | | | | | This adds the main loop to the normal IPCP, just like it is present in the shim IPCPs. So in essence, the normal IPCP now reacts to all operations from ipcp.h.
* ipcpd: normal: Establish N-1 management flowsSander Vrijders2016-07-141-2/+12
| | | | | | | | | This adds the intial implementation of establishing management N-1 flows between normal IPCPs. On calling fmgr_mgmt_flow, a management flow will be setup to a certain destination IPCP. After flow allocation, the fd is handed to the RIB manager. The flow manager also listens for incoming flow requests. In case they are management flows, they are handed to the RIB manager, otherwise to the FRCT.
* ipcpd: initial IPC processesdimitri staessens2016-04-181-0/+15
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.